10-03-2011 01:06 PM
I'm trying to take an array of waveforms and scale the units accordingly. I'm going to have an array of sensitivities that the user can change, and bring this into my "Scaling EUs" sub VI. I would just use LabView's "SVL Scale Voltage to EU VI", but the sensitivities of my sensors will vary on a channel by channel basis. I'm having a lot trouble building the waveform back. I believe I'm scaling the y values in my sub VI correctly. The sub VI is inside a data aquisition loop and after the DAQ MX Read. The sub VI is "Scaling EUs 32ch".
Also, when using DAQ MX Create Channel it wants the channel names to be one string of names that are comma delimitted. How would I take an array of strings and comma delimit them into one string?
Solved! Go to Solution.
10-04-2011 12:36 PM
For scaling the waveforms, I've attached to options. The first option is the least amount of code and the second option was keeping your existing structure and modifying it to do what you ask. I've also attached an example of how to use an array for channel names.
10-04-2011 01:04 PM
Thanks! Unfortunatly I am currently running 2009 SP1.
10-04-2011 01:48 PM
Here they are in 2009.
10-04-2011 02:09 PM
Those answers are great! I really appreciate it. I don't do much Labview code, and struggle on some of the simplest things. On your simpler version of "Scaling EUs", why is it that you can just divide the waveform by an array? How does it know not to do anything with the To and dT? Does the waveform data look like this: (To, dT, wf#1 ys, wf#2 ys, wf#3 ys, etc...)?
10-05-2011 07:46 AM
Each waveform in the array can have a unique T0 and dt so an array of waveform data would actually be ([T0, dt, Y], [T0, dt, Y], [T0, dt, Y], ...). Any time you do math on a waveform it will only affect the y-data. If you want to do math on t0 or dt, you would have to unbundle those elements, do the math, and then rebundle.