Siemens Simatic S7-200 System Manual page 295

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Understanding the Command Byte for the Position Module
The Position module provides one byte of discrete outputs which is used as the command byte.
Figure 9-22 shows the command byte definition. Table 9-18 shows the Command_code definitions.
A write to the command byte where the R bit
changes from 0 to 1 is interpreted by the module
as a new command.
If the module detects a transition to idle (R bit
changes state to 0) while a command is active,
then the operation in progress is aborted and, if a
motion is in progress, then a decelerated stop is
performed.
After an operation has completed, the module must see a transition to idle before a new command is
accepted. If an operation is aborted, then the module must complete any deceleration before a new
command is accepted. Any change in the Command_code value while a command is active is ignored.
The response of the Position module to a
change in the operating mode of the S7-200 or
to a fault condition is governed by the effect that
the S7-200 exerts over the discrete outputs
according to the existing definition of the
S7-200 function:
-
If the S7-200 changes from STOP to
RUN: The program in the S7-200
controls the operation of the Position
module.
-
If the S7-200 changes from RUN to
STOP: You can select the state that the
discrete outputs are to go to on a
transition to STOP or that the outputs are
to retain their last state.
– If the R bit is turned off when going
to STOP: The Position module
decelerates any motion in
progress to a stop
– If the R bit is turned on when going to STOP: The Position module completes any command
that is in progress. If no command is in progress, the Position module executes the command
which is specified by the Command_code bits.
– If the R bit is held in its last state: The Position module completes any motion in progress.
-
If the S7-200 detects a fatal error and turns off all discrete outputs: The Position module decelerates
any motion in progress to a stop.
The Position module implements a watchdog timer that turns the outputs off if communications with the
S7-200 are lost. If the output watchdog timer expires, the Position module decelerates any motion in
progress to a stop.
If a fatal error in the hardware or firmware of the module is detected, the Position module sets the P0, P1,
DIS and CLR outputs to the inactive state.
Creating a Program for the Position Module
MSB
7
6
5
4
QBx
R
Command_code
R
0 =
Idle
1 =
Execute the command specified
in Command_code (See Table 9-18)
Figure 9-22 Definition of the Command Byte
Table 9-18
Command_code Definitions
Command_code
Command
000 0000 to
0 to
Execute motion specified in
000 1111
24
Profile Blocks 0 to 24
100 0000 to
25 to
Reserved
111 0101
117
(Error if specified)
111 0110
118
Activate the DIS output
111 0111
119
Deactivate the DIS output
111 1000
120
Pulse the CLR output
111 1001
121
Reload current position
111 1010
122
Execute motion specified in the
Interactive Block
111 1011
123
Capture reference point offset
111 1100
124
Jog positive rotation
111 1101
125
Jog negative rotation
111 1110
126
Seek to reference point position
111 1111
127
Reload configuration
Chapter 9
LSB
3
2
1
0
283
9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents