Forum Home › Forums › Development and Integration › BACnet KP
Tagged: Bacnet
- This topic has 14 replies, 2 voices, and was last updated 3 years, 6 months ago by Mikhail.
-
AuthorPosts
-
October 7, 2020 at 5:03 am #7373minhnt152Participant
Hi all,
I have made a BACnet KP for Rapid Scada to work with BACnet devices.
It’s support BACnet IP devices and gateway (only IPV4 and not support MSTP).
You can download the kp here
If you want to purchase the KP, please contact me at tiger.scada@gmail.com.
Any question, please post here or send me an email.Regards
October 7, 2020 at 8:49 am #7376minhnt152ParticipantOctober 7, 2020 at 12:45 pm #7383MikhailModeratorHi,
I have made a BACnet KP for Rapid Scada to work with BACnet devices.
Great!
May I ask a few questions:
1. Why do you include ScadaCommCommon.dll and ScadaData.dll into the archive? Is it possible to remove them because they are already exist in the destination directories?2. What is the pricing? Which license types are available?
3. May be it would be useful if you add version number in the archive name, e.g. KpBACnet_5.0.0.0.zip
We would be glad to publish your driver in the repository after clarifying the above questions.
October 8, 2020 at 1:34 am #7390minhnt152ParticipantDear Mikhail,
1. Why do you include ScadaCommCommon.dll and ScadaData.dll into the archive? Is it possible to remove them because they are already exist in the destination directories?
>> The ScadaCommCommon must change, because I have changed some code in the UDPTransport so it can work with BACnet, ScadaData can remove.2. What is the pricing? Which license types are available?
>> The price is 180$/license and full support in 1 years. User can run it in demo mode for 10 minutes, after 10 minutes, need to restart the communication line.3. May be it would be useful if you add version number in the archive name, e.g. KpBACnet_5.0.0.0.zip
>> OK, I will add version to it.Regards
October 8, 2020 at 1:41 am #7391minhnt152ParticipantDear Mikhail,
I have changed the archive name to KpBACnet_1.1.0.0.zip.
Regards
October 8, 2020 at 12:53 pm #7394MikhailModeratorThe ScadaCommCommon must change, because I have changed some code in the UDPTransport so it can work with BACnet, ScadaData can remove
If every driver had its own ScadaCommCommon.dll, it would be impossible to use the software. We should merge the changes if they are compatible, or the UDP implementation should be made inside the driver. Could you show what was changed in ScadaCommCommon?
Note: In the version 6, you can add new communication channels to resolve such cases easier.
October 9, 2020 at 1:49 am #7406minhnt152ParticipantDear Mikhail,
The BACnet IP is run in UDP/IP, and if there are BACnet MS/TP controllers connect to server via a BACnet gateway, all the controllers will run through a same IP address.
Your CommUdpLogic only support to process incoming data the first KPLogic, so I must change to process incoming data for all KPLogic of the IPAddress.Origin:
KPLogic kpLogic;
if (kpCallNumDict.TryGetValue(udpConn.RemoteAddress, out kpLogic))
{
// обработка входящего запроса для определённого КП
ExecProcIncomingReq(kpLogic, buf, 0, buf.Length, ref kpLogic);
}
else
{
WriteToLog(string.Format(Localization.UseRussian ?
“{0} Не удалось найти КП по IP-адресу {1}” :
“{0} Unable to find device by IP address {1}”,
CommUtils.GetNowDT(), udpConn.RemoteAddress));
}Change to:
foreach (var _kpLogic in kpCallNumDict.Where(x => x.Key == udpConn.RemoteAddress))
{
var kpLogic = _kpLogic.Value;
ExecProcIncomingReq(kpLogic, buf, 0, buf.Length, ref kpLogic);
}Regards
October 9, 2020 at 1:50 am #7407minhnt152ParticipantDear,
I also change the type of the kpCallNumDict to List
// protected Dictionary<string, KPLogic> kpCallNumDict;
protected List<KeyValuePair<string, KPLogic>> kpCallNumDict;Thanks
October 9, 2020 at 4:41 pm #7412MikhailModeratorHello,
I will analyze this and reply here.
October 12, 2020 at 9:12 am #7416MikhailModeratorHello,
If all the controllers have the same IP address, you should choose communication channel properties:
Device selection = DLL DeterminedIn this case the other branch of code works:
else // DeviceSelectionModes.ByDeviceLibrary { // обработка входящего запроса для произвольного КП KPLogic targetKP = null; ExecProcIncomingReq(firstKP, buf, 0, buf.Length, ref targetKP); }
When you override the ExecProcIncomingReq method, you should return the proper device in the targetKP variable. There is a property CommLineSvc that implements the ICommLineService interface.
By using CommLineSvc.FindKPLogic(int address, string callNum) you can find the required device.Could you use the described approach?
- This reply was modified 3 years, 6 months ago by Mikhail.
October 12, 2020 at 9:16 am #7418MikhailModeratorkpLogic = CommLineSvc.FindKPLogic(...); // decode received data here kpLogic.SetCurData(...);
October 13, 2020 at 1:54 am #7423minhnt152ParticipantHi Mikhail,
Let me check again.
Can I get the list of KP from CommLineSvc?Regards
October 13, 2020 at 11:59 am #7426MikhailModeratorHi,
You can get a list, but you can find a device (KP) by a numerical address or string address (CallNum).Could you explain, how do you detect that an UDP packet is addressed to a particular device (KP)?
October 14, 2020 at 10:09 am #7432minhnt152ParticipantHi,
It’s BACnet protocol. In the message, it contains the full address of the device (there are multiple address in one device). I found it’s difficult to locate the device only by address and callnum, because after the initialization, the address won’t appear on the packet.
Thanks
October 14, 2020 at 2:07 pm #7434MikhailModeratorHi,
Please provide an example what do you get after decoding an incoming BACnet message?
May be I should apply the suggested updates, may be not. To do this I have to be sure that they are really necessary there. -
AuthorPosts
- You must be logged in to reply to this topic.