[?]: SCL move Array of Bool to Byte

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
marco
Posts: 2
Joined: Mon Mar 24, 2008 10:10 am
Location: Europe

[?]: SCL move Array of Bool to Byte

Post by marco »

Hi everyone

I have 2 Var
Var1: Array[0..7] of Bool;
Var2: Byte:

I how can i move a Var1 into Var2 ?
like Var2 = Var1

Thanks
pwkoller
Posts: 15
Joined: Sun Dec 04, 2005 9:06 am
Location: Europe

Post by pwkoller »

În SCL it is possible to declare variables AT another Var:

Var1: Array[0..7] of Bool;
Var2 AT Var1 : BYTE;

Now you can use the memory as you like:

Var2 = 64;
if var1[6] = True then ...

In the SCL-Editor look for help on "AT" ( Deklarieren von Sichten auf Variablenbereiche )

have a nice day!
pwk
marco
Posts: 2
Joined: Mon Mar 24, 2008 10:10 am
Location: Europe

Post by marco »

Thanks i will try