Targets at Instruction not working in Main Program——革命制度党ntable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + - - -论坛:通用RoboDK问题(//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: Targets at Instruction not working in Main Program (/Thread-Targets-at-Instruction-not-working-in-Main-Program) |
Targets at Instruction not working in Main Program-AndrewLNguyen-07-06-2021 For some reason, all my programs work and shows the correct animation when I click one by one. But when I make a main program to make them all run with a click, errors like "MoveJ () is not reachable" pop up. The correct animation even happens in the background while the errors pop up. How come this happens? I understand my image is bad, but this pops up while the animation plays, which looks correct. RE: Targets at Instruction not working in Main Program-Jeremy-07-07-2021 Can you provide the .rdk file? Jeremy RE: Targets at Instruction not working in Main Program-AndrewLNguyen-07-07-2021 (07-07-2021, 11:10 AM)Jeremy Wrote:Can you provide the .rdk file? Attached is my .rdk file. I would appreciate it if you can point out the problems with my program. "Start Simulation" includes what I want the program to do. Sometimes the animation goes through properly and sometimes it doesn't. If it doesn't do all the animations, click one by one to see it. Thank you. RE: Targets at Instruction not working in Main Program-Jeremy-07-07-2021 You got a synchronization problem, that's why. BothRobotsSyncLoc1 sub program only contains Threads, so the program pointer won't stop in this program call, it will jump to "Pick Part 1". As the first instruction of "Pick Part 1" is a set frame, it makes the relative position of the next move in "SyncLocRobot1" still running out of reach. You need to make sure the program pointer stays trapped in "BothRobotsSyncLoc1" until both "SyncLocRobot1" and "SyncLocRobot2" are done. Otherwise, good job. But I would recommend you to use the conveyor as a mechanism, the API method is not very efficient. Jeremy |