I probably will have to program some CSC8 robots without pendant, this makes it a little stranger as no operator will be able to reset the program if needed.
Thinking about it and the best way to do it and being completely newbie with Stäubli, I've thought on using this strategy:
Create a program that will start at boot, that program will have an infinite loop that will handle the emergency stop signal (used to reset it all), then I plan to create a parallel task for each part the PLC requires to process so I will be able to kill those tasks in case of an emergency stop (as a rude mechanism to make it possible to reset the programs):
begin while(true) // the emergency input is not OK, time to reset it all. if(!diEmgOK) // Initialize variables. // kill all part program tasks taskKill("part0") taskKill("part1") // The emergency input is OK, the motors power on input is true, the motors are powered up and no part tasks are running. elseIf((diMotorsOn) and (doMotorsOn) and (taskStatus("part0") == -1) and (taskStatus("part1") == -1)) // If there is the Go Home trigger... if(diGoHome) call goHomeAuto() // otherwise, if there is the Go Maintenance trigger... elseIf(diGoMaintenance) call goMaintenance() // Otherwise, if there is the start signal active... elseIf(diStart) // if the PLC requires the robot to process part 0 if(diPart0) taskCreate "part0", 10, start() // if the PLC requires the robot to process part 1 elseIf(diPart1) taskCreate "part1", 10, start() endIf endIf endIf endWhile end
part0 and part 1 will have all the cycle to pick and place parts from A to B, with all the logics and conditions, I could add a kind of error signal to let the main program know everything is running fine and in case it is not, inform the PLC about it, but that would be the design.
Does this look good to you?
Thank you in advance.