EasyManua.ls Logo

Siemens S7-1200 - Page 187

Siemens S7-1200
1028 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...
Programming concepts
6.5 Programming language
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
187
POKE_BOOL(area:=_in_,
dbNumber:=_in_,
byteOffset:=_in_,
bitOffset:=_in_,
value:=_in_);
Write
s the Boolean value to the referenced
bitOffset and byteOffset of the referenced
data block, I/O or memory area
Example:
POKE_BOOL(area:=16#84, dbNumber:=2,
byteOffset:=3, bitOffset:=5,
value:=0);
POKE_BLK(area_src:=_in_,
dbNumber_src:=_in_,
byteOffset_src:=_in_,
area_dest:=_in_,
dbNumber_dest:=_in_,
byteOffset_dest:=_in_,
count:=_in_);
Writes "count" number of bytes starting at the
referenced byte Offset of the referenced
source data block, I/O o
r memory area to the
referenced byteOffset of the referenced
destination data block, I/O or memory area
Example:
POKE_BLK(area_src:=16#84,
dbNumber_src:=#src_db,
byteOffset_src:=#src_byte,
area_dest:=16#84,
dbNumber_dest:=#src_db,
byteOffset_dest:=#src_by
te,
count:=10);
For PEEK and POKE instructions, the following values for the "area", "area_src" and
"area_dest" parameters are applicable. For areas other than data blocks, the dbNumber
parameter must be 0.
16#81
I
16#82
Q
16#83
M
16#84
DB
Calling other code blocks from your SCL program
To call another code block in your user program, simply enter the name (or absolute
address) of the FB or FC with the parameters. For an FB, you must provide the instance DB
to be called with the FB.
<DB name> (Parameter list)
Call as a single instance
<#Instance name> (Parameter list)
Call as multi-instance
"MyDB"(MyInput:=10, MyInOut:="Tag1");
<FC name> (Parameter list)
Standard call
<Operand>:=<FC name> (Parameter list)
Call in an expression
"MyFC"(MyInput:=10, MyInOut:="Tag1");
You can also drag blocks from the navigation tree to the SCL program editor, and complete
the parameter assignment.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals