Is it possible to give an Array of flags as FB parameters?

FAQ #100724

When calling an FB, the parameters should be given as an Array of flags. On compining there is an error message: "missing fb parameters displayed".

 

Problem
The code below does not work. On compiling / linking the error message "missing FB parameters" is displayed.              
COB 0
    0
CFB 1
    
Arrayflag
ECOB

FB     1

flag1  EQU    =1

flag2  EQU    flag1+1    ;this is "= 2"

STH    flag1

STH    flag2

EFB

 

Reason
Currently it is not possible to handle arrays as FB parameters.

 

Solution

There is an easy way to do the same thing. An "array" is really a base address + an offset. So you can pass the base address to the FB, and then use the Index register as the offset:

 

Arrayflag   EQU    F [3]

...

CFB    1

Arrayflag

...

FB     1
flag1       EQU    =1

 

STH    flag1     ;same as STH Arrayflag[0]

 

SEI    K 1

STHX   flag1     ;same as STH Arrayflag[1]

SEI    K 2

STHX   flag1     ;same as STH Arrayflag[2]

         

            EFB

Categories

Local FAQ Deutschland / SEdit (IL programming)

Last update: 21.05.2015 06:03

First release: 14.06.2007 07:47

Views: 1792

The requested software / document is no longer marketed by Saia-Burgess Controls AG and without technical support. It is an older software version which can be operated only on certain now no longer commercially available products.

Download