Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logic Server bad events
#1
I have an any value change trigger on one of my logic server fields.

Recently I have noticed that pausing and resuming *any* driver on my system will cause the logic server to spit out a bogus event which causes my event handler to throw an exception.

Code:
EvID=0AC3AC054CBE1119-D2201C721B13A66A
cqsl.header
{
   v=1
   sysid=747AB624337F73FA-2FC92546E3382BF8
   class=cqsl.fldchange
   source=cqsl.field:Logic.FZLibraryState
}
cqsl.fldval
{
   val=-2147483648
}

EvID=0AC3AC054CBE1119-D2201C721B13A76A
cqsl.header
{
   v=1
   sysid=747AB624337F73FA-2FC92546E3382BF8
   class=cqsl.fldchange
   source=cqsl.field:Logic.FZLibraryState
}
cqsl.fldval
{
   val=40
}
 The bogus event is immediately followed by a legit event, so it fixes itself, but it seems like a bug somewhere.

The FZLibraryState field is defined at an Int4, but the val that comes out -2147483648 cannot be converted to an Int4 thus throwing an exception in my event handler.
Code:
10/14 21:50:43-HARTFORD, CQCEventSrv, CQCEventWorkerThread0
{
   CIDLib, CIDLib_String.cpp.4727, Failed/Bad Parms, Error: 3263/0/0
   Could not convert '-2147483648' to binary value of type 'tCIDLib::TInt4'
     <CQCEventSrv> CQCEventSrv_ThisFacility.cpp - 2215

}
My logic configuration is as follows
1 FurnaceC.S1Z2_HeatSetpoint
2 FurnaceC.S1Z2_RoomTemp
3 FurnaceC.S1Z2_CoolSetpoint
((100.0 * ToFloat(%(2) - %(1)) / ToFloat(%(3) - %(1))))


I'm guessing the LogicServer gets pinged that all fields have changed, and then does its calculation before the fields have stable values and thus produces the bogus value somehow.

This problem seems to happen more than 50% of the time I resume a driver, but it is not 100%.

--Bob (5.3.2)
Reply
#2
I'm sure that's probably it, and why it's sometimes but not others, in that it's a timing thing so there's room to go either way. I'll take a look at it.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Migrating to New Server gReatAutomation 1 75 06-12-2020, 05:40 PM
Last Post: Dean Roddey
  Global Variables in the Event Server context lleo 1 134 05-16-2020, 11:21 AM
Last Post: Dean Roddey
  Is there a way to change the listening port for the CQC server? ghurty 3 197 04-23-2020, 05:54 PM
Last Post: Dean Roddey
  CQC HTTP Events? bjkiller 26 3,631 01-11-2020, 07:27 AM
Last Post: simplextech
  Hosted CQC server - Latency zra 4 607 01-06-2020, 05:24 AM
Last Post: zra
  Scheduled Events Caseta tom 18 1,768 12-22-2019, 07:06 AM
Last Post: Dean Roddey
  CQC Server Closing Connection gReatAutomation 1 369 12-19-2019, 01:53 PM
Last Post: Dean Roddey
  Editing Triggered Events Possibly Causing Kernel Panic/Crash gReatAutomation 6 759 11-08-2019, 01:10 PM
Last Post: Dean Roddey
  Possible Bug with Triggered Events gReatAutomation 3 561 09-19-2019, 02:41 PM
Last Post: gReatAutomation
  Moving the CQSL server Dean Roddey 28 2,568 09-03-2019, 05:27 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)