The text of a manual · part 6 of 15
FMT1000 Series Programmer's Guide: Chapter 2 I/O System Programming, pages 51 to 60
Pages 51 to 60 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 51
I/O System Programming
SPO, RPO – Set and Return Aux Output Prefix Format SPO <string>
Max length of the character string: 16
Summary Sets the string to be sent before each message is output to the RS-232 auxiliary serial port.
Returns Output Prefix, a character string of at most 16 bytes.
Description This I/O processor command allows a standard prefix to be sent to a serial device connected to the RS-232 auxiliary serial port before each line of output. This string is not sent when passthrough mode (command SPA) is set to ON. There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.
Example rem echo rem rem
Set output prefix to '123'. SPO123 > COM2 The output from the RS-232 auxiliary port now has '123' as a prefix.
2-31
Page 52
FMT1000 Series Programmer’s Guide
SSO, RSO – Set and Return Aux Output Suffix Format SSO <string>
Max length: 16
Summary Sets the string to be sent after each line is output to the RS-232 auxiliary serial port.
Returns Output suffix, a character string of at most 16 bytes.
Description This I/O processor command allows a standard suffix to be sent to a serial device connected to the RS-232 auxiliary serial port after each line of output. This string is not sent when passthrough mode (command SPA) is set to ON. There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.
Example rem echo rem rem rem rem
2-32
Set aux output suffix to '5678' SSO5678 > com2 If the string 'Hi There' is sent from the CPU with the suffix set to '5678', the message: 'Hi There5678' will be set to a serial device connected to the RS-232 auxiliary port.
Page 53
I/O System Programming
SPI, RPI – Set and Return Aux Input Prefix Format SPI <string>
Max length: 16
Summary Sets the string that will be removed from the beginning of each input message coming into the RS-232 auxiliary serial port before sending it to the CPU.
Returns Input prefix, a character string of at most 16 bytes.
Description This I/O processor command allows a standard prefix to be removed from a string of characters input from the RS-232 auxiliary serial port. This processing is not done when passthrough mode (command SPA) is set to ON. There is no factory default for this command, and it is not reset using the SFD set factory defaults command.
Example If the prefix is '1234' and the suffix is '5678' and the message: 1234Hi There5678 is received, only the string “Hi There” is forwarded to the CPU. rem echo rem echo rem rem
Set input prefix to '1234' SPI1234 > COM2 Set the input suffix to '5678' SSI5678 > COM2 Now only data found between '1234' and '5678' will be passed.
2-33
Page 54
FMT1000 Series Programmer’s Guide
SSI, RSI – Set and Return Aux Input Suffix Format SSI <string>
Max length: 16
Summary Sets the string to be removed from the end of each message input to the RS-232 auxiliary serial port.
Returns Input suffix, a character string of at most 16 bytes.
Description This I/O processor command allows a standard suffix to be removed from a message from the RS-232 auxiliary serial port. This string is not removed when passthrough mode (command SPA) is set to ON. There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.
Example rem rem rem echo echo rem rem
The prefix is '1234' and the suffix is '5678' and the message is '1234Hi There5678'. SPI1234 > COM2 SSI5678 > COM2 Only the string 'Hi There' is forwarded to the CPU.
See SPI example code, page 2-33.
2-34
Page 55
I/O System Programming
SIC – Aux Input Cancel Format SIC
Summary Cancels the current input request.
Returns N/A
Description Cancels an outstanding request for input set by the SIR set input read mode command and a read request. This command is useful when RIN returns an error status on input, and can be used as part of an error recovery routine within the program.
Example rem echo
Cancel aux input request SIC > COM2
2-35
Page 56
FMT1000 Series Programmer’s Guide
SIO, RIO – Set and Return Aux Input Timeout Format SIO <0-255>
Summary Set the length to wait for input, 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 RIN return input status command. If the delay is set to 0, the device, by definition, will never time out. This is the factory default.
Example rem echo
2-36
Set aux input timeout to 10 seconds SIO10 > COM2
Page 57
I/O System Programming
SIM, RIM – Set and Return Input String Length Format SIM <0-80>
(Factory default is 80)
Summary Sets the an exact size of the buffer allocated to receive input. This setting is preserved in EEPROM.
Returns Size of the string buffer, integer 0-80.
Description This command sets an exact expected data size for messages coming into the RS-232 auxiliary serial port.
Example rem echo rem echo rem rem rem rem rem rem
Set buffer size to 3. SIM3 > COM2 Set for continuous input. SIR1 > COM2 If the string '123456789' is received, the FMT1000 Series computers will transmit three separate messages to the CPU: '123' '456' '789'
See SIR example code, page 2-40.
2-37
Page 58
FMT1000 Series Programmer’s Guide
SII – Input Buffer Initialize Format SII
Summary Resets the auxiliary serial input buffer to empty.
Returns N/A
Description This command discards any data waiting in the RS-232 auxiliary serial port input buffer. It is useful for being sure the buffer is empty before you expect a device to begin transmitting. Because the input buffer is interrupt-driven, other data may be left over. This obviates the need to continuously read the buffer until it is empty.
Example rem echo
2-38
Initialize aux input buffer. SII > COM2
Page 59
I/O System Programming
SIB, RIB – Input Beep Enable Format SIB 0 | 1
0=OFF * 1=ON
Summary Enables or disables the beep when input is received. This setting is preserved in EEPROM.
Returns Beep Enable setting, integer 0 or 1.
Description Allows an audible indication when input is received and accepted by the FMT1000 Series computers.
Example rem echo
Set aux input beep enable to ON. SIB1 > COM2
2-39
Page 60
FMT1000 Series Programmer’s Guide
SIR, RIR – Set and Return Input Read Mode Format SIR 0 | 1
0=Single Read 1=Continuous Reads
Summary Sets the mode by which input will be accepted from the device attached to the RS-232 auxiliary serial port.
Returns N/A
Description Single input mode receives and forwards just one reading to the CPU. To enable reading another input record, the command must be reissued. There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.
Example rem echo
2-40
Set aux input read mode to single. SIR0 > COM2