Instructions For The Uss Protocol - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual

Instructions for the USS Protocol

USS_INIT Instruction
The USS_INIT instruction (port 0) or USS_INIT_P1 (port 1)
is used to enable and initialize, or to disable MicroMaster
Drive communications. Before any other USS instruction
can be used, the USS_INIT instruction must be executed
without errors. The instruction completes and the Done bit is
set immediately, before continuing to the next instruction.
The instruction is executed on each scan when the EN
input is on.
Execute the USS_INIT instruction only once for each
change in communications state. Use an edge detection
instruction to pulse the EN input on. To change the
initialization parameters, execute a new USS_INIT
instruction.
The value for Mode selects the communications protocol:
an input value of 1 assigns a port to USS protocol and
enables the protocol, and an input value of 0 assigns port 0
to PPI and disables the USS protocol.
Baud sets the baud rate at 1200, 2400, 4800, 9600, 19200, 38400, 57600 or 115200. Baud rates
57600 and 115200 are supported by S7-200 CPUs version 1.2 or later.
Table 11-2
Parameters for the USS_INIT Instruction
Inputs/Outputs
Mode
Baud, Active
Done
Error
Active indicates which drives are active.
Some drives only support addresses 0
through 30.
Figure 11-2 shows the description and
format of the active drive input. Any drive
that is marked as Active is automatically
polled in the background to control the
drive, collect status, and prevent serial
link time-outs in the drive.
link time-outs in the drive
Refer to Table 11-1 to compute the time
between status polls.
When the USS_INIT instruction completes, the Done output is turned on. The Error output byte
contains the result of executing the instruction. Table 11-6 defines the error conditions that could
result from executing the instruction.
Example: USS_INIT Subroutine
334
Data Type
Operands
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
DWORD
VD, ID, QD, MD, SD, SMD, LD, Constant, AC *VD, *AC, *LD
BOOL
I, Q, M, S, SM, T, C, V, L
BYTE
VB, IB, QB, MB, SB, SMB, LB, AC, *VD, *AC, *LD
Figure 11-2 Format for the Active Drive Parameter
MSB
31
30
29
28
D31
D30
D29
D0
Drive 0 active bit; 0 - - drive not active, 1 - - drive active
D1
Drive 1 active bit; 0 - - drive not active, 1 - - drive active
...
Network 1
LD
I0.0
EU
CALL
USS_INIT, 1, 9600, 16#00000001,
M0.0, VB10
LSB
3
2
1
0
D2
D1
D0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents