Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

voltage and current measuremnt problem

Hello everyone,

 

I am trying to read battery voltage. I have some other things(motor speed etc but I have different sensor and controller for that) running along with voltage measurement. I am using NI 6229. I am using Channel Read VI in labview. This battry is suppying power to motor.

1. When I just tried to run my read channel VI (with no other measurement or calculation in labview code) I read all changes in battery voltage as i start motor.

2. But when I use this read channel VI along with other measurements and calculations in labview code in same while loop. My read channel VI gives change in battery voltage after 40 secs.

Can anybody tell me what is going wrong here.

Thanks,

c59409

0 Kudos
Message 1 of 4
(2,759 Views)

Hi c59409,


Thanks for posting on the NI Discussion Forums!  I understand you are seeing some unexpected behavior when including other measurements and calculations in the same while loop as your Read VI.  I have a few questions for you.


1) What versions of LabVIEW and NI-DAQmx do you have installed?  You can check the NI-DAQmx version in Measurement & Automation Explorer under the Software tab.

2) What type of other measurements and calculations are you doing in the while loop?
3) What specifically do you mean when you say “read channel VI gives change in battery voltage after 40 secs”?  Does this mean that you are controlling the battery voltage, and when you change the voltage it takes LabVIEW
40 seconds to update the indicator/graph?  Or does this mean that your while loop takes 40 seconds to execute?


If you are doing a lot of post-acquisition processing, I would strongly recommend the Producer/Consumer architecture.  You can read more about this architecture at the following link.


Application Design Patterns: Producer/Consumer


You can find a great example program that implements this architecture at the following link.


Streaming 24 AI and 8 AO


The example program is separating the acquisition from the file i/o operations with a queue.  This architecture has many advantages which you can read about in the first link.

Message Edited by RT4CY on 09-26-2008 05:01 PM
Rod T.
0 Kudos
Message 2 of 4
(2,731 Views)

Thanks,

 

I will provide more information.

 

I am using Labview8.2.

My setup is like this. Motor is powered by Batteries. A dyno is connected to motor.

I have controller for this Dyno. this controller is connected to my pc using GPIB bus.

In my programe I read motor speed and torque thrugh this controller and calculate new torque based on torque and speed read from motor, and apply it to dyno through controller.

I use GPIB read and GPIB write to read and write speed and torque from motor and to dyno.

I am trying to read battery voltage and current.

I am using NI9229 card to read these two parameters in same pragrame.

Now when I start prgrame and run the motor at same time and try to read voltage and current, it shows change in voltage and current after 40 secs. which I am expecting to show me as soon as motor starts, bcos motor is using battery to start and it draws current from battery to overcome torque of Dyno.

What may be the reason to see lag of 40 secs ?

Any body please help.

Thanks,

c59409

 

 

0 Kudos
Message 3 of 4
(2,705 Views)
Suggest you post your code.  Suspect this has something to do with the Task State Model.
0 Kudos
Message 4 of 4
(2,692 Views)