Other signal modules
7.4 Position decoder module SM 338; POS-INPUT; (6ES7338-4BC01-0AB0)
S7-300 Module data
508 Manual, 06/2017, A5E00105505-AJ
Output address in Standard Mode
no output data are supported in Fast Mode.
Reading data areas
You can read the data areas in your user program using the
STEP 7
operation L PED "xyz."
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.
L PED 256 // Read encoder value in the address area for encoder
// Save encoder value to memory double word
// Freeze state for subsequent acknowledgement
L PED 230 // Read encoder value in the address area for encoder
// Save encoder value to memory double word
// Freeze state for subsequent acknowledgement
L PED 264 // Read encoder value in the address area for encoder
// Save encoder value to memory double word
// Freeze state for subsequent acknowledgement
// acknowledge (SM 338: output address 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.