Siemens SIMATIC ET 200eco PN Operating Instructions Manual page 193

Distributed i/o
Hide thumbs Also See for SIMATIC ET 200eco PN:
Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents