Serial Port Data Settings
Serial Port Data window defines connection parameters for the selected serial port. Parameters in this dialog box have to match with the connected device's settings. Refer to the documentation of your serial communication device to set the communication parameters properly.
Note
If the settings in Loftware and on the device do not match, communication cannot be established.
Port group defines serial port to read the data from.
-
Port name: name of the port to which an external device is connected. This can either be a hardware or a virtual COM port.
Port Settings group defines additional port connection settings.
-
Bits per second: speed rate used by the external device to communicate with the PC. The usual alias used with the setting is "baud rate".
-
Data bits: specifies the number of data bits in each character. 8 data bits are almost universally used in newer devices.
-
Parity: specifies error detection method during the ongoing transmission. The most common parity setting, is "none", with error detection handled by a communication protocol (flow control).
-
Stop bits: halts the bits sent at the end of every character allowing the receiving signal hardware to detect the end of a character and to resynchronize with the character stream. Electronic devices usually use a single stop bit.
-
Flow control: serial port may use interface signals to pause and resume the data transmission.
Example 57. Example:
A slow device might need to handshake with the serial port to indicate that data should be paused while the device processes received data.
Options group includes the following settings:
-
Send initialization data: specifies the string that is sent to the selected serial port before the data is read. This option enables the action to initialize the device to be able to provide the data. The option can also be used for sending a specific question to the device, and to receive a specific answer. Click the arrow button to enter special characters.
-
Use data polling: specifies that the trigger will actively ask the device for data. Within the specified time intervals, the trigger will send the commands provided in the Contents field. This field can include binary characters.
Filter group allows you to set the serial port data filtering criteria.
-
Use Filter: enables serial data filtering. This option filters any irrelevant characters from the received data.
-
Start position: sets the starting character for extracted data.
-
End position: sets the ending character for extracted data.
Example 58. Example:
Received raw data includes the following characters: q###12345$$$1. After setting Start position to 5 and End position to 9, the extracted data is 12345.
Execution Event group specifies when the trigger should fire and start executing actions.
-
On number of characters received: specifies that the event occurs each time the required number of characters is received. In this case, the third party application can keep a connection open and continuously send the data. Each chunk of data must be of the same size.
-
On sequence of characters received. Specifies that the event occurs each time the required sequence of characters is received. Use this option if you know that the 'end of data' is always identified by a unique set of characters. You can insert special (binary) characters using the button next to the edit field.
-
Include in data: sequence of characters that is used to determine that the event activator is not stripped from the data, but remains included in the data. The event receives a complete received data stream.
-
-
When nothing is received after the specified time interval: event occurs after the specified time interval (in ms) passes since the last received character.