04-24-2015 12:19 PM
I am gathering 11 channels of analog input voltage, then performing a series of (different, editable) calculations on each channel of voltage to convert each to sensor temperature.
My first stage of calculations (using multiply, subtract, and divide blocks) works fine.
My second stage of calculations (which includes a natural log "ln") is being performed with the formula block. However, the formula block has three red arrows where the input constants are, and the results of the formula block are intermittent and incorrect (if plotted, the plot just flashes what looks like a value of 1 intermittently... if saved to a csv file, the results show a bunch of zeros and then a row of values, then more zeroes).
I'm not sure if I need to be converting my dynamic data to an array before feeding into the formula, or if there's some other way applying a complex formula to dynamic data, or...? I'd like to stick with dynamic data because it makes plotting things easier, but I'm open to other suggestions.
Solved! Go to Solution.
04-24-2015 12:28 PM
The answer is very simple -- do not use Dynamic Data. I've never understood why NI created this (other than to show "how easy it is to collect data using the DAQ Assistant and Express VIs" (and not mentioning that you lose a lot of control over what you are doing). There have been numerous questions here in the Forums and a number of responders with a lot more experience than I have also made the same recommendation.
I'm not sure where the Dynamic Data arises in your case. If it is coming from the DAQ Assistant, by all means read this and get rid of that Assistant!
Bob schor
04-24-2015 01:21 PM
Is dynamic data really useless? I thought it contained a timestamp, which the array would not. I may be confusing that with the waveform data type though... it looks like splitting my waveform turns the datatype from waveform to dynamic.
04-24-2015 01:43 PM
04-24-2015 01:53 PM
04-24-2015 02:13 PM
Regarding dynamic data/waveform: if I conver either one to an array, I lose timestamp information, correct?
Regarding index array, I'm not aware of a way to seperately index every column of an array (or channel of waveform) unless I used many index array functions (one for each column), correct? (unless I used a loop).
I think my formula inputs (a0, b0, c0) are doubles, and my other input (R) is dynamic data, correct? The little "arrows" I see are right where the a0, b0, and c0 constants feed in. I'm not sure what cocoon dots are?
04-24-2015 02:27 PM
04-24-2015 02:27 PM
Converting from a waveform to a double array makes you lose time information.
Index Array can be expanded to index out as many items as you need.
He meant Coercion Dots. The spellcheck probably went to cocoon.
04-24-2015 02:29 PM
04-24-2015 02:42 PM
Thanks, that makes sense. For now I'll stick with converting to an array, it sounds like there's no good way to do natural log equations on a waverform / dynamic data.