LF: Third-party Protocol Functions

Use the Message Composer and the Third-party Protocol Ladder functions to communicate with external devices such as bar-code readers and printers.

Build Message

Use this to create a message.

 

Parameter Name

Purpose

A

Protocol Message

Select a Message that has been defined in:
Message Composer>CPU Protocols Messages

B

Message Buffer

Set a Data Tag, type Buffer, to hold the message from the Composer.

Note that
-The Array length of the buffer is in bytes, and must be long enough to hold the message.
The length of the message, in bytes, is shown in the message group grid.

C

Written Data Length

This is the number of bytes that have been copied from the Message into the buffer.

 

CRC

This function can perform a CRC calculation on a buffer or array.

 

Parameter Name

Purpose

A

CRC Method

Select the Message you want to use

B

Buffer (source)

Select a Buffer or Data Array to provide the data for the CRC calculation.

Note that
-The Array length of the buffer must match the CRC method.

C

Start Offset in Buffer

This sets the Start Byte of the data the function uses to calculate the CRC. Provide the Offset by either
-Entering the number of bytes (constant) or
- Linking a data tag

D

Length of Data to Calculate

This is the number of bytes used in the calculation.

E

Result: CRC

This is the result of the CRC calculation

 

Parse Message

Use this to parse incoming messages from a device.

 

Parameter Name

Purpose

A

Message Buffer (source)

Select the buffer containing the data to be parsed

B

Start Offset in Buffer

This sets the Start Byte of the data that will be parsed. Provide the Offset by either

-Entering the number of bytes (constant) or
- Linking a data tag

C

Length of Data to Parse

This is the number of bytes that will be parsed

C

Buffer Content Length

This will show the length of the data to parse, in bytes

D

Select Device

Select a device that has been defined in Message Composer> CPU Protocols Messages

E

Parsed Message Index

This is the number of the message that has been parsed

 

Related Topics

Message Composer