Data Collect has the ability to receive messages via RS-232 serial ports to handle a number of tasks – most importantly, the ability to log in a user and to switch units (via serial number or any of the three identifiers). The most common use of this capability is the attachment of RS-232 bar code scanners.
If a message is received from a non-existent user no warning will be displayed as the process happens in the background.
To create or edit Serial Port Handlers:
1. Select the Stations tab.
2. Click Port Handlers.
A list of the existing Port Handlers is displayed.
3. Click the add icon ().
4. Select TCP/IP or RS-232.
The following popup appears:
5. Enter the following details:
o Port: The port number.
o Purpose: The purpose of the port handling.
o Start bytes: This is the character it is expecting the message to start with (optional).
o End bytes: This is the character it is expecting the message to end with.
Hex editor is used for the start message and end message strings. This allows for the entry of non-printable characters such as a carriage return (0x1A).
o Process using stored procedure: Activate if you wish to use a stored procedure to handle the port. If you do you must then select a stored procedure from the drop-down list.
6. Click Save.
The port handler is added to the list.
The following popup appears:
5. Enter the following details:
o Port: The port number.
o Purpose: The purpose of the port handling.
o BPS: Bits per second transfer rate.
o Data Bits: Number of bits per character.
o Stop Bits: Number of bits to detect end of character.
o Parity: Method of detecting errors in transmission (1 or 0).
o Start bytes: This is the character it is expecting the message to start with (optional).
o End bytes: This is the character it is expecting the message to end with.
Hex editor is used for the start message and end message strings. This allows for the entry of non-printable characters such as a carriage return (0x1A).
o Process using stored procedure: Activate if you wish to use a stored procedure to handle the port. If you do you must then select a stored procedure from the drop-down list.
The stored procedure name can not be greater than 30 characters long.
6. Click Save.
The port handler is added to the list.
Character | Hexadecimal | Decimal |
Form Feed | 0C | 12 |
Carriage Return | 0D | 13 |
By default the port handlers look for the following:
Program Task | Expected Value |
Serial | Serial Number |
Identity #1 | Identity #1 |
Identity #2 | Identity #2 |
Identity #3 | Identity #3 |
User | User Code (not password!) |
If the above information is not available, other information may be passed in and processed by a stored procedure with two parameters:
● Unit ID isValue – data available from RS-232 port.
● ID – returned for everything except User Program Task. User Program Task returns a User ID.