BACnet on EPIC with Codesys

Great news! Groov EPIC Firmware 1.3.2 now supports BACnet via the Codesys Runtime Engine.

I have here at my desk an EPIC that is reading the temperature from an MS/TP thermostat (Cristal Controls CCTHV-407-BAC) via a BACnet MS/TP to BACnet/IP Router (Contemporary Controls BASRT-B) using Codesys. Codesys has a great example in their Online Help that made the integration easy.

Codesys Online Help BACnet Example: https://help.codesys.com/webapp/_bacnet_using_client_fbs;product=codesys_bacnet;version=1.3.0.0

I’ve also attached my Codesys project for anyone who may be interested. If you have any questions or need help with this or anything related to EPIC, please let us know.

When working on this, I use the BACnet Browser from Cristal Controls to know the Device number, Object Type, Object Instance, and Property ID of the value I want to read or write.

Thanks!
Kyle

BACnet Test Codesys.zip (250.2 KB)

4 Likes

How do I add in the Bacnet Server in Codesys?

I’ve downloaded the Codesys BACnet package and installed in on Codesys but whenever I try to “add device” there is no bacnet to choose from. Any other steps that I miss?

Check out this KB Article: KB88123. You need to make sure you are running at least v1.3.2 of EPIC, Opto 22 Codesys Package 1.0.1.0, and have at least v14 of the Codesys Development System.

I’m struggling with this one. Maybe too many new things all at once; groov Epic, Codesys and BACnet.

I have a similar setup with a Contemporary Controls BASRouter LX connected to a Functional Devices RIBMW24B-44-BC module (MS/TP four digital ins and four relay outs)

EPIC Eth0: 192.168.128.36
BASRouterLS: 192.168.128.35
PC: 192.168.128.50
subnet: 255.255.255.0

I’m using PolarSoft BQT to determine the Device number, Object Type, Object Instance, and Property ID.

I’m trying to read the state of the first digital input channel.

Here is the device and the input I’m trying to monitor:

Here is the router address and port along with the device instance and address:

Router Name: BASRTLX-B-0212b8
Router addr: 192.168.128.50:47808
Router Instance: 100
MaxAPDU: 1476

Here is the I/O board address and port along with the device instance and address:

Board Name: RIBMW24B-44-BC
Board addr: 192.168.128.50:47808 (same as router)
Board Instance: 277001
MaxAPDU: 480
SNET: 1
SARD: 01

I’ve modified the application above and believe I’ve configure the parameters correctly; obviously not or I wouldn’t be posting this.

I changed:

InternalTemp : REAL;
to
RTMO: BOOL ;

dwTargetDeviceNumber:= 1,

objInst:= 277001,

objType:= BACnet.CmpBACnet.IEC_BACNET_OBJECT_TYPE.OBJ_ANALOG_INPUT,
to
objType:= BACnet.CmpBACnet.IEC_BACNET_OBJECT_TYPE.OBJ_BINARY_INPUT,

When the program is run, readProp.xDone always equates to FALSE.

What am I missing? BQT clearly shows everything is connected properly and communicating. But I can’t get this to work in Codesys.

Any assistance is greatly appreciated!

Thank you

We have not tested Codesys BACnet MS/TP at this time. I reached out to Codesys, and they only had sample projects using BACnet IP. I did however find an example on the Codesys Forge site:

This may be of assistance to you.

1 Like