08-07-2014 03:35 PM
I have a somewhat interesting programming task where I have the following situation: (I've attached a mac version of Labview 2013 vi)
- Using a patented (pre-made and non-modifiable) sub-vi that receives either 0 or 1 as an input and reads off a single measurement every time it receives 1 while the 0 is required to "reset" the vi to repeat a new measurement.
- I would like to repeatedly run this sub-vi in a For Loop and every "measurement" value is sent to a waveform graph to give a live (real-time) value for the graph to show.
- As it stands, I've got a vi file that simulates the measurements in a for loop but builds the values into an exuent 1-D array to get sent to a waveform graph.
- I don't know how to make a real-time graph which receives 1 DBL value at a time.
- Furthermore, I only want every 2nd value sent from the for loop, but I've already got several ideas of how to do that. I'm first concerned about the real-time goal.
Kyle Shiells
Solved! Go to Solution.
08-07-2014 03:42 PM
08-07-2014 04:50 PM
Hi Dennis,
I placed a waveform chart into my loop and it does what I need it to. I also turned it into a while loop that stops when I tell it to stop AND the total number of iterations is even (something I require also). See the revised vi if you like. I wasn't quite sure how to "discard" every second DBL value (which is infinity) as it must "go somewhere", so I made it re-send the previous value to the chart on those iterations which would sort of have the net effect of doubling the time spent per measurement data point which I could easily get back by halving the loop time. I would say you definitely answered my original question. If you can think of a better way of dealing with my infinity values I'm all ears.
thanks,
Kyle
08-07-2014 05:03 PM
08-07-2014 05:11 PM
Ah, I see: on a TRUE iteration, the DBL goes into the chart in the case structure, else The FALSE has no chart.
cheers,
Kyle