|
Re: 4Diac Forte and Bacnet [message #1817373 is a reply to message #1817317] |
Thu, 21 November 2019 11:14 |
Alexander Tepaev Messages: 3 Registered: November 2019 |
Junior Member |
|
|
Hello Niklas,
I am currently working on a bachelor's thesis which focuses on integrating BACnet into 4DIAC. I am using the BACnet stack library [1] for all of the BACnet related operations.
How to use it on your system? One possible (and the easiest) way is to use Client/Server Service FBs and to implement a new communication protocol following this page [2], which will use the functionality provided by the BACnet Stack library (see bacnet-stack/demos folder for examples). This means that for every BACnet Service Request/Object you will need a Client/Server Function block.
Another possible approach (that's the one I am implementing) is to use a number of daisy-chained service function blocks, which are responsible for setting up the communication sockets and needed BACnet objects (in case you want your 4diac app to act as a server), or configuring BACnet service requests (in case your app is a client). This approach is based on the generic I/O concept introduced in FORTE 1.9.0. ATM I am able to configure and to issue ReadProperty service. My plan is to implement the WriteProperty and COVSubscribe services for the client-side, and Analog/Binary Input/Output/Value objects for the server-side. Here, again, I am using the BACnet Stack for encoding/decoding the PDUs and managing transaction state machines.
Hope it helps :)
Regards,
Alexander Tepaev
P.S. I work at a slow but steady pace, so I cannot tell you when I am going to finish it, but If you are interested in the second approach, feel free to contact me. Any piece of feedback would be highly appreciated.
[Updated on: Thu, 21 November 2019 19:03] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: 4Diac Forte and Bacnet [message #1817626 is a reply to message #1817531] |
Tue, 26 November 2019 21:41 |
Alexander Tepaev Messages: 3 Registered: November 2019 |
Junior Member |
|
|
Hey ;)
Niklas Huhs wrote on Mon, 25 November 2019 13:39 where sendData creates and object?
If I understood you correctly and by "sendData creates an object" you mean "creates a network packet", then yeah, that is how I see it as well.
Niklas Huhs wrote on Mon, 25 November 2019 13:39 Is it right to create top, middle and bottom layer or is it possible to use existing layers from the com_infra in forte?
I remember that I put top+middle layers into one layer and I wanted to use the existing CIPComLayer class (see cominfra/ipcomlayer.[h | cpp]) as a bottom layer for managing the UDP sockets, but something stopped me from doing it and eventually everything ended up in a single layer (a layer + an external event handler for doing the sendto(...)/recv(...) thing). I can't tell you what exactly stopped me, since I don't have access to my code during weekdays, but I will be able to look at it on the coming weekend. What really helped me is to look at the implementation of supported protocols, especially HTTP and OPC_UA (forte 1.10, 'cause there is a new OPC_UA implementation in 1.11).
|
|
|
|
|
|
Re: 4Diac Forte and Bacnet [message #1818520 is a reply to message #1818486] |
Wed, 18 December 2019 12:03 |
Niklas Huhs Messages: 32 Registered: October 2019 |
Member |
|
|
No Problem. :)
I actually took another approach. Because my project will only need the write property/read property functionality, I want to implement those as Service Interface FBs where each Block creates and sends out/receives Data packets. (I used Wireshark to analyse the content of the messages being sent between BacNet devices and will simply rebuild the header/payload in the SIFB code).
Still it would be interesting to see your code.
best regards
[Updated on: Thu, 28 April 2022 11:26] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.05682 seconds