Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

Summary:
I have upgraded my OPC driver in CitectSCADA 5.21 to the latest pre-OID version of the Driver. When I compile I get the error: "Bad IO Device variable".

I am using INI arrays, and I am sure I have got the correct format and data types configured. How do I fix this problem?

 

Solution:
In OPC driver version 1.07.02.188 support for "True Arrays" was added. In order to add this functionality, a new formatting function was required in the opc.dbf file. This formatting function (%R) resolves the UnitType to the current Unit address from the Variable.dbf file. Compiler support for this new formatting function was added in CitectSCADA 5.40. Thus, when you use OPC driver version 1.07.02.188 and later, with CitectSCADA 5.31 and earlier, the compiler does not recognise the new formatting function, and returns a "Bad IO Device variable" compile error.

You can solve this in three ways.

The first is to continue using OPC driver version 1.07.02.188 and later, and use the old version of the opc.dbf file. The limitation of this approach is that you cannot declare or use "True Arrays", Timestamp and Quality tags are also not supported.

The second option is to Upgrade your CitectSCADA version to 5.40 or greater. This will allow you to then use "True Arrays" and Timestamp and Qaulity tags.

The third option, if you do chose to continue using your current version of CitectSCADA (5.21 to 5.31) is to use OPC driver version 1.07.00.001 and earlier.

It is recommended that you use the latest version of the OPC driver. At the time of writing this document, the latest version of the OPC driver is 1.07.10.001.

 

The original OPC.dbf file looks like (version 1.07.00.001 and below):

TEMPLATE UNIT_TYPE RAW_TYPE BIT_WIDTH LOW HIGH COMMENT
%N%! 8 7 1024 0 32767 VT_BSTR
%N%! 4 2 32 0 32767 VT_R4
%N%! 3 4 32 0 32767 VT_I4
%N%! 2 1 16 0 32767 VT_I2
%N%! 17 8 8 0 32767 VT_U11
%N%!%!%*16 11 0 1 0 32767 VT_BOOL

When support for "True Arrays" was added the OPC.dbf file looks like (version 1.07.02.188):

TEMPLATE UNIT_TYPE RAW_TYPE BIT_WIDTH LOW HIGH COMMENT
%R%N+%!!A 0x20040000 2 32 0 32767 VT_ARRAY OF VT_R4
%R%N+%!!A 0x20030000 4 32 0 32767 VT_ARRAY OF VT_I4
%R%N+%!!A 0x20020000 1 16 0 32767 VT_ARRAY OF VT_I2
%N+%!!A16%*16 0x200c0000 0 1 0 32767 VT_ARRAY OF VT_BOOL
%R%N+%!!A%*16 0x200b0000 0 1 0 32767 VT_ARRAY OF VT_BOOL
%N%! 8 7 2040 0 32767 VT_BSTR
%N%! 4 2 32 0 32767 VT_R4
%N%! 3 4 32 0 32767 VT_I4
%N%! 2 1 16 0 32767 VT_I2
%N%! 17 8 8 0 32767 VT_U11
%N%!%!%*16 11 0 16 0 32767 VT_BOOL
 

Keywords:
 

Attachments