Bacnet Simulator Software

6 views
Skip to first unread message

Nicol Allphin

unread,
Jul 26, 2024, 2:08:44 AM7/26/24
to OTLwoodhull

Both Ignition and the simulator appear to be on the same machine, so could you change the bind port for your local device to something other than 47808 since the simulator also defaults to the same port. I typically just use 47809. Then I would suggest restarting the gateway.

java.net.BindException: Address already in use: Cannot bind at java.base/java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method) at java.base/java.net.DualStackPlainDatagramSocketImpl.bind0(Unknown Source) at java.base/java.net.AbstractPlainDatagramSocketImpl.bind(Unknown Source) at java.base/java.net.DatagramSocket.bind(Unknown Source) at com.serotonin.bacnet4j.npdu.ip.IpNetwork.initialize(IpNetwork.java:167) at com.serotonin.bacnet4j.transport.DefaultTransport.initialize(DefaultTransport.java:186) at com.serotonin.bacnet4j.LocalDevice.initialize(LocalDevice.java:317) at com.serotonin.bacnet4j.LocalDevice.initialize(LocalDevice.java:310) at com.inductiveautomation.ignition.drivers.bacnet.LocalDeviceManager.addLocalDevice(LocalDeviceManager.kt:172) at com.inductiveautomation.ignition.drivers.bacnet.LocalDeviceManager.onStartup(LocalDeviceManager.kt:65) at com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle.startup(AbstractLifecycle.java:18) at com.inductiveautomation.ignition.drivers.bacnet.BacnetModuleHook.startup(BacnetModuleHook.kt:77) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.startup(ModuleManagerImpl.java:2439) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.startup(ModuleManagerImpl.java:417) at com.inductiveautomation.ignition.gateway.IgnitionGateway.startupInternal(IgnitionGateway.java:1278) at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:298) at com.inductiveautomation.ignition.gateway.IgnitionGateway.initRedundancy(IgnitionGateway.java:735) at com.inductiveautomation.ignition.gateway.IgnitionGateway.lambda$initInternal$0(IgnitionGateway.java:669) at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:539) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

Thanks, It 's worked. I was changing the port on both simulator and local device. But NOW I just changed the port no in local device but NOT in Simulator. That made the BACnet device connection to go to INTIALIZED state. It is the final state or it will change from "Initialized" to "Running" as well. If it is, when it will change to RUNNING state.

I am working on a project to integrate a data collection product with ALC BMS system. In this situation, due to network restrictions, I cannot connect directly to the ALC system. Instead pursuing a path where a text dump from ALC will be made available containing all datapoints and values every few minutes.

Any advice would be great. I was also thinking, I could use an SNMP simulator, but the source file may require some translation to convert the object names to OIDs, but I don't know too much about this.

Now you need a process that regulary reads your text file an updates the IO objects via the WriteProperty or WritePropertyMultiple service. You can use an open source stack like or bacpypes.sourceforge.net.

PolarSoft make a simulator, BACsim, which accepts an XML file as input for the Device(s), objects, and property values. It support a virtual network with up to 255 virtual devices each with up to 255 objects.

I haven't been working with BACnet very long, so apologies if this is a bit of a naive question. I'm working on an application to communicate with a BACnet system over TCP/IP. Unfortunately I have limited access to the system the software will have to work with so I'm looking for the best way to simulate the system. I need to be able to configure the simulator to have a number of BACnet objects (device, notification class, Analog/Digital inputs/outputs etc) in order that my software can "discover" the connected objects and interact with them.

Is VTS suitable software to try and simulate a BACnet system (I get the impression it's more of a test tool for validating behaviour of a BACnet device)? If so, are there any tutorials on how to set up VTS to act in this way?

I haven't been working with BACnet very long, so apologies if this is a
bit of a naive question. I'm working on an application to communicate with
a BACnet system over TCP/IP. Unfortunately I have limited access to the
system the software will have to work with so I'm looking for the best way
to simulate the system. I need to be able to configure the simulator to
have a number of BACnet objects (device, notification class, Analog/Digital
inputs/outputs etc) in order that my software can "discover" the connected
objects and interact with them.

Is VTS suitable software to try and simulate a BACnet system (I get the
impression it's more of a test tool for validating behaviour of a BACnet
device)? If so, are there any tutorials on how to set up VTS to act in this
way?

Thanks for the response. I had seen the documents you sent, and I can see that it's possible to create a device and some objects. What I'm currently trying to do is get events working, and I'd like to be able to do the following:

You CAN use VTS to generate event notifications, either manually using the dialogs or (probably better) using a VTS script. But if you want the properties of a VTS AI to be appropriate (value, status flags, event time, event state), you will need to change them manually before sending the notification, so that if the receiver of the event reads the object it will find it in the correct state.

To get the set up right I had to research information from several different sources. I put together a spreadsheet to have all of the information in one place. Using the information in this spreadsheet you can read or write to/from your Epic to BACnet. I will share the spreadsheet at the link below in case anyone else has a similar project. Please let me know if you have any questions.

Yes, it was actually quite easy. Just have your Opto22 device (or whatever you may have running Node-RED) query the data on the chiller (with the CCN translater) using standard Modbus (RTU) nodes and do what you want with that (send to database, use in Opto program, etc.). The trickiest part was the initial configuration and making sure the Carrier technician assigned the addresses. Here is what I have from my notes (we have two chillers and are querying both via Node-RED, hence the two differen Modbus addresses).

Thanks Mikel for your response. After implementing per your valuable suggestion, the error message as shown in 3.jpg appears. Node-bacnet-contrib-extended is already installed. There is no change in function blocks/code as suggested by you earlier. Please help to read PV of Indoor temperature by fixing the error message attached herewith
319201080 331 KB

To run on the host network, the docker image must run on the host machine's subnet. Thisallows the Xrt BACnet/IP Device Service component to see any locally-connected BACnetdevices that are on the same subnet as the host machine.

In the following example command the network flag is set to host, provides the name of the running container, provides the location of the config folder, and [time_in_seconds] can optionally define the time for which Edge Xrt is to run in seconds:

In the container, interface names are set to ethx, where x is a number that is assigned based on the alphabetical order of the network names. In this example this means that xrt_bridge is set to eth0 and xrt_macvlan is set to eth1.

As we want the Device Service to communicate with BACnet devices using macvlan, we use the NetworkInterface driver and set it to eth1, as shown in the following extract from the bacnet_ip_device.json file:

Create the docker container and connect to the bridge network, using the following command where is the name of the container, provides the location of the config folder and [timeout in secs] can optionally define the timeout in seconds:

The BACnet Simulator simulates a BACnet device, which is controlled by a Lua script. The Lua script used in this example is located in the examples/device-bacnet-c/bacnet-simulatordirectory. Edge Xrt connects to the BACnet Simulator and reads events from the simulated device.

To start the BACnet Simulator, using the example Lua script with the configuration located in the examples/device-bacnet-c/configdirectory, to communicate with the Xrt Docker container, complete the following steps:

It is possible to do this but yabe does not allow you to scan on port 40960. Other bacnet browsers can do this. I use a loopback adapter with 3 ip adresses assigned to it. 1 for the simulator, 1 for Desigo CC and 1 for the BACnet browser or XWorks for diagnose purposes.

You should not use the default setting for the simulator (see atachement) and use port 40960 UDP. I my case I do have the simulator and the bacnet browser on the same computer/network. If not used on the same computer use can use a regular ethernet adapter as wel and it should work.

BACsim is the industry's first easy-to-use BACnet device simulator for Windows. BACsim runs under Windows 7/8/10 and Server 2012, and provides a robust set of basic simulator features tailored to the needs of BACnet designers and testers.

Reply all
Reply to author
Forward
0 new messages