[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[4diac-dev] Old modbus improvements and an OPC UA bugfix
|
Hi all! I hope I'm at the right place.
I made many improvements for the old Modbus implementation (I've
completely missed that you already have something new in the
making, but still, it is halted for at least a year now). It is
possible now to use multiple FBs for the same Modbus connection
and it supports coils and what not. It's still not a pretty
solution but at least it is better than it was.
I've put all my changes on Bitbucket if you want to take a look
or even take them:
https://bitbucket.org/dcihlar/forte-modbus/src/modbus-improvements/
, on "modbus-improvements" branch.
I've also found out that OPC UA thread uses 100% CPU and it
turned out to be wrong units of time. Semaphores expect us, but a
ms value is given and therefore it returns immediately:
--- a/src/com/opc_ua/opcua_local_handler.cpp
+++ b/src/com/opc_ua/opcua_local_handler.cpp
@@ -98,7 +98,7 @@ void COPC_UA_Local_Handler::run() {
timeToSleepMs = scmMinimumIterationWaitTime;
}
- mServerNeedsIteration.timedWait(static_cast<unsigned int>(timeToSleepMs));
+ mServerNeedsIteration.timedWait(static_cast<TForteUInt64>(timeToSleepMs) * 1000);
}
retVal = UA_Server_run_shutdown(mUaServer);
if(UA_STATUSCODE_GOOD == retVal) {
Anyway, I hope this will be useful to you. I'm really liking
4diac, this is some great work you're doing. But it is still
missing at least some documentation about generic FBs and things
like that. :) I figured that out only after looking through the
source code.
Best regards,
Davor Cihlar