Using USS Protocol Instructions to Communicate with Drives
11-11
S7-200 Programmable Controller System Manual
A5E00066097-02
READ_PM
The READ_PM instruction reads a drive parameter. The
READ_PM transaction completes when the MicroMaster
Drive acknowledges receipt of the command, or when an
error condition is posted. The logic scan continues to
execute while this process awaits a response.
The EN bit must be on to enable transmission of a
request, and should remain on until the DONE bit is set
signaling completion of the process. A READ_PM
request is transmitted to the MicroMaster drive on each
scan when XMT_REQ input is on. Therefore, the
XMT_REQ input should be pulsed on through an edge
detection element which causes one request to be
transmitted for each positive transition of the EN input.
The DRIVE input is the address of the MicroMaster Drive
to which the READ_PM command is to be sent. Valid
addresses of individual drives are 0 to 31.
PARM is the parameter number.
The address of a 16-byte buffer must be supplied to the DB_PTR input. This buffer
is used by the READ_PM instruction to store the results of the command issued to
the MicroMaster Drive.
When the READ_PM instruction completes, the DONE output is turned on and the
ERR output byte contains the result of executing the instruction. Table 11-6 on
page 11-16 defines the possible error conditions that may result from executing
the
instruction.
VAL is the parameter value returned.
Note
Only one READ_PM or WRITE_PM instruction can be active at a time.
Table 11-4 the operands and data types of the READ_PM subroutine.
Table 11-4 Operands and Data Types for the READ_PM Subroutine
Inputs/Outputs
Operands Data Types
XMT_REQ I, Q, M, S, SM, T, C, V, L, Power Flow conditioned by a rising edge
detection element.
BOOL
DRIVE VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD BYTE
PARM VW, IW, QW, MW, SW, SMW, LW, T, C, AIW, Constant, AC *VD, *AC,
*LD
WORD
DB_PTR &VB DWORD
DONE I, Q, M, S, SM, T, C, V, L BOOL
L
A
D
S
T
L
F
B
D
222 224
✓✓✓
221 226
✓
CALL READ_PM,
XMT_REQ,
DRIVE, PARM,
DB_PTR, DONE,
ERR, VAL
READ_PM
EN
XMT_REQ
DB_PTR
DONE
ERRDRIVE
PARM VAL