The text of a manual · part 7 of 15
FMT1000 Series Programmer's Guide: Chapter 2 I/O System Programming, pages 61 to 70
Pages 61 to 70 of 142, from FMT1000 Series Programmer's Guide
The original document is the PDF (965 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol FMT-1020
Page 61
I/O System Programming
RIN – Return Input Status Format RIN
Summary Returns the input status of the communications port.
Returns Integer, 0-5 0=no error 1=command error 2=parameter error 3=timeout error 4=request was canceled 5=busy
Description This command returns the current status for input from the serial port. It reflects the current status condition of the port, as opposed to the last error status, so it is important to retrieve status as needed.
Example rem Return aux input status. echo RIN > COM2 rem If the aux port status is OK, this command rem will return an '0' to the CPU.
2-41
Page 62
FMT1000 Series Programmer’s Guide
Return Code
Error/Status
Description
1
(command error) indicates that the last command mnemonic was incorrect or inappropriately sequenced.
2
(parameter error) indicates that the parameter following the command was incorrect or inappropriate. This error can also occur if a required parameter is missing from a command.
3
(timeout error)
occurs if the timeout value is exceeded; see the SIO set input timeout command.
4
(request was canceled)
indicates that the SIC input cancel command was properly received and executed by the I/O processor.
5
(busy)
used when the operation is not complete (e.g., the buffer isn't full or the required prefix and/or suffix hasn't been received) but has not yet timed out.
2-42
Page 63
I/O System Programming
SOW – Set Output Write Format SOW <string>
Length: 1-80 characters
Summary Initiates an output write to the RS-232 auxiliary port.
Returns N/A
Description Initiates an output write to the RS-232 auxiliary port.
Example rem rem rem echo echo
Write a string 'Hi There' terminated with a <CR><LF>. Set output suffix to <CR><LF>. SSO^M^J > COM2 SOW Hi There > COM2
2-43
Page 64
FMT1000 Series Programmer’s Guide
SOC – Aux Output Cancel Format SOC
Summary Cancels the current output request.
Returns N/A
Description Cancels an outstanding request for output of the string defined by SOW. This command is useful when ROU returns an error status on output, and can be used as part of an error recovery routine within the program.
Example rem echo
2-44
Cancel aux output. SOC > COM2
Page 65
I/O System Programming
SOO, ROO – Set and Return Aux Output Timeout Format SOO <0-255>
Summary Set the length to wait for output, in seconds. This setting is preserved in EEPROM.
Returns Timeout value, integer 0-255.
Description Sets the timeout delay before setting the error status 3 (timeout error) for the ROU return output status command. If the delay is set to 0, the device will, by definition, never time out. This is the factory default.
Example rem echo
Set aux output timeout to 10 seconds. SOO10 > COM2
2-45
Page 66
FMT1000 Series Programmer’s Guide
ROU – Return Output Status Format ROU
Summary Returns the output status of the RS-232 auxiliary port.
Returns Integer, 0-5 0=no error 1=command error 2=parameter error 3=timeout error 4=request was canceled 5=busy
Description This command returns the current status for output to the RS-232 auxiliary port. It reflects the current status condition of the port, as opposed to the last error status, so it is important to retrieve status as needed.
Example rem echo
2-46
Return aux output status. ROU > COM2
Page 67
I/O System Programming
Return Code
Error/Status
Description
1
(command error) indicates that the last command mnemonic was incorrect or inappropriately sequenced.
2
(parameter error) indicates that the parameter following the command was incorrect or inappropriate. This error can also occur if a required parameter is missing from a command.
3
(timeout error)
occurs if the timeout value is exceeded; see the SOO set output timeout command.
4
(request was canceled)
indicates that the SOC output cancel command was properly received and executed by the I/O processor.
5
(busy)
indicates that the operation is not complete (e.g., the prefix, data, and suffix have not yet been sent) but the timeout has not expired.
2-47
Page 68
FMT1000 Series Programmer’s Guide
SPA, RPA – Set or Return Aux Passthrough Mode Format SPA 0 | 1
0=off * 1=on
Summary Sets the I/O processor passthrough mode for the RS-232 auxiliary port.
Returns N/A
Description When passthrough is set to 0 (off), the I/O processor's prefix, suffix, and buffer length filters control the data flow from the serial port. These filters can be set using mnemonic commands. When passthrough is set to 1 (on), the raw data received from the serial port is sent to the CPU application until the passthrough termination characters are received.
Example rem echo echo echo rem rem
2-48
Set aux passthrough mode to ON. SPA1 > COM2 This string will be terminated > COM2 +++ > COM2 Passthrough will terminate when the '+++' characters are received.
Page 69
I/O System Programming
STC, RTC – Set and Return Passthrough Termination Characters Format STC <string>
Length: 3 characters
Summary Sets the character string which the I/O processor will use to recognize the end of passthrough mode.
Returns N/A
Description When the RS-232 auxiliary port is in passthrough mode, the I/O processor still monitors the data input stream. When the passthrough termination characters are encountered, the passthrough mode is changed to 0 (off), and the I/O processor resumes active control over the data stream. The characters chosen as terminators should be unique and not duplicated in the expected data stream. The factory default string is +++ (three plus marks).
Example: rem rem echo
Set aux passthrough termination characters to '123'. STC123 > COM2
2-49
Page 70
FMT1000 Series Programmer’s Guide
SAE, RAE – Set and Return Aux Communications Port Enable Format SAE 0 | 1
0=Off 1=On *
Summary Enables or disables transmission of RS-232 auxiliary port responses to the CPU. This setting is preserved in EEPROM.
Returns Aux comm port enable flag, integer 0 or 1.
Description Enables or disables transmission of RS-232 auxiliary port responses to the CPU.
Example rem echo
2-50
Set aux comm port enable to OFF. SAE0 > COM2