Read and set INVALID BIT

Read and set INVALID BIT

Hi, I have problem in zenon logic to read and write INVALID BIT of a variable.
In particular my project is a gateway:
- it reads varaibles using an IEC850 client driver and forwards these to MASTER 870-101
Problem appears when a RTU (IEC850 server) is offline.
If IEC850 variable is read from server and directly redirected toward MASTER 101: invalid bit is correcly setted and sent to the master 101.
If IEC850 variable is read from server and copied in internal variable and this internal variable redirected to MASTER: invalid bit is not transmitted.
So I used the zenon instruction as follow:
bBit := vsiGetBit ( GB_QAT_GBIN_GGIO10_SP6_stVal_ST , 18)
where bBit is a bool variable, GB_QAT_GBIN_GGIO10_SP6_stVal_ST is 850 variable reads from server and 18 is ID of a status bit ( I have also used _VSB_I_BIT instead 18).
This instruction returns ever FALSE, also for variables not read from the server (cause RTU is offline).
I already checked in Project properties under compiler settings:
Allocate status flags for variables with embedded properties

This is a migrated post! Originally posted on 13.09.2016 by user steven.costantini. Please be aware that information can be outdated.