Motion Calculate Slave Values (MCSV)

This information applies to the
CompactLogix
5370,
ControlLogix
5570,
Compact GuardLogix
5370,
GuardLogix
5570,
Compact GuardLogix
5380,
CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580, and
GuardLogix
5580 controllers.
Use the Motion Calculate Slave Values (MCSV) instruction to calculate the slave value, the slope value, and the derivative of the slope for a given cam profile and a master value.
Available Languages
Ladder Diagram
MCSV_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MCSV(MotionControl,CamProfile,MasterValue,SlaveValue,SlopeValue,SlopeDerivative)
Operands
There are data conversion rules for mixed data types within an instruction. See
Data Conversion
.
Ladder Diagram and Structured Text
Operand
Type
Format
Description
Motion Control
MOTION_INSTRUCTION
Tag
Structure used to access block status parameters.
Cam Profile
CAM_PROFILE,
CAM_PROFILE_EXTENDED
NOTE: CAM_PROFILE_EXTENDED is supported by Compact GuardLogix 5580, CompactLogix 5380, and CompactLogix 5480 controllers only.
Array Tag
An array of elements with the array index set to 0. It defines the cam profile used in calculating the slave values.
Use the CAM_PROFILE_EXTENDED type for this operand to enable access to double-precision (64-bit LREAL) cam data members.
Master Value
SINT, INT, DINT, or REAL
Immediate or Tag
The exact value along the master axis of the cam profile that is used in calculating the slave values.
Slave Value
REAL
Tag
The value along the slave axis of the cam profile with the master at the specified master value.
Slope Value
REAL
Tag
The first derivative of the value along the slave axis of the cam profile with the master at the specified master value.
Slope Derivative
REAL
Tag
The second derivative of the value along the slave axis of the cam profile with the master at the specified master value.
Structured Text
See
Structured Text Syntax
for more information on the syntax of expressions within structured text.
Description
The MCSV instruction determines the slave value, the slope value, and the derivative of the slope for a given cam profile and master value. As an extension to the position and time camming functionality, it supplies the values essential for the recovery from faults during camming operations.
Motion Control
These control bits are affected by the MCSV instruction.
Mnemonic
Description
.EN (Enable) Bit 31
The Enable Bit sets when the rung transitions from false to true. It resets when the rung goes from true to false.
.DN (Done) Bit 29
The Done Bit sets when the slave values have been calculated successfully. It resets when the rung transitions from false to true.
.ER (Error) Bit 28
The Error Bit sets when the slave values have not been calculated successfully. It resets when the rung transitions from false to true.
This is a transitional instruction:
  • In relay ladder, toggle Rung-condition-in from false to true each time the instruction should execute.
  • In structured text, condition the instruction so that it only executes on a transition.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See
Common Attributes
for operand-related faults.
Execution
Ladder Diagram
Condition/State
Action Taken
Prescan
The .EN, .DN, .ER, and .IP bits are cleared to false.
Rung-condition-in is false
The .EN bit is cleared to false if either the .DN or .ER bit is true.
Rung-condition-in is true
The .EN bit is set to true and the instruction executes.
Postscan
N/A
Structured Text
Condition/State
Action Taken
Prescan
See Prescan in the Ladder Diagram table.
Normal execution
See Rung-condition-in is false, followed by rung is true in the Ladder Diagram table.
Postscan
See Postscan in the Ladder Diagram table.
Extended Error Codes
Extended Error codes provide additional instruction-specific information for the error codes that are generic to many instructions. Extended error codes for the Parameter Out of Range (13) error code lists a number that refers to the number of the operand as listed in the faceplate from top to bottom with the first operand being counted as zero. Therefore for the MCSV instruction, an extended error code of 2 would refer to the Master Value operand’s value. You would then have to check your value with the accepted range of values for the instruction. See
Motion Error Codes (.ERR)
for Motion Instructions.
MCSV Changes to Status Bits
None
Example
MCSV_LD_ex_v31
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.