How to aggregate several counters

More
11 Jul 2024 02:12 #304858 by OGMaker
How to aggregate several counters was created by OGMaker
I've spent a fair bit of time searching the docs for a way to aggregate pin values into a total. This is desired as my mb2hal configuration ends up with an error count for each type of transaction. The VFD I am using is a Stepper online EV200 (Similar to a Mollum) that only supports functions 0x03 and 0x06. I have the interface working pretty well and using the QtDragonHD ui. I get one pin for modbus errors with QtDragon. I can either drop into some programming on the Qt side or use some slight of hand to aggregate all of the different transaction errors. I thought I would find an add2 component, but that doesn't seem to exist. I would really appreciate a pointer to a technique or capability to handle this. The files are in a state of flux so sorry about the lack of organization...

Thanks in advance,
Bill
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Jul 2024 02:26 #304859 by PCW
Replied by PCW on topic How to aggregate several counters
You could do it with offset or sum2 but its a bit awkward as they both
use float pins (so you would have to use the conv_u32_float and
conv_float_u32 type conversion components)

Maybe cloning sum2 and making a new component (sum2int?)
would be the cleanest way
The following user(s) said Thank You: rodw, OGMaker

Please Log in or Create an account to join the conversation.

More
16 Jul 2024 01:33 #305305 by OGMaker
Replied by OGMaker on topic How to aggregate several counters
Thanks. I played with that a bit and its seems fairly clunky so I did something far more drastic. I threw out mb2hal and setup vfdmod. That completely solved that problem but now requires I rework the hal connections. Oh well. I did try a little gtpyvcp and immediatly fell into total failure as my installation doesn't seem to the match the install instructions... Off to fire up the live image to see if I munged it or am just lost. LOL

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum