RSCHK

Syntax

Example

Description/Remarks

RSCHK port_number

 

Reads in an RS232 string and returns a 1 if the checksum is correct or 0 if the checksum does not match. Use the FIELD command to access numeric values in the string.

Checksum is a two-character representation of the sum of the ASCII values of the characters in the string MOD 256.

RSCHK should be used with communication parameters N,8,1 because it assumes that the highest bit is significant. See also RS232, FLUSH.

Note: If a data entry operator presses CTRL+K during data entry to bypass the RS-232 device and enter data values via keyboard, the data entry session will replace any RS232 input mode cells with Keyboard input mode cells. However, the data entry session will still try to execute all commands in the template – including the RSCHK command – and the operator may not be able to complete data entry without access to the RS-232 device. If this will cause significant problems during data entry, you may need to create a second template for keyboard data entry that can be used when the RS-232 device is not available.

RSCHK port_number, " text_output"

 

Sends a string to the connected RS232 device and adds a checksum to the end in addition to a carriage return (CHR(13)).

Checksum is a two-character representation of the sum of the ASCII values of the characters in the string MOD 256.

RSCHK should be used with communication parameters N,8,1 because it assumes that the highest bit is significant.

See also RSCHK, FLUSH.

Note: If a data entry operator presses CTRL+K during data entry to bypass the RS-232 device and enter data values via keyboard, the data entry session will replace any RS232 input mode cells with Keyboard input mode cells. However, the data entry session will still try to execute all commands in the template – including the RSCHK command – and the operator may not be able to complete data entry without access to the RS-232 device. If this will cause significant problems during data entry, you may need to create a second template for keyboard data entry that can be used when the RS-232 device is not available.