3.6.04 MC_CamTableSelect

Last modified by xingzhi lin on 2025/12/04 18:51

Specify a cam table to use with MC_CamIn instruction.

Instruction format

InstructionMC_CamTableSelect(FB)
NameCam table specified
Graphical performanceST performance

1764845392655-266.png

MC_CamTableSelect(

Master: =,

Slave: =,

CamTable =,

Execute: =,

Periodic: =,

MasterAbsolute: =,

SlaveAbsolute: =,

Done=>,

Busy=>,

Error=>,

ErrorID=>,

CamTableID=>);

Related variables

Input and output variablesNameData typeEffective rangeInitial valueDescription
MasterMaster axisAXIS_REF_SM3--Map to a main axis, an instance of AXIS_REF_SM3
SlaveSlave axisAXIS_REF_SM3--Map to a slave axis, an instance of AXIS_REF_SM3
CamTableSelect tableMC_CAM_REF--Map to a CAM table description, i.e., an instance of MC_CAM_REF
Information

Precautions for use:

The master axis and the slave axis cannot be specified as the same axis, otherwise there will be an error output. The cam table editing corresponding to CamTable needs to be correct, otherwise it will also cause an error in the instruction. The master axis and the slave axis may be real axis or virtual axis.

Input variablesNameData typeEffective rangeInitial valueDescription
ExecuteExecutionBOOL[FALSE, TRUE]FALSERising edge signal, execute instruction
PeriodicRepetitive modeBOOL[FALSE, TRUE]FALSESpecify whether to execute the specified cam table repeatedly or only once. TRUE: Repeat, FALSE: Not repeated
MasterAbsoluteMaster axis absolute modeBOOL[FALSE, TRUE]FALSE

Specify how the master axis tracks distance coordinate system.

1: absolute position, 0: relative position

SlaveAbsoluteSlave axis absolute modeBOOL[FALSE, TRUE]FALSE

Combined with StartMode in the MC_CamIn instruction, specify whether the current instruction position from the axis is absolute (cam table output value corresponding to the current master axis position) or relative (cam table output value from the axis position when the instruction starts superposition)

1: absolute position, 0: relative position

Information

Precautions for use:

Improper selection of MasterAbsolute and SlaveAbsolute may cause the electronic cam output to jump, so please make sure to set the cam curve working mode before setting.

Output variablesNameData typeEffective rangeInitial valueDescription
DoneCompletedBOOL[FALSE, TRUE]FALSETRUE when selection complete
BusyExecution flagBOOL[FALSE, TRUE]FALSETRUE when the instruction is being executed
ErrorErrorBOOL[FALSE, TRUE]FALSEWhen an error occurs, set to TRUE
ErrorIDError IDSMC_ERRORRefer to SMC_ERROR0When an error occurs, the error ID is output.
CamTableIDCAMID in effectMC_CAM_ID--Select the active Cam_ID to use with the CamTableID in the MC_CamIn instruction
Information

Precautions for use:

When an error occurs, refer to the ErrorID to view the SMC_ERROR in help.

Function description

  1. This instruction specifies the cam table required for electronic cam operation, so edit the cam table (cam editor or online) before using this instruction.
  2. When Execute meets rising edge, Execute the specified cam table, or refresh the specified cam table after the cam table is updated.
  3. When the Done signal output is TRUE, the output variable "CamTableID" is generated and takes effect.
  4. During instruction execution, the Busy signal outputs TRUE, the Done signal is TRUE, and the Busy signal is FALSE.
  5. For the specific functions of MasterAbsolute, SlaveAbsolute, and Periodic parameters, refer to MC_CamIn instruction details.

Error description

  1. The master axis and the slave axis cannot be specified as the same axis, otherwise there will be an error output;
  2. The editing of the cam table corresponding to the CamTable needs to be correct, otherwise the error will occur.
Information

Note: Please refer to [3.8 Error ID description] to know the relevant error ID description.