Running robot from c# app using PCDK

  • Hi everyone.


    Can someone please confirm that it is possible using Robot Object in PCDKs Robot Server to do all of those actions:


    1. (Most important) Start/Stop robot
    2. Read and write from/to all registers (change configuration) or only some limited set of parametars.


    Sorry if some terms are not correct, im new with fanuc/robot development and this is my first project where i need to set some parametars and start robot from .NET application.


    Thank you.

  • If i could find an answer for a 1st question it would be a breakthrough.


    Is there any person or article or forum where someone can answer on what seems a simple question, but in practice its nearly impossible to find:


    Is it possible to start and stop robot using Robot Object in PCDKs Robot Server or it is meant only for updating registries?


    PLEASE if anyone have such knowledge or can point me to a place where i can ask/find an answer it would mean a lot.


    :help:


    Thank you!

  • I don't know if you can directly start the robot from PCDK, but consider this: If you can change a register then that event can trigger the robot to start. For example, if you have a BG Logic program monitoring the value of a register, and if that register changes from a 0 to a 1, then BG Logic pulses a start signal.

  • You can start, stop, and hold programs via the PCDK. You can also set registers and their comments. We setup all of our robots so that each product is a simple register change to run.


    Often I setup a main program that calls a sub to set the starting point for a fixture. Each starting point is assigned a number. Then with select and case I take the stored point P[1] (point 1 for the first fixture) and set a PR[#] to it. So with a register being set from the PC program you can then choose the starting point.


    We also setup many little programs that can be started from our program. For example Park, Change_tool_To, Change_tool_from, and other little programs. Change_tool_to would move the robot safely to the location for a manual EOT change. Then they would run Change_tool_from which would safely return the robot to the parked location.

  • You will want to look at the FRCPrograms, FRCProgram, FRCTasks and FRCTasks objects within the FRCRobot object. These will allow you to run, pause and abort tasks directly. You will need a reference in your project to "FANUC Robotics Controller Interface".


    PCDK comes with good examples of how to use these objects. Look for it in the folder where PCDK was installed. I think they are in VB6, but should get you started.


    Below is a snippet of old (VB6) code that I used to start a task. I cleaned it up and consolidated some stuff to post here so I cannot guarantee it works as posted, but it gives an example of some of the prerequisites to starting a task.


    Eric's Robot Backer Upper is a graphical PC program used to backup FANUC robots over a network and has many other cool features.  Check it out at: www.robotbackerupper.com

  • Quote from HawkME

    I don't know if you can directly start the robot from PCDK, but consider this: If you can change a register then that event can trigger the robot to start. For example, if you have a BG Logic program monitoring the value of a register, and if that register changes from a 0 to a 1, then BG Logic pulses a start signal.

    Hi HawkME


    It's been a couple of years since this topic has been last updated.


    I'm playing starting and stopping the robot with PCDK as well. I think that UI1 to UI8 need to be configured as rack 34, slot 1, start 1, and these four UIs 1,2,3,8(actually flags) are always on in a BG logic. The start button on the PC changes a value of a register and that register changes UI 6 from 0 to 1 in the BG logic as well. It should start the robot, am I correct?


    If so, can this prevent someone from changing the TP program other than main(I've asked this in another thread)?


    Thank you.

  • Yes, by setting the program start and select methods in the prog select menu. Set the select method to other, then press detail and select your main program. Then set start method to UOP.


    Then in system config, set start for continue only. And enable UI signals.


    Finally, don't use UI 6 to start, that will now only be used for resuming a paused program. Instead use UI 18 Prod start, which will always start your main program from the top.

  • Hi HawkME


    Thank you for your reply.

    I set my robot exactly as what you described. I deliberately chose another tp program and as soon as I hit the start button on pc, the main program was selected automatically.

    But I got "SYST-007 NETWORK is the master device error". Is this because that I tested the robot with ROBOGuide? Do I have to connect my robot to a real PLC to get rid of this error?


    Thank you.

  • But I got "SYST-007 NETWORK is the master device error". Is this because that I tested the robot with ROBOGuide? Do I have to connect my robot to a real PLC to get rid of this error?

    It has probably something to do with the value of the system variable $RMT_MASTER. Also verify the correct position of the remote switch (just in case you have one on your controller).

  • Hi HawkME & DS186


    Do you know which UI can be configured to stop the robot from running in auto? I can get start and hold work fine but can't find a way to stop it.

    If so, I may try setting a register value to 0 when pressing the stop button and in the main code, if that register is 0 then do nothing, which makes the stop function kind of as a cycle stop.


    Any idea on this, thanks.

Advertising from our partners