LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to read the unscaled voltage from a scaled virtual channel?

I am using DAQmx to read voltage from a SCXI chassis. Programmically in Labview I created a task with virtual channels and custom scales. Later in the program, I wish to view the scaled volatge and the raw voltage at the same time. Is there a property node which will allow me to do so?
0 Kudos
Message 1 of 14
(3,929 Views)
Hi Fergusonhd -- yes, there is a way to do this --> Look in DAQmx-> DAQmxAdvanced-> Scale -> Scale Property node.

Drop it in and wire in your scale.(I did it by creating a constant for active_scale) Select the various attributes depending on the type of scale you created and manipulate your signals based on that information - For ex. if you created a linear scale, you could get information about the slope and intercept from this property node -- that being said, you can use this information and do the reverse logic:

[if original was Y=aX+b]
X = (Y-b)/a
where b is the Y intercept and a is the slope

Hope this helps
VNIU
0 Kudos
Message 2 of 14
(3,929 Views)
I think the easiest way to do this is to read the Raw values directly. You can do this by selecting the Unscaled Read polymorphic instance. On the read selector choose Analog>>Unscaled>>X datatype.

Stuart G
Message 3 of 14
(3,929 Views)
This doesn't help me. This is going in a calibration vi and if the scale is wrong (or the zero has drifted),it never gives you the true raw voltage.
0 Kudos
Message 4 of 14
(3,929 Views)
Can you read the raw and scaled values at the same. I see how to use one Read VI to call the scaled values or you can use one Read VI to call the raw values, but I want both at the same time. Is there a way to add another output to the polymorphic VI i.e. it has two outputs on one Read.
0 Kudos
Message 5 of 14
(3,929 Views)
Any particular instance of Read VI will only have one output terminal; however, multiple instances of the Read VI can be called sequentially, provided that a Read Property node is called between them to reset the read position. In otherwords, the data is read from the buffer twice - once scaled and once unscaled.
0 Kudos
Message 6 of 14
(3,929 Views)
Thanks, I'll give this a try.
0 Kudos
Message 7 of 14
(3,929 Views)
Which property needs to be called from the Read node?
0 Kudos
Message 8 of 14
(3,929 Views)
1) Read data normally (DAQmx Read)
2) Use "DAQmx Read Property node", with the "RelativeTo" option set to "First Sample". This may need to be set diferently if you're using reference triggers (use online help for "RelativeTo" option).
3) Read data with "DAQmx Read" set to unscaled.
Message 9 of 14
(3,929 Views)
It seems the unscaled or raw input is in the native format and organization of the device. What on earth does that mean and how can I scale it to raw voltage?
0 Kudos
Message 10 of 14
(3,929 Views)