02-25-2020 03:39 AM
Hello All,
I need to detect if there is some interuption in cluster.
Another words...
I have cluster with lot of data, which are frames on some bus.
When there is a some interuption arrays/data go gray.
This is all ok.
I need to detect when some data start to flashing. In the moment when i got missing data, some indication (true/false) should appear.
Unfortunately i am not able to send you VI, but i created small video to see what happpened.
I will be nice if someone have idea how to detect this occurence.
Thank you.
02-25-2020 03:51 AM
It's not entirely clear what you mean. Or rather, it's entirely unclear what you mean.
When arrays go gray, the are empty. So you can check that with Empty Array? function.
You can show\hide controls with the Visible property node.
So, read the Empty Array? state, invert it (with a Not function) and set the Visible property of the control you want to show\hide.
If you can post the code, make a VI that demonstrates the problem. Get a solution, and implement it in the real code...
02-25-2020 10:19 AM
Does whatever you're receiving the data from have a "timeout" output, or provide an error that you could check when reading the data?
If you're reading multiple elements, check that you're expecting a specific number - reading "-1" elements will in many cases return empty arrays when no data is available, but not give an error or timeout value (even if you set a finite timeout value).
If you want to read all available elements, some APIs (and we don't know what you're using yet) allow you to read 0 elements and return the number of remaining elements, or allow you to check the number of available elements, and you could use that in a finite, multiple element read immediately afterwards.