EasyManua.ls Logo

Siemens SIMATIC ET 200AL - Page 1076

Siemens SIMATIC ET 200AL
1585 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...
Functions
5.2 Intelligent IO devices (I-devices)
PROFINET with STEP 7 V15
Function Manual, 12/2017, A5E03444486-AH
129
Programming I-device
To program the sample program for the I-device, follow these steps:
1. Using the SCL programming language, create a new function with the name
"preprocessing" in the project tree in "Program blocks" > "Add new block". Open the
function.
2. In the interface of the function "preprocessing", create the following tags:
Name
Data type
Input / output type
input 1
bool
Input
input 2 bool Input
result
bool
Output
3. In the instruction window of the function "preprocessing", write the following program
code:
#result:=#input 1&#input 2;
4. Call the function "preprocessing" in a program cycle OB, for example, in OB1.
5. Wire the function "preprocessing" in the program cycle OB as follows:
Figure 5-15 I-device sample program
Programming IO controller
To program the sample program for the IO controller, follow these steps:
1. Using the SCL programming language, create a new function with the name "further
processing" in the project tree in "Program blocks" > "Add new block". Open the function.
2. In the interface of the function "further processing", create the following tags:
Name
Data type
Input / output type
result
bool
Input
output
bool
Output
3. In the instruction window of the function "further processing", write the following program
code:
#output:=#result;

Table of Contents

Other manuals for Siemens SIMATIC ET 200AL

Related product manuals