LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage measurement for mV, task in MAX works, not in the vi,

Hi all

 

I am using a USB 6008. I am reading in the voltage from a tmp36 "low cost" temperature sensor.

The voltages are to be in the range 0 - 1v, so most of them will be in the mV range.

 

When created a task in max, it shows the voltage(nicely) HOWEVER

when I try this in a a very simple vi it registers 0 volts or flashes as a low negative value. This is the first time I have experienced such a problem from voltage measurement. 

(When I use the cont acquire graph voltage example, it also does not work)

Attached is a screen shot my task in max as it works

Any Ideas ?

 

Many thanks

0 Kudos
Message 1 of 9
(2,562 Views)

Attach your VI so we can see what you did there.

0 Kudos
Message 2 of 9
(2,546 Views)

Hi

 

in your vi, did you set your min and max limits of the channel correctly?

also, what is the input terminal configuration used in the vi?

 

as suggested, please post the code

 

also, is there any error in the vi?

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 3 of 9
(2,536 Views)

Hi Freelance_LV

 

Jeah I I think I did assign the Max limits correctly 0 min and 2 Max. Since the  maximum output from the sensor 2 volts.

It is really puzzeling that it works as a task, but not in the vi.

No error in the Vi.

I attached the sample of the vi.

 

Thanks

0 Kudos
Message 4 of 9
(2,522 Views)

What happens if you wire the task into the DAQmx read as you have the name defined in MAX rather than creating the channel and clock and starting the task like you are showing in your VI?  Does it behave any better?

0 Kudos
Message 5 of 9
(2,517 Views)

Set your terminal configuration to RSE.  The DAQmx help is a little weird in what "default" is.  It is likely the default is Differential, which would give you bad data.

For devices with eight channels: differential for the first four channels, referenced single-ended for the next four channels. For devices with 16 channels or more: differential for eight channels followed by referenced single-ended for eight channels. For instance, channels 0-7, 16-23, and 32-39 are differential. Channels 8-15, 24-31, and 40-47 are referenced-single ended.

 


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
0 Kudos
Message 6 of 9
(2,514 Views)

Hi OriolesFan

 

When I try that i get an Error 200523, indicating that it can not return data from multiple channels.

This is odd once again since i am only using 1 channel.

0 Kudos
Message 7 of 9
(2,508 Views)

Crossrulz.

 

Ahhh I see...how the default is. I changed the pin connection to suit the default. I had it as RSE before( I am using other temp sensors as RSE and have no problems at all). I just tried to connect it as differential and it worked.( Surely a newbie mistake of mine )

Can't explain why this one works like this but it does. (

 

THANKS Everyone 🙂 Baie Dankie 

0 Kudos
Message 8 of 9
(2,506 Views)

@maltrap wrote:

Hi OriolesFan

 

When I try that i get an Error 200523, indicating that it can not return data from multiple channels.

This is odd once again since i am only using 1 channel.



Make sure you remove the input from the channel.  If your task is set for 1 channel, and you don't have the physical channel input wired up as well in your VI, then you shouldn't be getting this kind of error.

0 Kudos
Message 9 of 9
(2,504 Views)