[SOLVED] BACnet, OPC-UA and booleans!

Hi!

We have a test setup, where an Ignition 8.x talks to an OPC-UA server (TANI Industries), which talk to some BACnet devices.

Everything appears functional, with only one anomaly: the tags that are set as boolean on the devices, are detected and made available by Ignition, and work correctly when reading. When writing, this happens:

  • From Designer, Tag Brower, the tags returns an error (Write failed: Bad). Whether the tags type is set to “long” (the default with which Ignition detects them), or if it is forced to “boolean”, makes no difference.

  • From Ignition, using the OPC Quick Client, the write operation on the tags returns an error (Write failed: Bad).

  • Again with the OPC Quick Client, however, by writing directly on the “present-value” property, the operation is successful (both with 1/0 and with true/false).

The last two operations, performed directly on the OPC server through its debugging tools, both work correctly, no matter if we write to the tags, or to the “present-value” property.

We also tried to force the path of the OPC tag in the Designer, adding the “.present-value” attribute, the result is partial: they can be set to false / 0, but not to true / 1!

Any suggestion on what we are possibly doing wrong, or where to investigate further?

Thanks! :slight_smile:

Francesco P.

It might help to set up the OPC UA connection to this server with no security and then get a Wireshark capture of these various write attempts going through.

It would also be interesting to see if a 3rd party UA client like UaExpert has the same issues writing to the same tags. You should also capture this on Wireshark.

From there we can compare and maybe see if there’s something wrong on our side or if you need to get in touch with TANI support instead.

Hi,

here you can find the capture files (I can not upload here): https://cloud.oscr.it/index.php/s/JSSSiMydYHt5DB5

They are in some variant: from Ignition Quick OPC Client, one with the failure (trying to write directly to the tag, both “0” and “false”), and one with the success (writing to the “present-value” attribute).

Then there is one, only with failure, using UaExpert.

All captures have both the Ignition <-> OPC and the OPC <-> BACnet traffic, which happens on different interfaces.

Hope you can shred some light on this obscure matter, thanks for answering! :slight_smile:

In the failed capture the write request from Ignition is the same but the server returns StatusCode Bad_DeviceFailure instead of Good.

The writes are different at the BACnet level:

Good:

Bad:

I believe this is happening because in the first (successful) write you are writing to NodeId PLC Fabbro.Lampada on/off - comando.present-value and in the second (failed) write you are writing to PLC Fabbro.Lampada on/off - comando. Note the lack of “present-value” suffix specifying the BACnet property.

It was a bug in the Tani OPC-UA server, that has been fixed!

Thanks for the help. :slight_smile: