EasyManua.ls Logo

Siemens SIMATIC MV440 - Page 278

Siemens SIMATIC MV440
424 pages
Print Icon
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)
10.4 Control with FB79
SIMATIC MV420 / SIMATIC MV440
276 Operating Instructions, 04/2013, A5E02371045-06
STL program
//Enter data ID (in principle only necessary in the first cycle)
L B#16#81 // Only result string
T QB 8
// Check number of data packet for 1
L IB 5 // Number of data packet from reader
L 1
<> I // If number does not equal 1
JC m001 // ... then there is not yet any user data
// Read user data from reader
L ID 9 // Read first 4 bytes of user data
T DB17.DBD 4 // Store in DB
L ID 13 // Read next 4 bytes of user data
T DB17.DBD 8 // Store in DB
L ID 17 // Read next 4 bytes of user data
T DB17.DBD 12 // Store in DB
L ID 21 // Read next 4 bytes of user data
T DB17.DBD 16 // Store in DB
L ID 25 // Read next 4 bytes of user data
T DB17.DBD 20 // Store in DB
L ID 29 // Read next 4 bytes of user data
T DB17.DBD 24 // Store in DB
L IW 33 // Read second last 2 bytes of user data
T DB17.DBW 28 // Store in DB
L IB 35 // Read last byte of user data
T DB17.DBB 30 / // Store in DB
// Acknowledge with no. of data packet
m001: L IB 5 // Number of data packet
T QB 5 // Send as acknowledgment to reader
BEU

Table of Contents