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

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

Advertisement

Instructions for the USS Protocol

USS_INIT Instruction
The USS_INIT instruction 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 port 0 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.
Active indicates which drives are active. Some drives only support addresses 0 through 30.
Table 11-2
Parameters for the USS_INIT Instruction
Inputs/Outputs
Mode
Baud, Active
Done
Error
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.
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
Using the USS Protocol Library to Control a MicroMaster Drive
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
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
...
Figure 11-2 Format for the Active Drive Parameter
Network 1
LD
I0.0
EU
CALL
USS_INIT, 1, 9600, 16#00000001, M0.0, VB10
Chapter 11
LSB
3
2
1
0
D2
D1
D0
315
11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents