Jump to content
OMRON Forums

Set Coordinate System Feedrate within PLC


DLS_James

Recommended Posts

Hello,

 

I would like to be able to set the feedrate of a coordinate system from a PLC.

 

There doesn't seem to be a Coord[1].Feedrate command so I tried,

 

cmd "&1%0"

 

instead, but this gives the following error:

 

error #31: invalid format in string: cmd "&1%0"

 

What is the correct/best way to be able to do this?

 

Thanks,

 

James

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Your syntax fault might have been the % being interpreted as a modulo operator(?)

You could use the F, FRAX, FRAX2, NOFRAX commands

These are used inside the motion program, but a variable from a PLC can be used for the actual feedrate.

FRAX specifies which axis to include in the calculations FRAX(X,Y,...) Note: not required to use all axis of a CS

F specifies the actual feedrate. A variable can be given a value in a PLC and then inside the motion program use F(M123) will set the feedrate.

Using this inside the motion program allows you to coordinate feedrate values with specific lines of motion commands.

Note that the vector feedrate commands assume orthogonal axis in the calcs

See pp 1171-1174 of the software reference and chase all the Coord[x].data references for a better understanding.

Link to comment
Share on other sites

First, make sure you understand the difference between "feedrate" (usually commanded by F in the motion program) and "feedrate override" (usually commanded with the % command outside the program.

 

The feedrate value is used once per programmed move as that move is calculated as the commanded top speed. When "F{value}" is executed inside a motion program, its action is to set Coord[x].Tm = -{value}. The "-" indicates that this is a speed, not a move time, so that moves are specified by speed (feedrate).

 

So if you want to specify "feedrate" from outside the motion program, you can command Coord[x].Tm = -{value}. This will NOT affect the presently executing moves. It would also be overridden by the next F command in the motion program.

 

If you want to specify "feedrate override", which will begin to take effect immediately, probably the best way is what Richard suggests. If you are thinking in terms of percentages, you could do a command like:

 

Coord[x].DesTimeBase = Sys.ServoPeriod * MyPercent / 100;

Link to comment
Share on other sites

Try using CMD "&1%%0". I believe the problem with using % with CMD is the % gets interpreted as a "format sequence" character (see under % command description in the SRM).

 

And as Richard/Curt pointed out, Coord[x].DesTimeBase can also be used. For example, Coord[x].DesTimeBase = Sys.ServoPeriod/2 for 50% (see under Coord[x].DesTimeBase description in the SRM).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...