06-03-2013 09:16 AM
Hi Guys.
So, i found the root of my problem, is the following: My data acquisition (Agilent 34970A) read all the 60 channels in a time interval of 3 seconds. But plot the graph in one in one seconds. So i need a logic to plot the graph in five in five seconds.
06-03-2013 10:53 AM
I don't think you need any logic. Just read and chart the data only every 5 seconds.
I don't understand how it can take 3 seconds to read the data but you still chart the data ever second? Seems like you have a race condition due to broken data dependency.
Can you show us your newest code?
06-03-2013 11:29 AM - edited 06-03-2013 11:35 AM
I am reading the data in every 5 seconds, but the chart plots the data as if it was read every 1 second.
It take on each 3 seconds because a technical limitation of equipment. It´s de minimum time to read all channels together 😕
The code continues same.
06-03-2013 11:35 AM
@Kossmann wrote:
I am reading the data in every 5 seconds, but the chart plots the data as if it was read every 1 second.
Does the chart (1) update every second or does it (2) update every 5 seconds, but the markers are just labeled wrong?
06-03-2013 11:42 AM
06-03-2013 12:56 PM - edited 06-03-2013 01:30 PM
So why do you set the multiplier to 1 if it should be 5? And why do you set it again and again with every iterations instead of once at the beginning of the program?
Your code still has other glaring mistakes. Why do you write to a terminal and its local varaible in parallel? Both operations have the same effect and only one is needed. Also, "index array" is resizeable. (See also)
06-05-2013 01:46 PM - edited 06-05-2013 01:47 PM
Guys, I solved my problem, running waveform chart in a while structure, parallels main code.
06-05-2013 02:25 PM
What does that mean?
Are you now asynchonously updating the chart at a higher rate with mostly stale data? Wy did you not simply set the mutiplier to the correct value?