Start controller with Loaded module - LoadModuleFromFile function was used.

Hi everyone,
How can I start the controller with the loaded module inside? I'm using pc sdk application. Using LoadModuleFromFile function and now I would like to start the controller. How can I trigger the execution of that module?
Thank you?
How can I start the controller with the loaded module inside? I'm using pc sdk application. Using LoadModuleFromFile function and now I would like to start the controller. How can I trigger the execution of that module?
Thank you?
Tagged:
Comments
after loading the module you have to set the program pointer to a routine:
For routine "main" you can use the method "ResetProgramPointer", see:
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/e73d2cb4-1974-f850-471f-52abe9951166.htm
For another routine, you have to use the method "SetProgramPointer", see
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/edd35108-78a7-01de-a154-186d03d0226d.htm
Afterward, you have to "Start" the program, see
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/4dc4d703-0b11-363a-31bf-674cacd97b5e.htm
Please have also a look into the manual "Working with RAPID modules and programs"
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/847d1dda-5ab5-4fec-a238-9e5d34115938.htm
I hope I could help you.
Best regards
Micky
I have one more question. I load the module from external hard drive, set program pointer to sequence routine inside that module, finished running that module. The controller will continue to go through that module over and over, right? How can I stop the controller at the end of my module/sequence, resave that module back to my external hard drive and delete that module? I know the delete method is exist, but I need to re-save that module back to the external hard drive. Basically same procedure as from the production manager but only from my application and with external/network hard drive (not from the controller ).
Thanks for your help,
Eugene
you could stop the program as follows:
Observe the execution state and as soon as the program stops you save and delete the module.
In case it not possible to save the module directly on your computer, you have to save it first onto the controller (maybe in the TEMP directory) and copy it later to your PC.
See also the following links:
Working with RAPID modules and programs:
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/847d1dda-5ab5-4fec-a238-9e5d34115938.htm
Deleting a module:
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/97b412d4-b9ef-9b7d-9345-120ca6b2587a.htm
Chapter "File system domain" of the manual
http://developercenter.robotstudio.com/blobproxy/devcenter/RobotCommunication/html/45d2b326-dd15-4d8d-93b0-b752bac5b149.htm
Best regards
Micky
Thank you Micky for all your help.
Maybe you should set an additional signal or a persistent at the end of the program so that you know for sure that the program has really quit and not just stopped.
/BR
Micky
Yes, you right. And I can set something like:
pseudocode:
public void .... (objec sender, Signal state change)
{
Save module;
Copy module;
Delete module;
}
Maybe you will be able to help me out.?
I having a problem with aFileSystem.Localderectory and Remotedirectory. It throws an exception - {"The given path's format is not supported."}.
I'm trying to load the module from a predefined location to the controller. This is code example:
// I tred this whay to
// string remoteFl = "C:/Test/mTest_01.mod";
I think I'm missing something. Not sure what..
Thank you,
Eugene
This what I have:
var rgName = Grant.LoadRapidProgram.Name;
Now how can I use that grant? How can I assign this grant? On Mastership m = Mastership, or in Cntr.Logon(UserInfo.DefaultUser);?
I little lost. Not enough information/documentation.
I will appreciate any help.
Thanks,
To upload a file to the controller you should do something like this:
Any operation that requires UAS grants will work as long as the logged in user has those grant(s).
You can check for grants via controller.AuthenticationSystem, but you cannot assign grants to a user as far as I know. That must be done in RobotStudio.
Software Engineer
RobotStudio Team, ABB Robotics
I would like to load the module inside of the controller PARTMODULE folder. It's located in HOME folder. How can I provide that directory? I tried "(HOME/PARTMODULE)$", "(PARTMODULE)$" not working. I will have to provide a full path?
fs.RemoteDirectory = ??
Thank you for your help.
Eugene
Software Engineer
RobotStudio Team, ABB Robotics
It's the same procedure with a real controller as with virtual - correct? Or I will have to do some different approaches?
Software Engineer
RobotStudio Team, ABB Robotics