EasyManua.ls Logo

Siemens SIMATIC MV540 H - Page 137

Siemens SIMATIC MV540 H
238 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
SIMATIC MV500
Operating Instructions, 06/2018, C79000-G8976-C494-01
137
STL program
Table 9- 42 Structure of the STL program
//Enter data ID (in principle only necessary in the first cycle)
L
B#16#81
// Only result string
T AB 8
// Check number of data packet for 1
L
EB 5
// No. of the data packet from the optical reader
L
1
<>
I
// If no. ≠ 1
SPB
m001
// ... user data is not available yet
// Import user data from the optical reader
L
ED 9
// Read first 4 bytes of user data
T
DB17.DBD 4
// Store in DB
L
ED 13
// Read next 4 bytes of user data
T
DB17.DBD 8
// Store in DB
L
ED 17
// Read next 4 bytes of user data
T
DB17.DBD 12
// Store in DB
L
ED 21
// Read next 4 bytes of user data
T DB17.DBD 16 // Store in DB
L
ED 25
// Read next 4 bytes of user data
T
DB17.DBD 20
// Store in DB
L
ED 29
// Read next 4 bytes of user data
T
DB17.DBD 24
// Store in DB
L
EW 33
// Read second last 2 bytes of user data
T
DB17.DBW 28
// Store in DB
L
EB 35
// Read last byte of user data
T
DB17.DBB 30 /
// Store in DB
// Acknowledge with no. of data packet
m001:
L
EB 5
// Number of data packet
T
AB 5
// Send as acknowledgment to optical reader
BEA

Table of Contents

Related product manuals