Jump to content
OMRON Forums

Problems with issuing commands from a plc


kash
 Share

Recommended Posts

I am writing a plc that is supposed to run motors in one direction until the warning following error bit goes high, and then issue a home command on that motor.

 

I have writting the following, but it does not work as I expect.

 

open plc1
clear

cmd"#1j-#2j-#3j-"
m7500 = 0
m7501 = 0 
m7502 = 0 
m7503 = 0

while(m7500 < 3)
if (m141 = 1)
	if (m7501 = 0)
		cmd"#1hm"
		m7500 = m7500 + 1
		m7501 = 1
	endif
endif

if (m241 = 1)
	if (m7502 = 0)
		cmd"#2hm"
		m7500 = m7500 + 1
		m7502 = 1
	endif
endif

if (m341 = 1)
	if (m7503 = 0)
		cmd"#3hm"
		m7500 = m7500 + 1
		m7503 = 1
	endif
endif
endw

displc1
close

 

What typically happens is that the motor trips, because of the fatal following limit is reached, which is 40 times larger than the warning following error.

It is as if the home command is not always issued.

 

What could be the problem?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

It sounds like you are going in a direction until you physically hit something, which causes following error to go up, and then you want to home in the other direction. I can only guess.

 

Conceptually, if the jog acceleration is too low then the system may hit the fatal following error limit in the original direction before it can slow down, stop, and reverse. If your "trigger" is too stiff relative to how fast you can decelerate your system then this approach will likely always trip on fatal FE.

 

You can try lowering the jog speed, raising the jog acceleration, lowering the warning FE limit, and raising the fatal FE limit.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...