EasyManua.ls Logo

Siemens SIMATIC ET 200eco PN - Page 193

Siemens SIMATIC ET 200eco PN
275 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...
I/O device analog input/analog output
10.1 I/O device analog input
ET 200eco PN
Operating Instructions, 08/2016, A5E01250250-AJ
193
User program
The following user program shows an example for the compensation type "Dynamic
reference temperature" of channels 0 to 7 of the I/O device 8 AI RTD/TC 8xM12 of an RTD
module. The reference junction temperature of the RTD module applies to all channels of the
I/O device 8 AI RTD/TC 8xM12.
Requirements:
Input address of the I/O device 8 AI RTD/TC 8xM12: 120 (module address)
Input address of the RTD module: 136 (channel address)
Request bit for SFB "WRREC": M 20.0
Busy bit for SFB "WRREC": M 20.1
Memory for data transmission: MW 0 to MW 16
STL
Explanation
UN M 20.0
Checking the request: New Dynamic Ref. Temp.
UN M 20.1
Checking if WRREC is "Busy"
SPB END
skip if no transmission is required
U M 20.1
Checking if WRREC is "Busy"
SPB WRT
// Create memory for data transmission
L B#16#1
Transmit temperature in hundredths of a degree (Pt100 Climatic)
T MB 0
L B#16#0
Transmit temperature in Celsius
T MB 1
L PIW 136
Read in reference junction temperature of an RTD module in the plant
T MW 2
for channel 0 of the 4 AI RTD/TC
T MW 4
for channel 1 of the 4 AI RTD/TC
T MW 6
for channel 2 of the 4 AI RTD/TC
T MW 8
for channel 3 of the 4 AI RTD/TC
T MW 10
for channel 4 of the 4 AI RTD/TC
T MW 12
for channel 5 of the 4 AI RTD/TC
T MW 14
for channel 6 of the 4 AI RTD/TC
T MW 16
for channel 7 of the 4 AI RTD/TC
// Transmit the reference junction temperature to the RTD/TC
WRT :CALL "WRREC", DB53
REQ :=M20.0
Request bit for data transmission
ID :=DW#16#78
Input address 120 of the 8 AI RTD/TC
INDEX :=2
Data record number must be set to 2
LEN :=18
Length 18 bytes
DONE :=
BUSY :=M20.1
Busy bit from SFB "WRREC"
ERROR :=
STATUS :=MD24
RECORD :=P#M0.0 BYTE 18
Pointer to memory for data transmission, length 18 bytes

Table of Contents

Other manuals for Siemens SIMATIC ET 200eco PN

Related product manuals