Siemens SIMATIC S7-300 Manual page 398

Automation system, module data
Hide thumbs Also See for SIMATIC S7-300:
Table of Contents

Advertisement

Other signal modules
7.4 Position decoder module SM 338; POS-INPUT; (6ES7338-4BC01-0AB0)
Reading data areas
You can read the data areas in your user program using the
Example of access to encoder values and use of the freeze function
You want to read and evaluate the values at the encoder inputs. The module start address is
256.
STL
L
PED
256
T
MD
100
V
M
100.7
=
M
99.0
L
PED
230
T
MD
104
V
M
104.7
=
M
99.1
L
PED
264
T
MD
108
V
M
108.7
=
M
99.2
L
MB
99
T
POB
256
You can then process the encoder values from the bit memory address areas MD 100, MD
104 and MD 108. The encoder value is set in bits 0 to 30 of the memory double word.
7-18
Explanation
//
Read encoder value in the address area for encoder input 0
//
Save encoder value to memory double word
//
Freeze state for subsequent acknowledgement
//
determine and save
//
Read encoder value in the address area for encoder input 1
//
Save encoder value to memory double word
//
Freeze state for subsequent acknowledgement
//
determine and save
//
Read encoder value in the address area for encoder input 2
//
Save encoder value to memory double word
//
Freeze state for subsequent acknowledgement
//
determine and save
//
Load freeze state and
//
acknowledge (SM 338: output address 256)
STEP 7
operation L PED "xyz."
S7-300 Automation System Module data
Manual, 08/2006, A5E00105505-04

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents