Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 8 of 15

FMT1000 Series Programmer's Guide: Chapter 2 I/O System Programming, pages 71 to 80

Pages 71 to 80 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 71

I/O System Programming

Digital I/O and Counter Commands FMT1000 Series computers have two digital inputs and two digital outputs. These are often used for such applications as access control and machine monitoring. The first set of commands configure the response format, defined earlier as the format of messages from the coprocessor to the CPU, in this case for digital I/O commands. Command

Description

Pg.#

SDT, RDT

Set and Return Digital I/O Response Tag

2-54

SDP, RDP

Set and Return Digital I/O Response Prefix

2-55

SDS, RDS

Set and Return Digital I/O Response Suffix

2-56

SED, RED

Set and Return Digital I/O Response AutoEnter Mode 2-57

SRD, RRD

Set and Return Digital I/O Response Path

2-58

The digital inputs may be used in four ways: • The state of an input may simply be sensed as active or not active. • A change of state on an input can result in a user-defined string’s being sent to the user's application. • The input may be used as a counter that may be read on demand. • A counter-match value may be set, resulting in a user-defined string’s being sent to the user's application. The following commands configure the input modes. Note that defining some parameters activates the corresponding feature. For example, setting a Response String puts that input into state change detection mode. Also, note that the inputs are always counting and that reading and resetting the counters can be done at any time, without previously enabling count mode. The counters have a 32-bit capacity, with a 20-Hz bandwidth. No input conditioning is done, so the counters should be driven only with waveforms that have clean, sharp transitions.

2-51

Page 72

FMT1000 Series Programmer’s Guide

Note: The terminology on and off is used in regard to digital inputs. The actual inputs are optical isolators. On means that current is flowing through the isolator, and off means that no current is flowing. Also, the input circuit inverts the signal so an input that is on will return a 0 (zero). Command

Description

Pg.#

RS1, RS2

Return State of Input No. 1 or No. 2

2-60

SR1, SR2

Reset Counter No. 1 or No. 2

2-61

RE1, RE2

Read Counter No. 1 or No. 2

2-62

RR1, RR2

Read and Reset Counter No. 1 or No. 2

2-63

SI1, RI1, SI2, RI2

Set and Return Input No. 1 or No. 2 Response String

2-59

SM1, RM1, SM2, RM2

Set and Return Counter No. 1 or No. 2 Match String

2-64

S1M, R1M, S2M, R2M

Set and Return Counter No. 1 or No. 2 Response String 2-65

Similarly, the digital outputs can be used in two different ways, all controlled by values passed to the same command. They can be activated or not, or they can be set first to activate and then to deactivate a fixed time later. This latter mode is useful for door solenoid control and other such applications, where this capability eliminates the need for the user application to time the activation/deactivation (often difficult under DOS unless nothing else is going on). The digital output control command is: Command

Description

ST1, RT1, ST2, RT2 Set and Return Momentary Timeout for Output No. 1 and No. 2

Note: Activated and deactivated are used in reference to the digital outputs, since they are connected to relays that have both normally open and normally closed contacts. This renders the conventional usage of ON and OFF somewhat confusing. In all cases activated means that the relay coil has power applied, and deactivated means the inverse. 2-52

Pg.# 2-66

Page 73

I/O System Programming

One other digital I/O command is used: Command

Description

Pg.#

SDE, RDE

Set and Return Digital I/O Line Enable

2-67

This command enables or disables the transmission of digital I/O response if the FMT1000 Series computer is programmed for change-of-state detection.

2-53

Page 74

FMT1000 Series Programmer’s Guide

SDT, RDT – Set and Return Digital I/O Response Tag Format SDT <string>

Length: 1

Summary Sets a unique ID tag to prefix input from the digital I/O lines.

Returns Digital I/O tag, 1 character

Description The I/O processor can route input via several devices. On occasion, input from several physical devices may be routed to the same system input port. For example, both the RS-232 auxiliary port and the digital I/O can send their data to the keyboard buffer. This tag applies to input automatically generated by the change-of-state function (SI1, SI2) and the counter-match function (SM1, SM2). This tag is a prefix which is added to the input from a given physical device to identify the source of the input.

Example rem echo rem rem echo rem rem rem

2-54

Set digital I/O response tag to 'D'. SDTD > COM2 Set input #1 Response String to 'Input #1 Changed' SI1Input #1 Changed > COM2 If input #1 changes state, the string 'DInput #1 Changed' will be sent to the CPU.

Page 75

I/O System Programming

SDP, RDP – Set and Return Digital I/O Response Prefix Format SDP <string>

Max length: 16

Summary Sets the string to be prepended before each response containing data from the digital I/O.

Returns Response Prefix, string of at most 16 bytes.

Description This I/O processor command allows a standard prefix to be added to the response to a string of characters input from or output to the digital I/O lines. This applies to input automatically generated by the change-of-state function (SI1, SI2) or the counter-match function (SM1, SM2). There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.

Example rem rem echo rem rem echo rem rem rem

Set digital I/O response prefix to 'prefix_'. SDPprefix_ > COM2 Set input #1 response string to 'Input #1 Changed'. SI1Input #1 Changed > COM2 If input #1 changes state, the string 'prefix_Input #1 Changed' will be forwarded to the CPU.

2-55

Page 76

FMT1000 Series Programmer’s Guide

SDS, RDS – Set and Return Digital I/O Response Suffix Format SDS <string>

Max length: 16

Summary Sets the string to be appended to the response to each input from the digital I/O lines.

Returns Response suffix, string of at most 16 bytes.

Description This I/O processor command allows a standard suffix to be sent after the response to an input change of state, but before the termination string specified by the autoenter mode, if any. This suffix applies to input automatically generated by the change-of-state function (SI1, SI2) and the counter-match function (SM1, SM2). There is no factory default for this command, and it will not be reset using the SFD set factory defaults command.

Example rem rem echo rem rem echo rem rem rem

2-56

Set digital I/O response suffix to '_suffix'. SDS_suffix > COM2 Set input #1 response string to 'Input #1 Changed'. SI1Input #1 Changed > COM2 If input #1 changes state, the string 'Input #1 Changed_suffix' will be forwarded to the CPU.

Page 77

I/O System Programming

SED, RED – Set and Return Digital I/O Response AutoEnter Mode Format SED <0-3>

0=Off * 1=CR (carriage return) 2=CR/LF (carriage return/line feed) 3=Tab

Summary Sets the type of terminating characters for data input via the digital I/O lines. This setting is preserved in EEPROM.

Returns AutoEnter mode flag, integer 0-3.

Description This mode sets the character(s) transmitted to the host CPU after the data input from the digital I/O. This mode applies to input automatically generated by the change-of-state function (SI1, SI2) and the counter-match function (SM1, SM2). For most ordinary I/O, carriage return would be appropriate, but Tab might be used if entering data into a multifield screen.

Example rem rem echo

Set digital I/O response autoenter mode to <CR>. SED1 > COM2

2-57

Page 78

FMT1000 Series Programmer’s Guide

SRD, RRD – Set and Return Digital I/O Response Path Format SRD 0 | 1

0=Keyboard * 1=COM2 host port

Summary Sets the digital I/O input path to the keyboard or the host serial port COM2. This setting is preserved in EEPROM.

Returns Response path flag, integer 0 or 1.

Description The data from the digital I/O can be used to simulate input from the keyboard, or it can be transmitted to the host communications port COM2. This path applies to input automatically generated by the change-of-state function (SI1, SI2) and the counter-match function (SM1, SM2). The advantage to the keyboard input is that no special programming is required to receive the data. However, keyboard input is slower due to the limitations of keyboard input speed. The factory default is keyboard simulation input.

Example rem rem echo

2-58

Set digital I/O response path to COM2 host port. SRD1 > COM2

Page 79

I/O System Programming

SI1, RI1, SI2, RI2 – Set and Return Input No. 1 or No. 2 Response String Format SI1 <string> SI2 <string> RI1 RI2

Max String Length: 80

Summary Sets or returns the string sent to the CPU when an OFF to ON change of state occurs on a digital input.

Returns The response string, if any.

Description This command is used to set a response string that is sent to the CPU, with normal response format processing, in response to an OFF to ON change of state of the designated input. This may be used to detect such events as door openings without having to continuously monitor the state of the input. Note: Setting the response string enables the change-ofstate detection mode; to disable it, define the response string as empty. Also, note that only a change from off to on is reported.

Example rem echo rem rem

Set input #1 response string. SI1DOOR OPEN! > COM2 If input #1 changes state, the string: 'DOOR OPEN!' will be forwarded to the CPU.

2-59

Page 80

FMT1000 Series Programmer’s Guide

RS1, RS2 – Return State of Input No. 1 or No. 2 Format RS1 RS2

Summary Returns the binary state of digital input No. 1 or No. 2.

Returns String, 0 or 1 1=Off, no current flowing through opto-isolation. 0=On, current is flowing through opto-isolation.

Description This command is used to read the current state of digital input No. 1 or No. 2.

Example rem echo rem

2-60

Read input #1. RS1 > COM2 The return string will be '0' or '1'.