Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

subtract some amount form acquired data

Hi

I am using NI 6025E daq to acquire data from 2 sensors. I want to subtract specific amount from the acquired signal before i process it. right now i am doing it in the while loop subtracting 2.5 from the data i acquired. Can i do this using daqmx read property node instead of doing it in while loop. All i  wan to do move all the points down 2.5 in amplitude. thanks

0 Kudos
Message 1 of 13
(3,357 Views)
Why are you doing this in a while loop? You can wire an array into one input of the subtract function and wire a constant to the other input.
0 Kudos
Message 2 of 13
(3,355 Views)

Thanks for the reply. I am acquiring data continously form sensors one point at time. I have daqmx read.vi function inside the while loop. Thats why i am doing my subtraction in the while loop.  

0 Kudos
Message 3 of 13
(3,345 Views)

Okay, I thought you might have just the subtract inside a loop - indexing out each element in the array.

 

 Why don't you try the scaling function? With a linear scale, the slope would be 1 and the Y-Intercept would be your current subtraction factor.

0 Kudos
Message 4 of 13
(3,340 Views)
Thanks for the reply. Where can find the scaling function? Is it in the functions pallete?
0 Kudos
Message 5 of 13
(3,312 Views)

Hi suni,

 

The scaling function you are looking for should be in your Functions palette under Measurement I/O » NI-DAQmx » Advanced » Scale setup. You can create your custom scale and use it in your task as shown below.

 

Message Edited by S_Hong on 09-23-2008 11:49 AM
S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 6 of 13
(3,300 Views)

Hi Hong

 

Thanks for the reply. In my application, I am creating 4 cahnnels using one daqmx create channel.vi. But i want to scale only 2 channels. Also those 2 channels have different scaling values. Can I do all this using one caling function? 

0 Kudos
Message 7 of 13
(3,291 Views)
For each scale you create, you need to call a separate Create Scale because obviously, you have a different scale factor and a different scale name. Then, you need a separate Create Channel to match each scale and one for the channels that are unscaled.
0 Kudos
Message 8 of 13
(3,280 Views)

Hi

 

Thanks for the reply. I tried to use the scaling function but application could not acquire data. Could you teel me if i am doing somthing wrong?

0 Kudos
Message 9 of 13
(3,259 Views)

Hi suni,

 

Could you tell me the error code you are getting when trying to run your application?

Could we also try simply modifying one of our shipping examples with the scaling functions to see if it works?

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 10 of 13
(3,226 Views)