Procedure for using the SerialPortSetup step


The SerialPortSetup step is used to specify the communication parameters for all subsequent SerialPortReader steps and SerialPortWriter steps. The SerialPortSetup step is normally placed before the main loop, since it must be configured before the other Serial Port steps can be used.

The following provides a basic methodology for configuring the SerialPortSetup step:

  1. Specify which serial port this SerialPortSetup step will configure.

  2. Specify the Baud rate to set the speed at which data is transferred.

  3. Specify the number of Data bits in each character.

  4. Specify the Parity. A parity bit is an extra data bit (0 or 1) that is appended for error checking purposes. Possible values for Parity are:

    • None. This means that there is no parity bit being sent (no parity).

    • Odd. Specifies that the parity bit being sent ensures that the number of 1's is odd. For example, if there is an odd number of 1's, the parity bit will be set to 0.

    • Even. Specifies that the parity bit being sent ensures that the number of 1's is even. For example, if there is an even number of 1's, the parity bit will be set to 0.

    • Mark. The parity bit is always 1.

    • Space. The parity bit is always 0.

  5. Specify the number of Stop bits. A stop bit is an extra data bit that is added to each character to indicate the end of the character; there can be 1 or 2 stop bits at the end of a character.

  6. Specify the Encoding. The encoding scheme defines how the characters to be sent or received are encoded.

    • ASCII. A 7-bit binary number representing a possible 128 characters.

    • Latin1. An 8-bit binary number representing a possible 255 characters.

      If you are communicating with a device that uses all 8 bits of data (such as an external I/O module), change the Encoding to Latin1.

The runtime platform's serial port does not provide hardware or software handshake or Flow Control signals. Instead, it is intended for low volume transmissions with devices such as motorized stages or tables.