Communication processor and Modbus TCP
13.4 Universal serial interface (USS) communication
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1153
USS instructions
13.4.3.1
USS_Port_Scan (Edit communication using USS network)
Table 13- 42 USS_Port_Scan instruction
PORT:=_uint_in_,
BAUD:=_dint_in_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
The USS_Port_Scan instruction handles communica-
tion over a USS network.
Table 13- 43 Data types for the parameters
PORT IN Port After you install and configure a CM or CB communication device, the
port identifier appears in the parameter helper drop-list available at the
PORT box connection. The assigned CM or CB port value is the device
configuration property "hardware identifier". The port symbolic name is
assigned in the "System constants" tab of the PLC tag table.
The baud rate used for USS communication.
USS_DB INOUT USS_BASE The name of the instance DB that is created and initialized when a
USS_Drive_Control instruction is placed in your program.
ERROR OUT Bool When true, this output indicates that an error has occurred and the
STATUS OUT Word The status value of the request indicates the result of the scan or initiali-
zation. Additional information is available in the "USS_Extended_Error"
variable for some status codes.
Typically, there is only one USS_Port_Scan instruction per PtP communication port in the
program, and each call of this Function Block (FB) handles a transmission to or from a single
drive. All USS functions associated with one USS network and PtP communication port must
use the same instance DB.
Your program must execute the USS_Port_Scan instruction often enough to prevent drive
timeouts. USS_Port_Scan is usually called from a cyclic interrupt OB to prevent drive
timeouts and keep the most recent USS data updates available for USS_Drive_Control calls.
Note
When using the USS protocol library and the USS_Port_Scan instruction with a CB 1241,
you must set the LINE_PRE data block tag to a value of 0 (No initial state). The default value
of 2 for the LINE_PRE data block tag results
in an error value of 16#81AB being returned by
the USS_Port_Scan instruction. The LINE_PRE data block tag is found in the data block
associated with the USS_Port_Scan instruction (usually named USS_Port_Scan_DB).
Ensure the start value of LINE_PRE is cha
nged to a 0 (zero).