Leuze electronic GmbH + Co. KG
MA 238
i
44
Collective mode sequence diagram
Send long online commands to the DEV, read RS 232 answer from DEV
Figure 11.1: Data transmission scheme with long online commands
11.1.3 Command Mode
One specific feature is the so-called Command mode, which is defined via the output control byte 0 (bit 0)
... and enables the control of the connected device per bit.
If the command mode is activated (command mode = 1), no data is sent by the PLC to the Leuze end
device via the gateway. The data from the MA to the PLC is transmitted in the selected operating mode
(Transparent/Collective).
With the Command mode, it is possible to set various device-specific bits in the data- or parameter field
that execute the corresponding serial commands (e.g., v, +, -, etc.). If, for example, the version of the
Leuze end device is to be queried, the corresponding bit is to be set so that a "v" is sent to the Leuze device
with the <STX> v <CR> <LF> frame.
The Leuze end device also answers the gateway with data (e.g. bar code content, NoRead, device
version, etc.) in response to most commands. The answer is immediately passed on to the PLC by the
gateway.
Activate
Collective mode
Select
function mode in
PLC via EDS file?
Save toggle bits
as process image
Reception of data
Data is transferred
and must be saved
Is there still data
in the receive buffer?
DEX = 1 set
(status bit 0.3)
Transmit the next
data with toggle bit
R
-
ACK = ! R
-
ACK
(control bit 1.0)
Confirm data retrieval with
toggle bit
R
-
ACK = ! R
-
ACK
(control bit 1.0)
No
No
Ye
Yes
Sending of data
Number < 254
Enter user data that are to
be sent into output data
words starting at Out 2
DLC = number of binary-
coded data bytes
Send data in the transmit
buffer with the
CTB = ! CTB
(control bit 1.3)
All desired data in the buf
-
fer?
*)
Command ok?
W
-
ACK = ! W
-
ACK
(control bit 0.0)
(Display!)
*)
Command ok?
W
-
ACK = ! W
-
ACK
(status bit 0.0)
(Display!)
Send data with the
SFB = ! SFB toggle bit
(control bit 1.2)
No
No
No
Yes
Yes
NOTE
The parameters available for the individual Leuze devices are listed in Chapter 16.
Command mode cannot be used with hand-held scanners.