LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Create Scale doesn't work

Solved!
Go to solution

Dear all,

 

I added a linear scale to channel, but the amplitude of signal in waveform graph didn't change. Could you help me fix the problem, please? Thank you so much!

 

 
 
 

Create scale.jpg

0 Kudos
Message 1 of 14
(4,046 Views)

Hi Patrik and welcome to the forums!

 

Are you using a simulated DAQmx device?  I'm not sure whether the scale makes any difference to the simulated input values.  The guidelines for using a simulated device state that the analog input data is always a full scale sine wave with 3 % of full scale noise.

 

PsyenceFact

0 Kudos
Message 2 of 14
(4,019 Views)

Yes, I am using a simulated device. Do you mean I should use a real one? I will try it today. Thank you!

0 Kudos
Message 3 of 14
(3,979 Views)

But I think the scale should work this way: if the signal is from -5V to 5V (NI9234), the final value in waveform should be -10 V to 10V with a scale of 2. Is it correct?

0 Kudos
Message 4 of 14
(3,979 Views)
Solution
Accepted by topic author PatrikLiu

@PatrikLiu wrote:

But I think the scale should work this way: if the signal is from -5V to 5V (NI9234), the final value in waveform should be -10 V to 10V with a scale of 2. Is it correct?


But what you put in for the Max and Min on the Create Virtual Channel are the values AFTER the scale has been applied, not the raw voltage.  So your Max and Min should then be +10V and -10V.  And it is then those values that are used by the simulated DAQ.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 14
(3,965 Views)

As usual, crossrulz is absolutely correct!

 

I tested with a simulated USB-4431 which has a maximum voltage range of +/-10 V.  With the custom scale disconnected and using units of Volts results in a simulated signal that matches the input Max and Min Voltage and gives error -200077 if the range exceeds +/-10 V.  With the custom scale connected and using units of From Custom Scale results in a simulated signal that matches the input Max and Min Voltage and gives error -200077 if the range exceeds +/-20 V.

 

I hope this makes things clear.

 

PsyenceFact

Message 6 of 14
(3,936 Views)

Yes, you are right. I read the explanation of Max and Min in help and found it is exactly what you mean. Thank you so much!

0 Kudos
Message 7 of 14
(3,931 Views)

I tested as you did and got the same result. Thank you so much! The signal never exceeds the limit. Anyhow, it is clear now.

0 Kudos
Message 8 of 14
(3,928 Views)

Dear all,

 

 

I don't understand where the problem is, it seems trivial but unfortunately it is not.
I am acquiring a signal in volts and I want to convert it to another scale (Nm).
The problem is in the "scaled values" if the coefficient changes of one orders of magnitude works,  from two orders of magnitude the data changes apparently without logic.
What am I missing ?!

 

the original value around -0.667

times 10 = -6.67

times 100 = -21.57 ?!?

times 1000 = -215.72

times 10000 = -2157.21

 

 

Thank you all.

Fulvio_0-1614691723687.pngFulvio_1-1614691747024.png

Fulvio_2-1614691762850.pngFulvio_3-1614691800746.pngFulvio_4-1614691825641.png

 

 

 

0 Kudos
Message 9 of 14
(3,452 Views)

Are you *certain* that the raw voltage input value was the same for all the trials?  One plausible explanation is that there was an actual shift in the raw voltage after the first 2 trials that remained for the next 3.

 

Be sure you have a steady constant voltage source (a battery perhaps?) wired to the corresponding input when you run the next set of trials.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 10 of 14
(3,448 Views)