dblahnik Posted July 10, 2013 Share Posted July 10, 2013 Hello, I am a new Delta Tau user... I am using PEWIN32PRO to control two robots in two coordinate systems, seperately they work fine but if I try to call the program for the motor in a different coordinate system, I can see that it is running the program but the motor doesnt move (I can see that its calling the program because I have a cycle counter set up and I can see it counting). I have also tried renaming the called program as a sub program by using "open subprog '#' ". I have also tried putting the motor in the same coordinate system but I think because of the way our system is set up that it cannot run this way. Is there a way to run a program from another program which will operate motors from another coordinate system? Thanks! Dave Link to comment Share on other sites More sharing options...
steve.milici Posted July 10, 2013 Share Posted July 10, 2013 Can you show me your code. Also how is"PEWIN32PRO" being used with a Power PMAC system? Do you also have a Turbo PMAC as part of this? Link to comment Share on other sites More sharing options...
dblahnik Posted July 10, 2013 Author Share Posted July 10, 2013 CLOSE END GATHER DELETE GATHER DELETE TRACE OPEN PROG 5 CLEAR ABS P221=0 TA(P200) TS(P201) F(P202) DWELL(10) x(100) DWELL(100) TA(P100) TS(P101) F(P102) DWELL(10) Y(183) DWELL(100) WHILE(1=1) TA(P200) TS(P201) F(P202) DWELL(10) X(730) DWELL(2000) TA(P200) TS(P201) F(P202) DWELL(10) X(100) DWELL(1000) P221=P221+1 DWELL(1) END WHILE CLOSE I would like to insert this following program in the loop of the program above. This program has a motor in another coord system. TA(P500) TS(P501) F(P502) DWELL(0) Z(4) TA(P500) TS(P501) F(P502) DWELL(0) Z(0) DWELL(0) DELAY(2000) Yes this is on a PMAC Turbo PCI, wrong forum sorry. I can run the programs at the same time by issuing the & commands on the same line but then the movements between the robots are not syncronized because one of the motors runs on a function with variable acceleration. I want to start the program, have it run the robot in coord system 5, pause/stop, cycle robot in coord system 4, pause/stop, continue coord system 5 robot and repeat. Link to comment Share on other sites More sharing options...
curtwilson Posted July 11, 2013 Share Posted July 11, 2013 I think there's a fundamental conceptual issue here. Each coordinate system in a PMAC should be thought of as having a completely independent execution thread for motion programs. So a motion program in one coordinate system cannot "call" a motion program in another coordinate system as a subroutine. However, it can start execution of a motion program in another coordinate system with a program statement such as: CMD"&2B2R" When this happens, the second coordinate system (&2 in this example) starts executing the specified program (PROG 2) in this example in a parallel execution thread. Note that the execution of the motion program that issues this command does not stop. If you want it to stop doing anything meaningful while the other coordinate system is executing its motion program, you must explicitly program it to wait. If this is what you want, you could do something like: P100=0 CMD"&2B2R" WHILE (P100=0) DWELL 10 ENDWHILE and have PROG 2 set P100 to 1 at the end. This behavior is true of all generations of PMAC controllers: PMAC, Turbo PMAC, and Power PMAC. Link to comment Share on other sites More sharing options...
Recommended Posts