Jump to content
OMRON Forums

How to start the movement in the program of PLC program success?


Recommended Posts

Posted

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Posted

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

Posted

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

Guest
This topic is now closed to further replies.

×
×
  • Create New...