Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

When I use index array and then multiply each element it doesn't work

I want to read the voltage in four channels, for example. It works fine without the calibration, the graphic it perfect. However, I need to multiply each channel, so that it shows me the real value.
I used the index array and then multiplied it, but the graphic is absurd and I’ve tried everything I know!
Thanks

Download All
0 Kudos
Message 1 of 5
(2,870 Views)

I don't understand what you are doing in the for loop - the image is too small to read. To multiply every element in an array by a constant, you simply wire the array (1D or 2D) to the multiply function and a constant to the other terminal as shown in the picture. If each channel is a different constant, then the for loop still doesn't make sense. If you just wire the 2D array through the for loop, it will automatically index the array by row. Each row is a separate channel.

Message Edited by Dennis Knutson on 09-20-2006 08:40 AM

0 Kudos
Message 2 of 5
(2,859 Views)

Sorry about the small picture.
The for loop you were asking is because I’m reading the constants from an excel file and I must multiply each channel by them.

Thanks

Download All
0 Kudos
Message 3 of 5
(2,854 Views)
That's better. What is the '9' that you have wired to the for loop's count terminal? Is that supposed to be the number of channels? If it is, you don't need that. As I said if you wire the 2D array through a for loop, it will automatically auto-index the array by row. Then you don't need the index array function. Is the reading of the excel file the for loop that is below the acquisition loop? If it is, you should add some dataflow wires to ensure that this is actually done before the conversion needs it inside the while loop. As it is, there is no guarantee that this will happen.
0 Kudos
Message 4 of 5
(2,838 Views)

I made this changes, the graphic is ok now. Thanks a lot. When I took out the number 9 as  you said,  an  error  appeared.

However, I got another problem. I’m using a NI USB-6009 to get the voltage, but the variation is not linear. The calibration is working, but when I vary the tension the rms value doesn’t match with the multimeter. What should I do?

Thanks

0 Kudos
Message 5 of 5
(2,816 Views)