Jump to content
OMRON Forums

motor removed from coordinate system, Jog fails 'PROGRAM RUNNING''


vanandel
 Share

Recommended Posts

I am maintaining a motion control program for a weather radar. We have two motors - azimuth and elevation. One of our motion control programs (called PPI) scans the azimuth between two limits, and changes the elevation at the scan boundaries. Another of our motion control programs (SUR) moves the azimuth at a constant rate, and changes the elevation once per azimuth revolution.

 

The high level control is a background C application - capp1. Low level control is done by a PMAC Script language program that reads global variables set by the "C" program.

 

To run a SUR (constant azimuth velocity) scan, capp1 removes the azimuth motor from the coordinate system, sets a jog speed, and then starts the motor in jog mode. Most of the time this works, but occasionally, the jog command returns the error: "error #38: PROGRAM RUNNING"

 

The sequence of operations is:

&1 a # abort the motion control program

&1#1->0 # remove the motor from the coordinate system

&1a start4 # start the motion control program

Motor[1].JogSpeed=1.820444 # set jog speed

#1j+ # run the motor in jog mode.

 

==============

Questions:

1) Is there a better way of implementing the SUR (constant azimuth rate) scan rather than having capp1 (the background C task) remove the motor from the coordinate system and using jog mode?

 

2) What are the minimum delays between the operations I've shown above to achieve reliable program operation?

 

3) What else could I do to insure reliable operation?

 

Thanks!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

If I were implementing this, the first method I would try for SUR mode would still use both motors in a coordinate system running a motion program. With C as my azimuth axis and A as my elevation axis (which follows CNC naming conventions, by the way...), the code would look something like this

 

inc

linear

while (SurMode) {

tm(359*MsecPerDegree)

C359

tm(1*MsecPerDegree)

C1 A(ElevationIncrement)

}

 

Of course, the numbers can be tweaked and it can be more parameterized, but I think the principle is good. The azimuth axis will run at constant speed blending the moves together, and then once per revolution, the elevation axis will increment its position, in this case, while the azimuth covers one degree.

 

You just have to make sure your acceleration time (Ta+Ts) is smaller than the short move time for the azimuth blending to be seamless.

 

In what you were trying to do, it seems that sometimes, the early commands to remove the motor from a coordinate system axis were not done before you tried to jog the motor, so it thought it was still assigned to an axis in the coordinate system. Figuring out exactly why would take some time - let's not cross that until you try the coordinated method.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...