schneidley Posted September 24, 2008 Report Share Posted September 24, 2008 i'm trying to use labview to output a +3.3 and +5V DC signal for relay control. i can get the usb6008 to read signals, but it just seems to not want to output a signal. i've played with digital and analog output, and gotten nowhere. i think i'm just missing something stupid. can anyone give me a start on what i should be doing? thanks ~B. Quote Link to comment
Francois Normandin Posted September 24, 2008 Report Share Posted September 24, 2008 QUOTE (schneidley @ Sep 23 2008, 03:36 PM) i'm trying to use labview to output a +3.3 and +5V DC signal for relay control. i can get the usb6008 to read signals, but it just seems to not want to output a signal. i've played with digital and analog output, and gotten nowhere. i think i'm just missing something stupid. can anyone give me a start on what i should be doing? thanks~B. Can you describe more your experimental setup? With the information at hand, it could be a number of problems... maybe your software works fine but you don't have enough current to latch the relay, or you might have a software problem? 1- I'd look in MAX in the test panel for device USB6008. If you can set it to 3.3V and measure it correctly with a voltmeter, then your device works and you know you are looking at the correct pin number... 2- In LabVIEW, try using the DAQ assistant to setup a simple AO code. Quote Link to comment
Neville D Posted September 24, 2008 Report Share Posted September 24, 2008 QUOTE (schneidley @ Sep 23 2008, 12:36 PM) i'm trying to use labview to output a +3.3 and +5V DC signal for relay control. i can get the usb6008 to read signals, but it just seems to not want to output a signal. i've played with digital and analog output, and gotten nowhere.thanks~B. What exactly have you played with and how? Using MAX? Your own code? What sort of relay are you trying to drive? Are you getting any output at all without the relay connected? Relays might need a lot more current to drive them than the DAQ card can provide. PS. See http://www.catb.org/%7Eesr/faqs/smart-questions.html' rel='nofollow' target="_blank">this. N. Quote Link to comment
schneidley Posted September 24, 2008 Author Report Share Posted September 24, 2008 sorry. i was not specific at all... i have tried DAQassistant and the tests in measurement & automation. there is no relay connected so far, but the eqiupment i plan to use is very low current. so far, i have tried to create signals and pick them up with a voltmeter and a scope. i can't see anything coming out. in DAQassistant, there aren't a lot of controls to play with on the digital side (i don't even see a place to change the voltage). i think i'm totally lost... Quote Link to comment
Anders Björk Posted September 24, 2008 Report Share Posted September 24, 2008 QUOTE (schneidley @ Sep 23 2008, 10:35 PM) sorry. i was not specific at all... i have tried DAQassistant and the tests in measurement & automation. there is no relay connected so far, but the eqiupment i plan to use is very low current. so far, i have tried to create signals and pick them up with a voltmeter and a scope. i can't see anything coming out. in DAQassistant, there aren't a lot of controls to play with on the digital side (i don't even see a place to change the voltage). i think i'm totally lost... Change voltage? well then it is anologue output.. A digital output is either on or off, it has fixed voltagelevels when its on or off. Have you tried to put all DO-ports to true respectively false? Then you should see something. Look at the examples within help labview for your hardware to get more leads. Those connectors on 6008 can be hard to measure on without using some wires. Quote Link to comment
schneidley Posted September 24, 2008 Author Report Share Posted September 24, 2008 QUOTE (Anders Björk @ Sep 23 2008, 12:49 PM) Change voltage? well then it is anologue output.. A digital output is either on or off, it has fixed voltagelevels when its on or off. Have you tried to put all DO-ports to true respectively false? Then you should see something.Look at the examples within help labview for your hardware to get more leads. Those connectors on 6008 can be hard to measure on without using some wires. thanks. i'll give that a try ~B. Quote Link to comment
Francois Normandin Posted September 25, 2008 Report Share Posted September 25, 2008 QUOTE (schneidley @ Sep 23 2008, 04:35 PM) sorry. i was not specific at all... i have tried DAQassistant and the tests in measurement & automation. there is no relay connected so far, but the eqiupment i plan to use is very low current. so far, i have tried to create signals and pick them up with a voltmeter and a scope. i can't see anything coming out. in DAQassistant, there aren't a lot of controls to play with on the digital side (i don't even see a place to change the voltage). i think i'm totally lost... USB-6008 has two analog outputs (ao0 & ao1). In MAX, you can only set a DC value for the AO channels, while you can code it to change at a rate of 150Hz. If I'm correct, those are pins 14 & 15. You can check in MAX under "Device pinout" tab. If using an oscilloscope, make sure it's in DC coupling mode... otherwise you'll filter out the output. Check out these two pages... 6008 & 6009 are the same except resolution and speed. Quote Link to comment
ozzytom Posted September 25, 2008 Report Share Posted September 25, 2008 I just had a look at the specs of the USB-6008. A couple of things to be aware of. The digital outputs have an open drain configuration, meaning they can be configured to either source or sink current. If you want to see a voltage at the pin, you need to activate the internal pullup resistor. This will allow the port to come up to your internal USB voltage rail when activated. I thing the USB 6009 allows 3.3V as an option, but the USB 6008 only provides a 5V output. Have a look at pages 22~24 in the manual.... http://www.ni.com/pdf/manuals/371303k.pdf Bear in mind, that with the internal pullup you will only source about 1mA of drive with a 5V supply ( internal pullup is 4k7 ohms ) If using an external pullup, you are limited to 8.5mA max. Exceed this and run the risk of frying the I/O port. What relay are you intending to use. You said low current. What specifically? If you are using a solid state relay, you will be fine with some of the low input current devices. typically they only need a couple of mA input drive current. But if you are going to drive a coiled relay, it will have to have a coil resistance of greater than 600 ohms to limit the current below 8.5 mA. The coil should be positioned between the I/O pin, and the +5V supply. Disable the internal pullup, and use the relay coil resistance to limit the current. The relay will switch ON when the I/O port is LO, and will switch OFF when the I/O port is HI. Like I said, this is only OK if coil resistance is greater than 600 ohms. The higher the coil resistance, the lower the current that will flow (sink) into the I/O port. Best bet for reliability with coiled relays, is to use a buffer between the coil and the I/O port. A switching transistor would work well. By the way, relays are OK for slow switching, high voltage or high current loads.... but if you are switching low voltage DC circuits, you could use an opto isolator. They can be driven directly by the I/O port, and you can run a seperate (different voltage) circuit on the load side depending on specs of opto-isolator you choose. This way you have complete protection of your I/O port due to the isolation of the input circuit from the output circuit. cheers, tom Quote Link to comment
AnalogKid2DigitalMan Posted September 25, 2008 Report Share Posted September 25, 2008 And if you use a coil type relay, make sure to use a reverse biased diode (ie 1N4001) right across the coil to protect the DAQ from the back EMF when the relay is switched off. Quote Link to comment
schneidley Posted September 25, 2008 Author Report Share Posted September 25, 2008 i was able to get some results with m&a... the digital side will provide +5v and a tiny, tiny voltage. the analog side seems like it will do the trick even better for me. one of the signals will be used to run a thermocouple/accelerometer (memsic 2125 by parallax... a really cool little bugger) and the other will run a solid state relay that runs at 2.5mA. that is to run a motor. i'm not totally set on the relay part of the setup. i'll look into the tips you guys have provided. i've got a pretty good start, now i've got to start working on the actual coding and design stuff. thanks a bunch for all of the information. ~B. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.