Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB DAQ device (USB-6216) misbehaving after unplugging USB cable

Hi Guys

 

Has anyone else noticed this problem, I dont find anything on it online:

 

Using a USB 6216 multifunction DAQ device, my program ends by making all outputs safe (zero), then exits. Then, when I pull out the USB cable from the computer, the daq device randomly operates some digital outputs high and low for about 4 seconds before going off.

 

No additional 5V is supplied to the bus powered DAQ device, so it is running on stored power.

 

I can see this behaviour because I have the device connected to an array of solid state relays driving lights. (Luckily only lights at this stage but my intention is to drive heavier things, and having them operate at random could cause serious problems.)

 

Is there a safer way to eject the DAQ device before unplugging so that this does not happen?

Is there a firmware update that deals with this?

Is there a software step that can prevent this? (But may still leave the unsafe condition if USB unplugged mid operation...)

 

Thanks

 

Mike

 

0 Kudos
Message 1 of 9
(3,639 Views)

what is your output voltage voltage when you first connect the device to the USB without software startup? my daq is 5Vdc (internal pull up to a open collector), knowing that...i use an active low to start my hardware power up or enables...

0 Kudos
Message 2 of 9
(3,619 Views)

Hi Apok

 

I have been experimenting further. With the USB unplugged, no external power applied then all outputs are low. 

With USB still disconnected, as I connect a high signal to port1 line 5 (Hardware OK signal, 5V through 1K resistor from external system), all eight outputs that I am monitoring (Port 0 line 4:11) go high for about 4 seconds, then flicker at high frequency and go off. The outputs are connected to solid state relays  (driven through MOSFET) which drive lights, so I can see them come on and then fizzle out.

 

If I then disconnect the port1 line 5 signal for a few seconds, and then re-connect it, the whole thing repeats.

Download All
0 Kudos
Message 3 of 9
(3,589 Views)
Kinda sounds like a 6216 isn't the right tool for the job.

I'm thinking something with some software built in might be a good idea when it comes to safety in your product... cDAQ-type system, rather than a USB module.

My suggestion is to take a step back and looking at what you want to accomplish in the end, then pick hardware from those requirements.
Message 4 of 9
(3,562 Views)

@SnowMule wrote:
Kinda sounds like a 6216 isn't the right tool for the job.

Indeed! This is why they make Industrial DIO with ch-ch isolation

Hmmmm that's twice I've linked that in the last week.  It might be a new engineering class project.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(3,559 Views)

@JÞB wrote:

@SnowMule wrote:
Kinda sounds like a 6216 isn't the right tool for the job.

Indeed! This is why they make Industrial DIO with ch-ch isolation

Hmmmm that's twice I've linked that in the last week.  It might be a new engineering class project.


hmmmmmmm.....deja vu?  Smiley Surprised

 

sometimes i feel like i am giving the same answers over and over and over again, as many others do here or seeing the same questions asked differently... Smiley Indifferent

0 Kudos
Message 6 of 9
(3,548 Views)

Perhaps you could make use of the watchdog timer the exists on the X series devices ?  The daq hardware will set its digital output to states you define if the device does not recieve a software reset command periodically within a user-defined timeout period.  Those states will be set for example if the USB cable is unplugged (so that it cannot receive its software reset command), Windows reboots, the computer is powered off, etc.

 

Steve

 

0 Kudos
Message 7 of 9
(3,508 Views)

Hi

 

Thanks for your feedback and suggestions. I have been investigating and considering other NI USB hardware solutions, but there is no obvious best choice that meets my needs.

 

I chose the 6216 based on its mix of analogue inputs, outputs and DIO, giving the most flexibility to handle a range of tasks with one cheap controller. I don't find a multifunction DAQ with industrial DIO.

 

The 6525 has too few outputs.

The 6509 might do it, having nice features like power up/down states and watchdogs on outputs, but I have a feeling it will exhibit the same failing as the 6216 in the case when it is unpowered due to the CMOS technology and lack of channel to channel isolation. Same goes for X series USB DAQ devices.

 

To re-iterate my issue with the USB-6216:

-Behaves fine when USB is connected and device is powered up.

-When USB is not connected, behaves fine if no digital inputs are connected, or are logic low (zero volts)

-When USB is not connected, and a digital input is high (>3V), this power bleeds through to all output ports which show about 1.4 V for a few seconds. This voltage then drops down to around 0.8 V and stabilizes. Due to the nature of my outputs (optocouplers), a voltage greater than 0.9 V is sufficient to turn on the opto, causing bad things to potentially happen.

 

My feeling at this stage is that the problem is not in the USB6216 logic/firmware, but more like in the hardware technology (likely CMOS judging by behavior).

 

What I will try next is to build in a hardware layer of isolation between the USB 6216 and my switching hardware (similar to what something like the USB 6525 already has built in).

 

Anyone know what's in the input and output stage of the USB 6525 type devices, or can suggest something with similar functionality? I get this from the data sheet:

 

"The USB-6525 has eight channel-to-channel optically isolated inputs, P1.<0..7>, and eight channel-to-channel optically isolated, solid-state relay outputs, P0.<0..7>. The isolated inputs consist of an optocoupler, a depletion-mode MOSFET-based current-limiting circuit, and a Schottky diode."

0 Kudos
Message 8 of 9
(3,499 Views)

I suspect that you will need to do some custom external hardware to be fully safe.

 

I agree with your suspicion that the problem is in the digital I/O circuits and not the logic.

 

Several options come to mind.  Not knowing your entire sytem, I cannot make specific recommendations.

 

1. Control the power to the external devices through specific output sequences from the USB DAQ device.  Some low-high-low sequence of a digital output with minimum timing requirements would be reuired to enable the power to the external devices.  Some kind of external watchdog looking at both the +5 V and a DO or counter output from the USB DAQ device could shut down external power (perhaps with a farily short timeout) if the USB device is unplugged.

2. When your external signals couple through digital inputs to the outputs, they may also couple to the +5 V output of the USB device.  But the coupling is through the input protection circuits which usually include a small series resitance and a diode, so a significant voltage drop should occur. Qualify the digital outputs be requiring that both the USB +5 V and the external power sources be at nominal values before gating the outputs to the external circuits.

3. Add a couple of extra diodes in series with each of your optocoupler inputs.  This may raise the threshold sufficiently to prevent the problem. You may need to change the value of the current limiting resistors.  It is more difficult to prove that this will work in the worst case.

 

Lynn

Message 9 of 9
(3,495 Views)