10-07-2010 02:43 PM
My goal here is to find out what the frequency of pulses from object B is given an input to object A, and not only that, but what the frequency is at a particular moment in time.
While in this example, the DAQ Assistant reads the data and will show it nicely on a time-indexed graph, the convoluted mess above is the only solution I have thus come up with to extract a specific item from that set of data. I was/am hoping there is a more elegant solution. However, I can confirm via other sources that the data from the DAQ Assistant is incorrect, possibly/probably because the DAQ units being used are on different chassis, using different counters (I've got to work with what I've got available) and won't cooperate in the same while loop.
In this example, the data being read is correct, I cannot display the result on a graph (nothing shows up, but the autoscale of the Y axis seems to work), and the VI occasionally (but not always) ends on an Error -200474: Timeout (with the signal no longer being sent to object A, I don't expect any pulses from object B). I would like to have both the graph and the value (data point) at time index, like I was getting in example one, but the correct data, as I was getting in example two.
Code for both examples is attached.
10-08-2010 02:13 AM
In this example, the data being read is correct, I cannot display the result on a graph (nothing shows up, but the autoscale of the Y axis seems to work)
Check out the acquisition mode of DAQ assistant, Its configured to 1sample (on demand) which means that graph is plotting only 1 sample (only 1 data point) which you are unable to see. Modify the settings to acquire greater samples so that a plot can be seen on the graph or use chart to plot the points which has history with it.
The terminology "object A and B" that is used is not clear and what it is pointing to (while loop or the images itself).
The second figure there is a data dependancy between 2nd while and 1st while loop. Try using standard LabVIEW Design patterns