|
|
Topic: P135 |
Custom Protocol Out (CPO) Instruction |
|
Icon / Button =
![]()
Send structured Hex Based Protocol data to another device in situations where the CPU must communicate to another device that has Hex Based communications and does not have the Modbus RTU Protocol.
|
Parameter |
Parameter Type |
Requirements |
Description |
|
Count Up |
Ladder Input |
Must Have |
Edge-driven. With every transition of Input from OFF to ON the instruction will execute. |
|
Serial Port |
Drop Down Selection |
Must Have |
The Serial Port from where ASCII data is sent. |
|
Length |
Constant |
Must Have |
The Data Length to be sent, specified in 1 to 4Bytes based on Data Type. Note: Maximum 128 bytes allowed for data. |
|
Data |
Numerical Tag or Constant |
Must Have |
Embedded Data sent out to the Serial Port from a specified Tag or Constant. |
|
Byte Swap |
Checkbox Option |
Optional |
Every Two Characters will be Swapped when Data is sent. |
|
Checksum |
Optional |
Select if Checksum calculation is to be performed on Data Sent. |
|
|
Type |
Drop-Down Selection |
Must Have if Checksum is selected |
Type of CRC (Cyclic Redundancy Check) or XOR calculation to perform on the Data to be Sent. This needs to match the calculation method of the Receiving device. Enabled when Checksum option is selected. |
|
Checksum Result Offset |
Constant |
Determines where to place the Checksum result. |
|
|
Byte Order |
Selectable Option |
Determines whether the CPU sets the CRC or XOR value as High Byte first or Low Byte first. Enabled when Checksum option is selected. |
|
|
Checksum Range |
Selectable Option |
Determines which Bytes of the Data to be Sent should be used in the Checksum Calculation. Enabled when Checksum option is selected. |
|
|
Checksum Preload |
Checkbox Option |
Optional when Checksum is selected |
Different Checksum calculations use different preloads for the calculation. Check the receiving device technical documentation to determine this value. Enabled when Checksum option is selected. |
|
No Termination |
Selectable Option |
Must have No Termination, 1 Character or 2 Characters selected. |
CPU will be sending a Fixed number of characters. This requires no check for a termination character. |
|
1 Character |
Selectable Option |
This option specifies that the CPU will send out 1 Character that is specified in the Termination Code 1 0x field trailing the String field data. |
|
|
2 Characters |
Selectable Option |
This option specifies that the CPU will send out 2 Characters that are specified in the Termination Code 1 0x field and Termination Code 2 0x field trailing the String field data. |
|
|
In Progress |
Boolean Tag |
Optional |
This bit turns ON when the Ladder Logic attempts to send the Data out of the Serial Port. This bit turns OFF once the data has been sent. |
|
Complete |
Boolean Tag |
Optional |
This bit turns ON once the Data has been successfully sent out the Serial Port |
|
Use Structure |
Checkbox |
Optional |
Enables the use of Structures. |
Note: One of theSerial Ports must be configured for ASCII/Custom Protocol before configuring this instruction.
Note: Tag Values are updated immediately as each Ladder Rung is executed, top to bottom. However, Tag Values representing physical Outputs are only applied to the physical Output after the END statement of the last Task to be scanned is reached. Outputs in Remote Base Groups have additional limitations regarding Update Intervals.
When Custom Protocol Out Instruction is selected the window shown below opens.