From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiply constant to array

trying to multiply  constant to the waveform array output to get % of the results rather than raw voltage values ...
any suggestion?
 
0 Kudos
Message 1 of 9
(8,515 Views)
Please give us some indication where on this gigantic diagram you're trying to do the math. Or simply attach a small demo VI containing your waveform and a few relevant parts of the code.
 
What is the meaning of "% of results"? "% of max" maybe?
Message 2 of 9
(8,507 Views)

It is the 'save data' case...

toward the bottom (after for loop), there are two 1-D arrays (waveform array & x offset) concatenated via build array...eventually writen in a text file...

when the file is written, there are two columns, time (with x increment) & voltage reading from the scope....I would like to multiply 100 into the voltage reading before it is written in a text file..

hope I am clear with my question.

0 Kudos
Message 3 of 9
(8,490 Views)
Well, then simply multiply the array by 100. Is this what you want?
 
 

Message Edited by altenbach on 07-20-2006 11:34 AM

Message 4 of 9
(8,481 Views)
Exactly!
I tried this before and I was keep getting an error....
I should not connect the output before I wire the both the array and constant..
 
thanks,
0 Kudos
Message 5 of 9
(8,470 Views)

well, I got an error with this VI...

once the 100 (constant) is multiplied, array output changes to 1-D...and cause a conflict passing to the 2-D input to write to the file...

 

0 Kudos
Message 6 of 9
(8,454 Views)
You changed the build array function to create a 1D array. Change it back.
0 Kudos
Message 7 of 9
(8,445 Views)
Right-click on the built-array node and uncheck "concatenate inputs". This node sometimes has a mind of it's own if you change inputs from arrays to scalars and back.
 
In this particular case, easiest would have been to simply right-click in the wire where you need to multiply and then select "insert....multiply", then add a DBL diagram constant of 100 and wire it to the remaining terminal.
Message 8 of 9
(8,439 Views)
Thank you!
0 Kudos
Message 9 of 9
(8,409 Views)