CamShaft Monitor (CSM)
This instruction applies to the Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380, and GuardLogix 5580 controllers.
This instruction monitors the start, stop, and run operations of a camshaft.
Possible sources for the Channel A and Channel B inputs to the instruction could include proximity switches, resolvers, gray code encoders, or any device that can produce a series of pulses when the camshaft is moving.
Start and stop operation diagnostics are based on the configurable Mechanical Delay Time parameter. A fault is generated whenever the Mechanical Delay Time is exceeded during a start or stop operation.
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Operands
IMPORTANT:
Do not use the same tag name for more than one instruction in the same program. Do not write to any instruction output tag under any circumstances.
WARNING:
If you change instruction parameters while in Run mode, you must accept the pending edits and cycle the controller mode from Program to Run for the changes to take effect.
The following table provides the operand used to configure the instruction. This operand cannot be changed at runtime.
Operand | Data Type | Formats | Description |
---|---|---|---|
CSM | CAMSHAFT_MONITOR | tag | This parameter is a backing tag that maintains important execution information for each usage of this instruction. ATTENTION: To avoid unexpected operation do not reuse this backing tag and its members. Do not write to any of the tag members anywhere else in the program. |
The following table explains the instruction inputs. The inputs may be field device signals from input devices or derived from user logic.
Operands | Data Type | Formats | Description |
---|---|---|---|
Mechanical Delay Time | DINT | tag immediate | In a starting operation, this parameter determines the amount of time the instruction waits for the Channel A and Channel B inputs to indicate motion after the Motion Request input has transitioned from OFF (0) to ON (1) before generating a Start Time Exceeded fault. In a stopping operation, this parameter determines the amount of time the instruction waits for the Channel A or Channel B input to indicate a loss of motion after the Motion Request input has transitioned from ON (1) to OFF (0) before generating a Stop Time Exceeded fault. The valid range is 300 to 2000 ms. |
Max Pulse Period | DINT | tag immediate | This parameter defines the maximum time allowed between the rising and falling edges in the input pulse train before motion is considered to be stopped. The valid range is 50 to 2000 ms. |
Motion Request | BOOL | tag | This input indicates if motion is being requested. It is sourced by Output 1 of the Clutch Brake Inch Mode (CBIM), Clutch Brake Single Stroke Mode (CBSSM), or Clutch Brake Continuous Mode (CBCM) instruction. ON (1): The camshaft is being commanded to move and motion is expected. OFF (0): Camshaft motion is not requested. |
Channel A 1 | BOOL | tag | A pulse train at this input indicates that the camshaft is moving. |
Channel B 1 | BOOL | tag | A pulse train at this input indicates that the camshaft is moving. |
Input Status | BOOL | tag immediate | If instruction inputs are from a safety I/O module, this is the status from the I/O module or modules (Connection Status or Combined Status). If instruction inputs are derived from internal logic, it is the application programmer’s responsibility to determine the conditions. ON (1): The inputs to this instruction are valid. OFF (0): The inputs to this instruction are invalid. |
Reset 2 | BOOL | tag | This input clears the instruction faults provided the fault condition is not present. OFF (0) -> ON (1): The Fault Present and Fault Code outputs are reset. |
1If this input is from a
Guard I/O
input module, make sure the input is configured as single, not equivalent or complimentary.2 ISO 13849-1 stipulates instruction reset functions must occur on falling edge signals. To comply with ISO 13849-1 requirements, add this logic immediately before this instruction. Rename the ‘Reset_Signal’ tag in the example shown below to your reset signal tag name. Then use the OSF instruction Output Bit tag as the instruction’s reset source.
The following table explains the instruction outputs. The outputs may be field device signals or derived from user logic.
Operand | Data Type | Description |
Output 1 (O1) | BOOL | This output indicates the status of camshaft motion at all times, even when the Fault Present (FP) output is ON. The only exception is when the Input Status input indicates that inputs to this instruction are invalid. In that case, this output (O1) is OFF. This output is used to source the Press in Motion input of the Clutch Brake Inch mode (CBIM), Clutch Brake Single Stroke Mode (CBSSM), and/or Clutch Brake Continuous Mode (CBCM) instructions. ON (1): The camshaft is moving. OFF (0): The camshaft is stopped. |
Fault Present (FP) | BOOL | This output indicates the fault status of the instruction. This output is used to source the Motion Monitor Fault input of the Clutch Brake Inch Mode (CBIM), Clutch Brake Single Stroke Mode (CBSSM), and/or Clutch Brake Continuous Mode (CBCM) instruction. ON (1): A fault is present in the instruction. OFF (0): The instruction is operating normally. |
Fault Code | DINT | This output indicates the type of fault that occurred. See the CSM – Fault Codes below for the list of possible fault codes. This parameter is not safety-related. |
Diagnostic Code | DINT | This output indicates the diagnostic status of the instruction. See the CSM – Diagnostic Codes below for a list of possible diagnostic codes. This parameter is not safety-related. |
Measured Start Time | DINT | The time, in milliseconds, that it took the camshaft to start moving. This is the difference in time from when the Motion Request input turns ON (1) to the time at which both Channel A and Channel B inputs indicate motion. This parameter is not safety-related. |
Measured Stop Time | DINT | The time, in milliseconds, that it took the camshaft to stop moving. This is the difference in time from when the Motion Request input turns OFF (0) to the time at which either the Channel A or Channel B input stopped indicating motion. This parameter is not safety-related. |
IMPORTANT:
Do not write to any instruction output tag under any circumstances.
Input Pulse Conversion
The Channel A and Channel B input signals are a pulse train from an encoder, resolver, or proximity switch. When pulses are detected within the configured Max Pulse Period, motion is indicated.
The pulse trains are conditioned to provide level input signals to the instruction logic to derive a signal that is ON (1) when there is motion and OFF (0) when there is no motion. The conversion of each channel is independent of the other.
Shown here for Channel A, the signal turns ON (1) at the first pulse edge seen at the Channel A input at (A). The derived signal remains ON (1) as long as the elapsed time between pulses does not exceed the configured Max Pulse Period. If no edges are detected for more than the Max Pulse Period, the derived level signal turns OFF (0) at (B).
Normal Operation
The Motion Request input transitions from OFF (0) to ON (1) at (A), indicating that the camshaft is being commanded to move. Output 1 turns ON (1) at (B), when pulses are detected on both Channel A and Channel B within the configured Mechanical Delay Time. After the Motion Request input turns OFF (0) at (C), indicating that the camshaft is being commanded to stop, Output 1 turns OFF (0) at (D) since pulses are no longer present on both channels. Pulses must stop on either Channel A or Channel B within the configured Mechanical Delay Time to prevent a Stop Time Exceeded fault.
Uncommanded Motion Fault
An Uncommanded Motion Fault occurs when the Motion Request input is OFF (0) but pulses on the Channel A and Channel B inputs indicate motion. The Motion Request input is OFF (0), indicating that motion is not being commanded. When pulses are detected on only one channel at (A), no fault occurs. When pulses are detected on both Channel A and Channel B at (B), a fault is generated indicating Uncommanded Motion. Output 1 tracks the presence of pulses on both Channel A and Channel B turning ON (1) at (B) and OFF (0) at (C). When no pulses are detected on either channel and the Motion Request input is OFF (0), indicating that motion is no longer requested, the fault is cleared on the next OFF (0) to ON (1) transition of the Reset input at (D).
Start Time Exceeded Fault
At (A), the Motion Request input turns ON (1), which indicates that motion is being requested. The Fault Present output turns ON (1) when the configured Mechanical Delay Time expires at (B), before pulses are detected on both Channel A and Channel B. When pulses are present on both inputs at (C), Output 1 turns ON (1) even though the fault condition is present. When either Channel A or Channel B are no longer indicating motion at (D), Output 1 turns OFF (0). When both channels are not indicating motion (no pulses) and the Motion Request input is also OFF (0) at (E), a subsequent OFF (0) to ON (1) transition of the Reset input resets the fault condition at (F).
Stop Time Exceeded Fault
At (A), the Motion Request input turns OFF (0), indicating that motion is being commanded to stop. At (B), the Fault Present output turns ON (1) when the configured Mechanical Delay Time expires before pulses stop on either Channel A or Channel B. Output 1 transitions from ON (1) to OFF (0) when pulses stop occurring on either Channel A or Channel B at (C). When both Channel A and Channel B stop indicating motion and the Motion Request input is also OFF (0) at (D), a subsequent OFF (0) to ON (1) transition of the Reset input resets the fault condition at (E).
Loss of Motion Fault (Case 1)
The Motion Request input turns ON (1), and at (A) the Channel A and Channel B inputs both indicate motion within the configured Mechanical Delay Time. Once the Mechanical Delay Time has expired at (B), a subsequent loss of pulses on either Channel A or Channel B results in the Fault Present output turning ON (1), indicating a Loss of Motion fault at (C). Output 1 also turns OFF (0) at (C). When both Channel A and Channel B are no longer indicating motion at (D) and the Motion Request input is also OFF (0), a subsequent OFF (0) to ON (1) transition of the Reset input resets the fault condition, at (E).
Loss of Motion Fault (Case 2)
The Motion Request input turns ON (1), and at (A) the Channel A and Channel B inputs both indicate motion within the configured Mechanical Delay Time. A loss of pulses on either Channel A or Channel B, at (B), before the Mechanical Delay Time expires, results in Output 1 turning OFF (0). When the Mechanical Delay Time expires at (C), the Fault Present output turns ON (1), indicating a Loss of Motion fault. When both Channel A and Channel B are no longer indicating motion at (D) and the Motion Request input is also OFF (0), a subsequent OFF (0) to ON (1) transition of the Reset input resets the fault condition, at (E).
Input Status Fault
At (A), the Motion Request input turns ON (1), indicating that motion is being commanded. Both Channel A and Channel B inputs indicate motion by detecting pulses within the configured Mechanical Delay Time. Output 1 turns ON (1) at (B). When the Input Status input turns OFF (0) at (C), an Input Status Fault occurs and the Fault Present output turns ON (1). Output 1 also turns OFF (0) at (C). Output 1 is always OFF (0) when the Input Status input is OFF (0). When both Channel A and Channel B no longer indicate motion at (D), the Motion Request input is also OFF (0), and the Input Status input has returned to ON (1), a subsequent OFF (0) to ON (1) transition of the Reset input resets the fault condition, at (E).
False Rung State Behavior
When the instruction is executed on a false rung, all instruction outputs are de-energized.
Fault Codes and Corrective Actions
The fault codes are listed in hexadecimal format followed by decimal format.
Fault Code | Description | Corrective Action |
---|---|---|
00 | No fault. | None. |
16#20 32 | An input status error occurred. The Input Status input transitioned from ON (1) to OFF (0). |
|
16#6000 24576 | Uncommanded Motion occurred. The Motion Request input is OFF (0) but both input channels indicate the camshaft is moving. |
|
16#6001 24577 | Start time was exceeded. The measured time to start the camshaft exceeded the configured Mechanical Delay Time. |
|
16#6002 24578 | Stop time was exceeded. The measured time to stop the camshaft exceeded the configured Mechanical Delay Time. |
|
16#6003 24579 | Loss of Motion occurred at Channel A. The Motion Request input is ON (1), but the Channel A input stopped indicating motion. |
|
16#6004 24580 | Loss of Motion occurred at Channel B. The Motion Request input is ON (1), but the Channel B input stopped indicating motion. |
|
16#6005 24581 | The Motion Request input turned ON (1) before all inputs were in their safe state, OFF (0). |
|
Diagnostic Codes and Corrective Actions
The diagnostic codes are listed in hexadecimal format followed by decimal format
Diagnostic Code | Description | Corrective Action |
00 | None | None. |
16#20 32 | The Input Status input is OFF (0) when the instruction first executed. | Check the I/O module connection. |
16#6000 24576 | The Channel A and Channel B inputs are both indicating motion (pulses present) when the instruction first executed. |
|
16#6001 24577 | The Channel A input is indicating motion (pulses present), when the instruction first executed. |
|
16#6002 24578 | The Channel B input is indicating motion (pulses present), when the instruction first executed. |
|
Affects Math Status Flags
No
Major / Minor Faults
None specific to this instruction. See Index Through Arrays for array-indexing faults.
Execution
Condition/State | Action Taken |
---|---|
Prescan | Same as Rung-condition-in is false. |
Rung-condition-in is false | The .O1 and .FP are cleared to false. The Diagnostic Code and Fault Code outputs are set to 0. |
Rung-condition-in is true | The instruction executes as described in the Normal Operation section. |
Postscan | Same as Rung-condition-in is false. |
Provide Feedback