paison Posted September 8, 2016 Share Posted September 8, 2016 hi, Present a motion program stopped, I immediately start another Motion Program in the PLC program, find that Motion Program can't start sometimes,For example: &1 #1->2000X Open plc1 clear if(m115=1) if(Q0=0) Q0=1 cmd"&1a" p200 = 1 endif else Q0=0 endif close Open plc2 clear if(p200=1) if(Q1=0) Q1=1 while(m133=0) endwhile cmd"&1B1r" p200 = 0 endif else Q1=0 endif close open prog1 clear inc linear Ta(100) Ts(50) TM(500) x(100) close Link to comment Share on other sites More sharing options...
steve.milici Posted September 8, 2016 Share Posted September 8, 2016 This is because the motor may be at commanded zero velocity but the program has not finished. In this case the command to run program 1 will be rejected with an error. In your PLC2 you need to check the Program Running bit (M5180) for the coordinate system along with the Desired Velocity Zero bit (M133). Open plc2 clear if(p200=1) if(Q1=0) Q1=1 while(m133=0andm5180=1) endwhile cmd"&1B1r" p200 = 0 endif else Q1=0 endif close Link to comment Share on other sites More sharing options...
paison Posted September 9, 2016 Author Share Posted September 9, 2016 thanks,There is now a problem is in the process of program 1 start setting coordinate system's feedrate is zero,This case is easy to appear can't start,For example: M5197->X:$002000,24,S M5197=P1*I10/100 ; It is easy to appear can't start program 1 when p1 = 0 Link to comment Share on other sites More sharing options...
steve.milici Posted September 10, 2016 Share Posted September 10, 2016 You must set P1 to to the feed rate override value in percent for the coordinate system. Link to comment Share on other sites More sharing options...
paison Posted September 13, 2016 Author Share Posted September 13, 2016 thanks i set loop for start move Prog1,slove this problem Link to comment Share on other sites More sharing options...
Recommended Posts