LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to multiply the content of an array by a constant numeric.

Solved!
Go to solution

Hi,

 

I am using Universal library to read a voltage from a DAQ device, and it seems the reading function is putting it into an 1-D array then into a graph.

I need to get this voltage and multiply by a number and could not do that as it is in array format.

How would I be able to multiply the array content by a constant numeric?

 

Thanks

0 Kudos
Message 1 of 11
(3,474 Views)

The standard multiply function does this. Wire the array into one input and the numeric value into the other.

multiply array.png

Message 2 of 11
(3,471 Views)

Hi,

Thanks for the reply, did not work, I have attached an image illustrating it.

0 Kudos
Message 3 of 11
(3,430 Views)

That image shows nothing about your problem. It simply shows a 1D waveform array being output. That can be multiplied by a constant as previously explained, so just go ahead and do it.

0 Kudos
Message 4 of 11
(3,424 Views)

Hi,

 

I did and showed broken connection, see image.

0 Kudos
Message 5 of 11
(3,413 Views)
Solution
Accepted by topic author Fadi3

When you are trying to multiply the value you have to take the value from the waveform as shown below else while reading the value itself you could have chosen 1D double instead of waveform.

 

Example.png

 

 

Example 1.PNG

 

Good Luck

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 11
(3,410 Views)

Hi,

 

You are a star P Anand, that what I am looking for, how to specify the output from the UL.function.

I am new to Labview and to UL.

Thanks everybody for replying really appreciate your help.

0 Kudos
Message 7 of 11
(3,404 Views)

Using the Get Waveform Component is just absolutely unnecessary and trying to get a scalar output does not make any sense based on your original question. What do you really want?

 

 

Message 8 of 11
(3,396 Views)
It makes sense for me to suggest other method if the user specifies himself as "Am new to LabVIEW" most of the time getting DBL value is sufficient instead of going for waveform.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 11
(3,389 Views)

Don't see how adding a for loop and a get waveform component is any simpler for a beginner. The mistake the op made was wiring the scalar and that just made no sense.

Message 10 of 11
(3,386 Views)