Jump to content
OMRON Forums

Phantom Axis and computational efficiency


steveneads
 Share

Recommended Posts

If I define a phantom axis for trajectory calculation purposes that has no motors associated with it, where is the trajectory output written to? I'd normally get this from the motor command register - but if there's no motor...

 

Also, on a slightly related topic, does an Axis (phantom or otherwise) create much computational load when moves are not actually being commanded on that axis (ie moves just being sent to other axes in the same coordinate system, and this axis holding position).

 

I can't find much in the manuals on these topics, and I'd like to understand them better in order to make the right design decisions.

 

Thanks

Steve

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

If I define a phantom axis for trajectory calculation purposes that has no motors associated with it, where is the trajectory output written to? I'd normally get this from the motor command register - but if there's no motor...

 

Also, on a slightly related topic, does an Axis (phantom or otherwise) create much computational load when moves are not actually being commanded on that axis (ie moves just being sent to other axes in the same coordinate system, and this axis holding position).

 

I can't find much in the manuals on these topics, and I'd like to understand them better in order to make the right design decisions.

 

Thanks

Steve

Link to comment
Share on other sites

If you command a phantom axis with no motor (physical or virtual) assigned to it, the initial axis calculations will be done for it. For instance, you can see the programmed move end position in Coord[x].CdPos. However, the subsequent calculations that would involve transfer to an assigned motor, which are much more time consuming, are not performed in this case.

 

Conversely, when a motor is assigned to an axis, but that axis is not explicitly commanded in a program command, the initial move commands do not need to be done for it (as the axis move end position is the same as the start position), but subsequent calculations for the assigned motor must be done to provide zero-distance, zero-velocity move equations for the motor matching the other motors in time.

 

To test the calculation times for things like this, I like to construct some looping motion programs with small move times inside the loop in the different configurations, then look at the PMAC CPU Task Manager screen in the IDE as they execute.

Link to comment
Share on other sites

If you command a phantom axis with no motor (physical or virtual) assigned to it, the initial axis calculations will be done for it. For instance, you can see the programmed move end position in Coord[x].CdPos. However, the subsequent calculations that would involve transfer to an assigned motor, which are much more time consuming, are not performed in this case.

 

Conversely, when a motor is assigned to an axis, but that axis is not explicitly commanded in a program command, the initial move commands do not need to be done for it (as the axis move end position is the same as the start position), but subsequent calculations for the assigned motor must be done to provide zero-distance, zero-velocity move equations for the motor matching the other motors in time.

 

To test the calculation times for things like this, I like to construct some looping motion programs with small move times inside the loop in the different configurations, then look at the PMAC CPU Task Manager screen in the IDE as they execute.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Curt

 

I would like to get the currently calculated output from a move being executed by a phantom axis, real-time each servo cycle. I tried using the register that you previously suggested: Coord[x].CdPos[j], but I now bevieve from the data that I've recorded that this is not the real-time command output but seems to be the end destination for the currently executing move. Where can I get the actual real-time value from when I don't have a motor attached to the axis?

 

To be sure of my conclusion above, I recorded the Coord[x].CdPos[j] value for another axis which has an attached motor and also recorded the commanded input to the motor. The motor input was nicely blended whereas the axis output showed a sudden step at the start of the move. (I can send you the plot if you wish!).

 

Thanks

Steve

Link to comment
Share on other sites

To expand on my comment of Jan 15, if there is no motor (real or virtual) assigned to the axis, only the initial move calculations, such as endpoint position, will be done for that axis. So you will get CdPos endpoint values that change once per move, but there will be no servo cycle by servo cycle updates, as that only happens for motors. (Fundamentally, the transfer of information from axis to motor occurs a lot earlier than you have assumed it does.)

 

So if you want information that is updated more than once per programmed move, you will need to assign a motor to the axis. For this virtual motor, I expect you will want to disable following error, amplifier fault, and overtravel limit faults.

Link to comment
Share on other sites

Hi Curt

 

Yes, I had come to the conclusion that what you describe must be the case. It's difficult from the documentation to understand how much of the trajectory calculation is done by the axis code and how much is done by the motor code. Anyway, I've managed to do what I want by assigning a phantom motor to the axis. This is running a user written servo with basically no code in it, and all of the faults are disabled as you suggest.

 

Thanks for confirming this.

Link to comment
Share on other sites

If you set Motor[x].Ctrl to Sys.PosCtrl, you select the built-in "position output" algorithm, which has only a couple of lines of code in it to output the commanded position as an integer to the specified (by Motor[x].pDac) register. The main intent of this algorithm is for networked position-mode drives, but it is good for virtual axes as well. You might find this easier than maintaining a custom dummy servo.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...