Bacnet

Hi. I have a Flexy 205 device and I need your help with it.
I don’t have a Bacnet server, but I would like to write values to a Bacnet address.
Currently, variable values are read/written from an OPC UA server (PLC) via OPC UA and also forwarded Modbus TCP and SNMP. How can I transfer this to a Bacnet address?

Let’s say you’ve configured a tag using the OPCUA IO server called TagOPCUA as well as one using the BACNET IO server called TagBACNET. You can use the Flexy’s Basic IDE with this command to change the value of TagBACNET whenever TagOPCUA changes.

ONCHANGE "TagOPCUA", "TagBACNET@ = TagOPCUA@"

The ONCHANGE command triggers code whenever a tag’s value changes. Appending a @ to the end of a tag name lets you retrieve or change its value in Basic, so this line of code sets TagBACNET to the value of TagOPCUA whenever TagOPCUA changes.

1 Like

Thank you for the answer. I have installed the Bacnet Device Simulator and I want to establish a communication with Flexy205. Unfortunately it does not work.
Can you please give me an example how it can work? My Flexy has IP address 10.250.1.100.
Can you please explain me how a TagBANET address is? I don’t understand this yet. Where can I read about this?

Information on addressing tags using the BACNET IO server can be found in section 17 of this document, around page 80: RG-0007-01 - IO Servers

TagBACNET was an example tag name. You’ll need to set up a tag in the Ewon’s tag list (Tags → Values in the web interface) that uses the BACNET IO server to poll from your BACNET device. Once you have that set up, you can edit that tag value to write back to the BACNET device. You’ll need to make sure the Flexy and BACNET device (or simulator) are in the same subnet, so if your Flexy has an IP of 10.250.1.100, probably the interface on the computer you’re connected to will also need an IP in the range of 10.250.1.X.

If that works, that means you can also update the value using Basic like with the code I shared above.