07-09-2021 03:07 AM - edited 07-09-2021 03:09 AM
Hello everyone,
I encountered a problem and could need some help.
I'm trying to monitor my equipment for the maximum continue on-time and the minimum idle-time, and display them on the waveform chart.
The original signal is an analogy sample, and I using trigger level to change it to 01 for easier to differentiate.
Hence, input is the 1D array of 0 and 1, 0 means the device is in idle-time and 1 is on-time.
Result measurement:
The figure below shows the ideal output state, the maximum continuous on-time is 7 seconds, and the minimum idle-time is 3 seconds:
I would be really grateful for some help since I'm stuck with this problem for a long time now.
Best regards,
Thomas
Solved! Go to Solution.
07-09-2021 03:29 AM
Hi Thomas,
That looks like homework to me.
Surely you can see you are looking at the area under the graph, and now you've got a rectangle you can just calculate that easily.
look in the Array pallette to find the function(s) you need. It should be obvious from the question. I'm not going to tell you the answer 😉 - that's cheating.
Then you just need to keep in memory the biggest/smallest value you've got so far and compare for a running check.
(Haven't looked at the code, question and front panel tell me enough).
James
07-11-2021 10:17 PM
Hi James,
Thanks for your response.
I'm using the "Property Node" to show up my idea layout. (as picture below)
I am new to the LabVIEW since I learn it by myself, no idea how to start the determined function when it is detected the on-state (1), calculates the idle-time (o) less than 1 sec between the on-time state, and stop if the idle-time more than 2 sec. (also start detected next states…)
Best regards,
Thomas
07-12-2021 01:52 AM
Hi Thomas,
@ThomasChen_0203 wrote:
I am new to the LabVIEW since I learn it by myself,
I hope you already found all those "Training resources" offered at the top of the LabVIEW board. Did you?
@ThomasChen_0203 wrote:
I'm trying to monitor my equipment for the maximum continue on-time and the minimum idle-time, and display them on the waveform chart.
See how far you get - these steps should bring you most part of the way! 😄
(I also think this is some kind of homework, so please do your work to learn LabVIEW on your own. We will not provide solutions, but will always give you comments on the code you will attach.)
Btw. it always helps to sketch an algorithm on a sheet of paper before starting the actual coding work!
07-23-2021 12:57 AM
Hi Gerd,
Thank you very much for your response, it is very helpful to me.
Basically, I simplified the question, because the original data is more than 60 million.
After learning and trying step by step, I succeeded.
Best Regards,
Thomas