LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Monitoring with USB-6008

Solved!
Go to solution
Highlighted

Hi,

I'm doing a project on Power Monitoring Unit. I measure voltage and current and display it in LabView. and i am having trouble with current measurement and running the programe

 

For the voltage measurement, i used a voltage transformer 220V/6V AC connect to 6008. As for the current measurement, my supervisor told me use current transformer(Input: 0-50A , Output: 0-50mA, frequency:50-60Hz) and parallel a 300ohm resistor in secondary side in 6008. 

 

To test the circuit ,i connect a 1100W/220V blower in extension unit and use a digital meter for calibration. In the result, the reading of voltage is accurate after i multiply the turn ratio. But the value of current in LabView is only 0.54mA and the actual value is 5A, the result is far away from the actual value.

 

Also, when the porgramme running , it keeps show the message :The specified resource is reserved. The operation could not be completed as specified. I try the different setting and still pop up the meassage.

 

If you guys can give me a solution for this, it's greatly appreciated,

 

Cheers,

Tom

 

 

 

 

 

 

0 Kudos
Message 1 of 8
(485 Views)
Highlighted

There are a few problems with what you uploaded in order to troubleshoot your problems (mainly that you gave us pictures, not a VI, and a screenshot of the error rather than the text or code (but they can be read on the screenshot)), but I'll guess anyway:

  • You have 2 DAQ Assistant nodes in the same loop, and one of them is using some resource that the other one needs. I have no idea what that might be from the pictures you attached
  • Attaching a VI might have allowed me to make a better guess
  • You should change to using DAQmx functions (a good starting guide is available here: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications) and then 
    • it will be easier for forum users to see what's going on in your code, even if you only upload images
    • you can more directly control the resources being used, and probably get both bits working together nicely
  • Since you're making two voltage measurements (right - one is direct and the other is "current" via a voltage drop over a resistor) you can probably just make a single measurement on two channels (so not 2 DAQ Assists, but only 1, and preferably after substitution by DAQmx code, 0)

 


GCentral
0 Kudos
Message 2 of 8
(476 Views)
Highlighted

Thx for the help, Here is the VI 

0 Kudos
Message 3 of 8
(469 Views)
Highlighted

Ok, so I still suspect that my previous post will be more useful than this one, but I did manage to get one further detail by opening your VI - you have measurements configured for voltage in one DAQ Assistant and current in the other. Are you actually measuring current, or are you measuring voltage drop over a known resistor and calculating current (as I previously guessed)?

 

If you are measuring voltage, change the measurement to voltage. Although you'll probably still be better with the advice above, using DAQmx and combining the two measurements into one task with multiple channels (you can do this with DAQ Assist too if you really prefer).

 

Edit: you can't make current measurements directly with a NI-6008, so I'm now pretty sure you're making voltage measurements. I'm surprised you don't get an error in that configuration, but I suspect it may be the/a reason for the low measurements.


GCentral
0 Kudos
Message 4 of 8
(461 Views)
Highlighted

I am measuring the current with the current transformer and parallel a 300ohm resistor in secondary side as the attached photo, can i measure current in this way?

0 Kudos
Message 5 of 8
(444 Views)
Highlighted
Solution
Accepted by topic author Tomy6661

@Tomy6661 wrote:

I am measuring the current with the current transformer and parallel a 300ohm resistor in secondary side as the attached photo, can i measure current in this way?


Technically, no, you cannot measure current this way. You can only measure voltage. However, you can calculate the current flow with that setup and a simple application of Ohms law.

 

But when setting up your acquisition with LabVIEW, remember that what you are measuring is voltage, not current. Then just divide by resistance to get current (and multiply by turns ratio to get the input current, I suppose).


GCentral
0 Kudos
Message 6 of 8
(441 Views)
Highlighted
Solution
Accepted by topic author Tomy6661

@cbutcher wrote:

@Tomy6661 wrote:

I am measuring the current with the current transformer and parallel a 300ohm resistor in secondary side as the attached photo, can i measure current in this way?


Technically, no, you cannot measure current this way. You can only measure voltage. However, you can calculate the current flow with that setup and a simple application of Ohms law.

 

But when setting up your acquisition with LabVIEW, remember that what you are measuring is voltage, not current. Then just divide by resistance to get current (and multiply by turns ratio to get the input current, I suppose).


I just finished a project measuring output from a sensor that used "Current Loop", i.e. it produced a current from 4 - 20 mA that translated to 0 - Full Scale.  I used a USB-6001 to measure voltage across a 500 ohm resistor, so I got voltages from 2 to 10 V.

 

When I first played with my device using MAX, "just for fun" I selected "Current".  It asked me for the value of the in-series resistor I was going to use.  I don't have a "real USB-6001" with me now, and I couldn't get a Simulated 6001 to work, but (similar to the way that DAQmx lets to you output "Scaled values") there may be a way to configure DAQmx to "do the math for you" and let you "measure" Current (meaning that the output from the DAQmx Read will be in units of Amps).

 

Bob Schor

0 Kudos
Message 7 of 8
(408 Views)
Highlighted

You do know that simply calculating ACVolts x ACAmps = VA (Apparent Power) not Watts (True Power)?

 

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 8 of 8
(335 Views)