From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-16-2021 02:58 PM - edited 04-16-2021 03:02 PM
Hi,
I have designed the pressure vs time simple measurement program. Objective was to acquire data continuously for visualization on the front panel , as well get plotted on the waveform chart(Data vs real time) and also save the data on the notepad.
Program runs well when it start but when the pressure suddenly change or fluctuate, I wont see that change immediately on my screen (front panel), I need to wait for like few mins to see them. I have also try to reduce the wait time to 0 but still I see this lag during the variation of the pressure. any suggestion?
How can I improve this and yeah, I am using the termination character for my program.
I am using the SH68-8DB9 cables to connect my deck (NI PXle 1078). Does connecting the Rs232 cable, directly to the port will helpful?
Solved! Go to Solution.
04-16-2021 03:36 PM
Posting your VI would be better than a screenshot, if you can do that.
I would check to make sure your chart is set up properly. If the time axis is set up with an offset or something, it could be you're not seeing the most recent data live.
Another thing you could do is move the logging to file out of the loop. Either record it all at the end instead of continuous updates, or put it in a separate loop using a Queue to send the data from the top loop to the bottom.
I would also put something on the error wires for both serial connections to do something in the event of a timeout. It could be one or both of your devices are timing out occasionally, causing delays. If you are getting timeouts, you could consider changing something with the cabling setup to see if it helps, as otherwise it shouldn't matter much.
04-16-2021 03:44 PM
Hi Kyle I have enclosed the file.
04-16-2021 04:20 PM
OK, I looked at your previous posts and found one where you posted the manual for this device, and it has this in it:
So it looks like what you're doing is putting in into "continuous" mode, meaning that if you sent the VISA write just once and then ran the VISA read over and over, you'd keep getting readings because it's set to send them forever.
This is likely causing your problem, because either when you write to file it's getting behind, or one of your two devices is set to a different sample send speed than the other is. So you're never reading the most recent value.
You could try switching to this command instead:
That would probably make it act like you actually want it to.
If that doesn't give measurements fast enough and you want to use continuous mode, then you're going to have to make 3 loops, one for each device and one for file logging, to be sure that each device isn't holding the other back and that the file writing is fast enough and doesn't hold back the device reads.