+1

Program for monitoring 330+ registers

Jürgen Jürgenson 5 years ago in bOS Configurator updated 5 years ago 3

Hey,

I'm trying to make a program that monitors 330+ modbus statuses for alarms. If any of those registers are true it should change the common alarm status. If i add just one register it works well.

Image 2419

But i don't know how to monitor them all with one program, it seems like it works with the last register only if i add them all in.

Image 2420

I also tried to make it just with IF commands and last one was else. But had same problem that it wouldn't recognize the middle statuses. Also tried to make two separate program one that turns the status off and one that turns it on, and i think they cancel themself out. 

So how would you monitor so many registers?

Regards

+1

Hi,

I know it probably sounds stupid, but would you like to test with a Scene node?


I wanted something to show if any lights are on, inside and outside. So I created 2 Scenes, one with all inside lights, the other with all outside lights.

As the scenes have a true or false status, it was pretty simple to use that status.

In your case, let me give you an example:

Create a scene with the 330+ status inside. Set them all to false. So in practice, if every status is false, the scene status will be "True", and if any of the status is true, the scene status will turn to "False". Probably you want the opposite, so you can use a task to invert the status.

This is just an alternative approach. I'm sure we can figure out another way to do this.

The only problem is that inserting vales on a scene becomes increasingly slow, after just a few dozens values... So if it's hard to work with 40 lights on a scene, I can't imagine 330+...

But I'll let you know about other approaches.

Best regards

+2

Hello again,

I tested out another approach this morning, by using Gate node, and it seems to work.

I created a Gate node, changed the type to OR, added 34 status, and when at least one of them changes, the output value of the gate changes.

You get two available objects, a value and an inverted value, so I think you can use this.

And it's way more better than the scene node...

Best regards

Hey,

Thank You! This works as it should. I was thinking about using gate too but then i had some brain-fart and i thought it wouldn't work.

Thanks again.

Regards