Siemens SIMATIC ET 200S Operating Instructions Manual page 225

Technological functions
Hide thumbs Also See for SIMATIC ET 200S:
Table of Contents

Advertisement

Creating a Block and Integrating It into the Controller Program
Create block FC101 and integrate it in your control program (in OB1, for example). This
block requires the data block DB1 with a length of 16 bytes. The start address of the module
in the following example is 256.
STL
Block: FC101
Network 1: Presettings
0
L
DB1.DBD0
T
DB1.DBD4
T
Network 2: Write to the control interface
DB1.DBD0
L
PAD 256
T
DB1.DBD4
L
PAD 260
T
Network 3: Read from the feedback interface
PED 256
L
DB1.DBD8
T
PED 260
L
DB1.DBD12
T
Testing
Use Monitor/Modify Variables to monitor the encoder value and the direction indicator.
1. Select the "Block" folder in your project. Choose the "Insert > S7 Block > Variable Table"
2. Open the VAT 1 variable table, and enter the following variables in the "Address" column:
3. Choose "PLC > Connect To > Configured CPU" to switch to online.
4. Choose "Variable > Monitor" to switch to monitoring.
5. Switch the CPU to RUN mode.
6. Change the position of the SSI encoder.
Technological Functions
Operating Instructions, 02/2007, A5E00124867-05
menu command to insert the VAT 1 variable table, and then confirm with OK.
DB1.DBD8 (encoder value)
DB1.DBX12.0 (UP status)
DB1.DBX12.1 (DN status)
Description
//Delete control bits
//Write 8 bytes to the 1SSI
//Configured start address of the outputs
//Read 8 bytes from the 1SSI
//Configured start address of the inputs
1SSI
4.3 Example: Starting 1SSI
225

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents