RSTO

Syntax

Example

Description/Remarks

RSTO port_number

RSTO 4

returns the first value found in COM port 4.

This command reads the first ASCII string found in the COM port buffer. If the COM port buffer is empty, this command waits until a string is present in the COM port buffer. After reading the last character in the COM port buffer string, this command waits for 0.5 seconds and then places that string into the GainSeeker buffer for further processing.

This command was designed for use with devices that send a character such as ASCII 3 ( ETX, end of transmission)— instead of the standard CR or LF— at the end of the input string.

The return value is the first numeric value in the ASCII string (FIELD 1).

The port_number must be between 1 and 12. An invalid port defaults to COM port 1.

It is possible to use the RSTO command to design two templates that access the same COM port on one workstation and can be open and running at the same time.

See also: RSCHK, FLUSH

RSTO port_number, " text_output"

RSTO 2, "/13"

writes the string /13 to COM port 2.

Writes a string to the COM port. Does not return a value.

See also: RSCHK, FLUSH

Note: In some Citrix implementations when a template is configured to send a text string to a device via the COM port and then to read a value from the COM port, GainSeeker may generate a run-time error -2147417848 (80010108) "The object has disconnected from its clients". In this case, using a footswitch to trigger a reading from the device may resolve the issue by eliminating the need for two-way serial communication under Citrix.

 

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 RSTO 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 use only RS232 input mode cells (and avoid using the RSTO command) or create a second template for keyboard data entry that can be used when the RS-232 device is not available.