Additional Information; Host Mode Command; Serial Data Format; Ascii Format Data Transmission - Banner A-GAGE MINI-ARRAY MAC-1 Instruction Manual

Measuring light screen system
Hide thumbs Also See for A-GAGE MINI-ARRAY MAC-1:
Table of Contents

Advertisement

®
®
A-GAGE
MINI-ARRAY
Measuring Light Screen System

7 Additional Information

7.1 Host Mode Command

The MINI-ARRAY controller can communicate with a computer or PLC via either an RS-232 connection (all models) or RS-485 connection
(discrete-output models). The host can respond to output from the controller when the controller is programmed for either the
Continuous or Gate control mode.
Alternately, the host can control sensor scanning. When the Host control mode is selected, the host computer or controller initiates
scans using a command string. The command string is a three-byte message, consisting of:
Control byte with decimal value 248
Controller ID (one of 16 ASCII letters A through O, as specified in the PSF)
Scan initiation byte (ASCII letter S)
The command string is further defined, as follows:
unsigned char msg[3]; /*declare three byte unsigned character array using C language*/
msg[0]=248; /*control byte*/
msg[1]=65; /*assume the controller ID is the letter A*/
msg[2]=83; /*scan initiation byte which is the ASCII letter S*/
The host transmits this three-byte message at the defined baud rate. The format is one start bit, one stop bit, even parity, and eight
data bits. When this message is received by the MINI-ARRAY controller, the controller initiates a scan and updates its outputs as
required. The MINI-ARRAY controller then waits for the next command string.

7.2 Serial Data Format

The programmed measurement mode or modes determine the type of information that is transmitted. For example, if Meas1 is set for
FBB and Meas2 is set for LBB, then the data transmitted to the host contains the values of the first and last beam blocked.
The ALL measurement mode provides the status of all beams to the host. The VHS mode does not provide serial output data. In addition
to measurement mode information, the data transmission also contains a start string and a termination byte. The start string consists of
two unsigned character bytes:
Hex value 1C
The controller ID value
The termination byte is the ASCII character for a linefeed (hex value 0A). These three bytes are collectively called the Header.

7.3 ASCII Format Data Transmission

There are two ASCII formats. The one used depends upon which measurement modes are selected. For the ALL measurement mode,
each data byte is presented in an eight bit ASCII format which conveys the status of four consecutive channels (four consecutive beams).
Each subsequent byte conveys the status of the next four channels, until the status of all channels is reported.
The allowable data values are the ASCII numbers 0 to 9 and the ASCII letters A to F. In the table shown, the 0 represents a clear channel,
and the 1 represents a blocked channel.
The other measurement modes use three ASCII bytes to represent their values. For example, if Meas1 is FBB and Meas2 is LBB, and the
measured values are 6 and 120, and the controller ID is A, then the data string is as follows:
0x1c A 0 0 6 1 2 0 0x0a
The controller allows suppression of clear data. This means that data is sent one time when the array is completely clear (i.e., when no
beams are blocked), and no further data is sent until one or more beams is blocked.
Character
F
E
D
C
B
A
9
8
7
28
Definitions for ASCII Data Values For the ALL Measurement Mode
Ch 4
Ch 3
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
0
0
1
www.bannerengineering.com - Tel: 763.544.3164
Ch 2
Ch 1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1

Advertisement

Table of Contents
loading

Table of Contents