02-23-2018 02:59 PM - last edited on 02-28-2018 03:33 PM by Kristi_Martinez
I have been learning Labview in the past months and all my knowledge have came from this site, thank you all, well this is my problem:
I did this VI to log a and plot a lot of signals (14) in real time, the acquisition in the start of the program runs very well, I verified it changing one of the granite heights sensor using my hands and instantly watching the change in the chart but after a certain time(i could not tell, it could be an hour or even half an hour) if I do the same experiment with the sensor that I mentioned before the chart takes several seconds to reflects the actual change so I figured out that after a certain time the data acquisition is suffering a delay. I have tried to reduce the Chart History Length and turning on/off the Synchronous Display option.
Thanks in advance for your help It will be very appreciated
more info:
Labview 2015 (15.0 32 bits)
I am using a NI cDAQ-9184 to get the data
The sampling frequency is 1hz (1 second)
Solved! Go to Solution.
02-23-2018 03:39 PM
Most likely the delay comes from the extremely long distances that the data has to travel between nodes on this diagram.
Seriously though, I would need 12 monitors at 1920x1080 resolution to display this block diagram.
Things like this:
or this.....
It's impossible to debug an application that looks like this. There is no defined order. There is no event structure to handle all of the button presses. Wires going backwards and on top of other wires, wires hidden behind case structures. May I suggest a state machine?
02-23-2018 03:51 PM - edited 02-23-2018 03:51 PM
I'm guessing that your massive while loop is taking longer to execute than your sample rate of the hardware. And so all of these samples are building up (rather slowing at 1S/s) in the buffer. Over time, it takes longer and longer to see the latest data on the screen. At first, the delay is very small and so you may not notice it but gradually increases as the buffer fills up.
02-23-2018 04:33 PM
Remove the wait function and your program should "work". But don't stop there.
Go grab the JKI state machine from VIPM. Everything in your code should fit within this one while loop without increasing its size. See if you can make it happen.
02-28-2018 02:08 PM
"Most likely the delay comes from the extremely long distances that the data has to travel between nodes on this diagram"
-I could not stop laughing when I read this haha.
"It's impossible to debug an application that looks like this. There is no defined order. There is no event structure to handle all of the button presses."
sorry buddy, I just started learning labview a year ago hehe, I am more an C/C++ guy so all this block block me.
"Remove the wait function and your program should "work".
-THIIIIS was the problem a looooot of thank you mate, I did not even know that delay was placed there due to my disorder mess. I have already tested and everything is ok.
"Go grab the JKI state machine from VIPM. Everything in your code should fit within this one while loop without increasing its size."
-Sorry I did not know what is JKI nor VIPM, can you explain me? thanks in advance
"See if you can make it happen."
I will 🙂
02-28-2018 02:27 PM - edited 02-28-2018 02:28 PM
VIPM is an addon manager for Labview developed by the JKI team. Its use is so widespread now that it actually ships with Labview. You can download it here. Once you get this installed, open it up and do a search for JKI state machine. Install it and you'll get a new block diagram menu group called JKI toolkits. In this menu group is a merge VI that will drop the state machine template into your block diagram. You'll want to study it for a while to figure out what is going on...run the VI in highlight execution mode, etc.