Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6008 digital outputs

USB-6008, I am using the digital output of port 0 and port 1 as individual outputs to control 12 opto relays.   The opto relays only require 3 -5 ma. of current to switch so I know I am well with in the spec. of the digital outputs.   The issue I am seeing is that when I put the DAQ asst. in a loop the outputs chatter.   If I let the loop run free without slowing it down with a "wait until function" the digital outputs chatter as quickly as they can.  If I slow down the loop the chattering frequency follows the wait time.    For example,  If the wait time between loops is 250 ms then the chattering occurs at a frequency of 250 ms, if I set it at 1000 (1s) then it chatters at a frequency of 1s.  The chattering is caused by the channel momentarily falling to zero everytime the loop runs.   What can be done to stop  this from happening?   I assume the DAQ has to run in a loop?   The usb-6008 hardware works fine in the measurement automation application.
 
Thank you in advance for your assitance.
 
Steve Cromie - Welch Allyn
0 Kudos
Message 1 of 3
(3,628 Views)
Hello Steve,

The behavior you described does sound very strange. Could you be a little more specific about exactly what you mean by "chattering"? If you could provide a screenshot of the behavior, that would help a great deal. The channels on your device should not drop to zero volts even in their power-off state because there is an onboard pull-up resistor on each line of the NI USB-6008. You may want to try running an example program to determine if the behavior is related to your program specifically. I would recommend that you try the example called "Write Dig Chan.vi". You can find this example by selecting Help>>Find Examples... in LabVIEW. That will open the NI Example Finder, which allows you to browse examples by application area as well as search for an example by name. Let us know what you are able to determine.

Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 2 of 3
(3,604 Views)
I have a hunch that the DAQ assistatant is probably initializing the card on every iteration of the loop. Never have used the assistant though so I could be wrong.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 3
(3,600 Views)