LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enquire about acquiring analog signal of wheatstone bridge from DAQ device to labview to read certain voltage values

 Hi

 

DAQ assistant is an express vi - which for full applications we'd recommend you dont use - as its slower and has some over heads.

 

But for prototyping and proofs its fine.

 

But basically they do the same things.

 

Hope this helps,

 

regards

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 11 of 16
(895 Views)
The potentiometer from the wheatstone bridge circuit can be adjusted to have the voltage out values that i want. Now the h-bridge are different from wheatstone. Potentiometer is the one to control the motor to certain angles when given specific commands. What i want to achieve is between wheatstone and h-bridge, i can have this case structure to give commands to the h-bridge using if else statement.

This is the link for my L293 circuit. But i'm using only one portion since i'm using only one motor.
http://www.me.umn.edu/courses/me2011/robot/technotes/L293/L293.html

I have Pin 1 as enable, pin 2 and 7 to control my motor to forward and reverse. I use P0.0, P0.1 and P0.2 to give digital output to pin1, 2 and 7 respectively.+5V connect to pin 8 and 16, GND connect to pin 4 and 5.
So far, i can control the motor to forward and reverse in a while loop but it won't stop unless i unable the toggle switch of pin 1 to 'Low'.

The operation looks something like:

Power supply(+10V) to wheatstone bridge circuit
Acquire voltage out from NI UBS-6009 by AI0, GND using DAQ assistant function
Gives commands to case structure like if else statement, for examples if voltage out data 5V is less than 10V, it return true condition and if its greater than 10V, it return false condition and etc.
From case structure to while loop of h-bridge to dc motor
Lastly to my pendulum.
0 Kudos
Message 12 of 16
(893 Views)

Hi Leni,

 

From what you've described, I don't even think you need any sort of Case Structure. Consider using the Select Function when possible as well.  Here's an example I created real quick. The first DAQ Assistant obtains the voltage from AI0 of the 6009 and the second outputs to port 0.0, 0.1, and 0.2. Does this do everything you need?

 

Message Edited by lion-o on 08-14-2008 03:16 PM
0 Kudos
Message 13 of 16
(875 Views)
But i want an if else statement function. And in between wheatstone and h-bridge i need to build a case structure.
0 Kudos
Message 14 of 16
(866 Views)
Gives commands to case structure like if else statement, for examples if voltage out data 5V is less than 10V, it return true condition and if its greater than 10V, it return false condition and etc.
0 Kudos
Message 15 of 16
(865 Views)

Hi Leni,

 

I don't understand why you'd want to use an if-else type of statement for this situation, but it's pretty easy to just insert a case structure in the example I attached to achieve that functionality. I attached a screenshot of 3 different ways to accomplish what you just stated. The first way uses a case structure that allows you to achieve your if-else statement just like you would expect. The second way uses a select function which also can be used for if-else type statements except it doesn't have the ability to keep code from executing. The third way simply returns the same result without ever having to perform any type of if-else functionality and will be the most efficient and preferred method. If you need something more complex than just returning a True or False, then the Case Structure may become needed.

 

Message Edited by lion-o on 08-15-2008 08:59 AM
0 Kudos
Message 16 of 16
(854 Views)