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

Summary:
I have setup a Variable tag in Citect with the following configuration:

Variable Tag Name: Motor_Start_1             Data Type: DIGITAL

I/O Device Name: CNTRLGX                        Address: N11:0/10

And in the PLC I have:

Name: N11                                                       Data Type: INT[10]

The tag is displaying correctly, but when I try to write a 1 or 0 to the tag, I get a hardware alarm, with Generic Error 3, Driver Error 0x104.

The error written to the Syslog.dat file:

Wed Dec 22 15:51:13 2004 07:12:08.742 Error: Unknown data type

WRITE 0003 PORT1_BOARD1 IODev BOOL - 'DIGIT1' 1

Generic 000003 Driver 00000260 (0x00000104)

What am I doing wrong? How do I fix this problem?

 

Solution:
As stated in the ABLOGIX documentation, you must configure the data type of the tag, to an equivalent data type to what was configured in the PLC. This may seem counter intuitive, to declare a INTEGER datatype for what is really a DIGITAL tag. So in this example we should have set the Data type of the Citect tag to INT. Once you change this, you will be able to read and write without error.

Here is what the ABLOGIX specifcation document describes:

1. A single bit of a variable

Two methods are available to read and write bits for variables.

A. If you want to read or write a single bit of a variable, such as type LONG, INT or SINT. You should form its address in this way: tagname/bit number

Eg. To read the 5th bit of the LONG (DINT) variable named "long1", your address is: long1/4, Data Type is BYTE, INT or LONG.

B. If the Data Type is DIGITAL, then the underlying variable type needs to be known by the driver. To do this the "!B16" and "!B32" suffixes must be used. 8 Bit

is the default.

E.g. To access bit 5 of int0 as a DIGITAL, "int0!B16/5". This tells the driver that the variable is in fact an INT

 

Keywords:
 

Attachments