MC_CamTableSelect

Function block MC_CamTableSelect
Selects a cam table by setting the connections to a relevant table.
VAR_IN_OUT
V CamIn CAM_REF The index of a cam table. Indexes are zero based.
VAR_INPUT
B Execute BOOL Selection at rising edge.
E Periodic BOOL

Determines whether to repeat the cam profile. 1 = periodic, 0 = non periodic (single-shot).

Periodic: Repeats the execution of the cam profile on a continuous basis, even if the cam profile does not match the modulo. This means that for a modulo axis with modulo is 360 degrees, and the cam profiles is specified for 90 degrees, it will be executed 4 times in a modulo. In reverse mode the profile is run the inverse way.

Non-Periodic: the cam profile is run only once. If the master moves out of the range, the slave stops following and stays at the last position in the cam table, and the slave's state is returned to StandStill. In reverse mode, the cam profile is not executed after having reached the "EndOfProfile" position. The 90 degrees example above will be run only once.

E MasterAbsolute BOOL Chooses the absolute or relative coordinates for the master axis. 1 = absolute, 0 = relative coordinates. By default, it is 0.
E SlaveAbsolute BOOL Chooses the absolute or relative coordinates for the slave axis. 1 = absolute, 0 = relative coordinates. By default, it is 0.
V Length DINT The length of the MasterPositions and SlavePositions array.
V MasterPositions ARRAY [0..2047] OF LREAL The array that stores the master positions in the cam table.
V SlavePositions ARRAY [0..2047] OF LREAL The array that stores the slave positions in the cam table.
V PointParameters ARRAY [0..2047] OF LREAL

The additional parameter for the table points, depends on the interpolation type.

Linear interpolation: null.

Poly5 interpolation: it has four point types. "!=" means "not equal to."

  • StopPoint: Vel = 0; Acc = 0;
  • VelocityPoint: Vel != 0; Acc = 0;
  • AccelerationPoint: Vel = 0; Acc != 0;
  • MovePoint: Vel != 0; Acc != 0;
V InterpolationType MC_CamInterpolationType Currently this provides the linear interpolation type.
VAR_OUTPUT
B Done BOOL The cam table setting is done.
E Busy BOOL The function block is not finished and new output values are to be expected.
E CommandAborted BOOL The command is aborted by another command.
B Error BOOL Signals that an error has occurred within the function block.
E ErrorID MC_Error Error identification.
  • For more information about how a cam table works, see How to use cam in KINGSTAR.
  • A simulated axis can be used as master axis.
  • Index of the cam table is a supplier-specific data type.
  • MC_CamTableSelect lets you select a cam table that contains the data to make a cam move. This includes:
    1. Download the starting point of a cam profile.
    2. Start to generate a cam profile.
  • When the Done output is set, the index of the cam table is valid and ready for use in a MC_CamIn.

 

  MC_CamTableSelect  
CAM_REF   CamIn   Cam   CAM_REF
BOOL   Execute   Done   BOOL
BOOL   Periodic   Busy   BOOL
BOOL   MasterAbsolute   CommandAborted   BOOL
BOOL   SlaveAbsolute   Error   BOOL
DINT   Length   ErrorID   MC_Error
ARRAY [0..2047] OF LREAL   MasterPositions        
ARRAY [0..2047] OF LREAL   SlavePositions        
ARRAY [0..2047] OF LREAL   PointParameters        
MC_CamInterpolationType   InterpolationType