Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6008 digital output

Hi! I'm bit confused... I want use USB 6008 device to output digital control signals for 595 registers (data, Clock, latch and output enable). I've found some examples for digital output generation and tryed to apply it for task. Output is suprise for me - sometimes signal shape changes (misses some pulses) whithout any obvius (for me) reason. Data to write out is the same, i just run vi few times and expect output to be something like this:

but sometimes i get this:


Theese images i got with the same 6008 - using analog inputs attached to digital outputs.
Here's one vi:

Second VI i'm usig, uses analog to digital wavefrom conversion and DAQ mx, but there's some missing pulses too.
Can someone point me where's the problem, why i get some missing pulses?
p.s. sometimes it's not missing pulses, but pulse width changin...

Message Edited by Pufaix on 03-19-2007 04:05 AM

0 Kudos
Message 1 of 7
(5,232 Views)
Hi,

The USB 6008 does not have any buffering for its digital lines.  This means everything is software driven.  Could you maybe give me a better idea of which example you were using, because most digital generation tasks require buffered DIO lines.

The images you attached did not seem to attach well.  If you could just make them into jpeg images, then I should be able to see them.  Also place them in as attachments, don't try to paste them into the text of your post itself.  Just use the attachment name, so I know which image corresponds to which situation. 

You could be missing pulses if you are trying to get a fairly fast signal.  As far as the pulse width changing that is not surprising, since software timing is determining when the DIO value changes.

Please get back to me with those images and we will continue looking at your applicatoin.

Michael D
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(5,215 Views)
Sorry about the images. nError.jpg - 1st , mError.jpg - 2nd, and VI1.jpg 3rd....

Message Edited by Pufaix on 03-20-2007 12:26 AM

Message Edited by Pufaix on 03-20-2007 12:27 AM

Download All
0 Kudos
Message 3 of 7
(5,212 Views)
Here I've added another picture of VI whitch I tryed to use for task. Hope it i'll help.

0 Kudos
Message 4 of 7
(5,207 Views)
Hi,

I have read through your description and it does seem strange that you are getting that gap in the output.
From what you have written it seems that the signals you showed me came analog inputs reading the digital output that you created with the VI in image VI1.jpg.  The VI1 also seems to be outputting four digital lines, but one of them is alway zero?  I wondered why you had that included?

Just to clarify VI1.jpg is what created the signals you were showing in the images?

VI2.jpg is not setup correctly.  You can only have one DAQmx Digital Output task per device.

Going into example finder which is located at Help»Find Examples

Then go to Hardware Input and Output»DAQmx»Digital Generation.  The simple write to channel line is really all you can use with the 6008, but it might help to see how that works.  You would just have multiple channels as your input to the physical channel node.  Please clarify where you are getting the signals from, because I am not sure which digital data is creating which analog signal.

Have a great day,

Michael Denton
Applications Engineering
National Instruments
0 Kudos
Message 5 of 7
(5,184 Views)
Hi,

Line, whitch is zero all the time is for register pin output enable. In future it should be changing from 1 to 0 at last latch cycle... I didn't show it in pictures, because it's zero;)

VI1.jpg is the one creating signals in pictures nError.jpg and mError.jpg. It's analog inputs reading the digital outputs and task is complated with DAQ assistant. Is it wrong to use 2 DAQ assistents (one for digital output, another for analog input)? If yes, what's proper solution?

Although VI2.jpg is not set up correctly, it is possible to get similar images. As i mentioned, sometimes it's not missing pulses, but pulse width changing (with bouth VIs).

In VI1 from binary numbers, bolean arrays are created, then in every cycle from every of theese arrys one bolean value is written in arry before DAQ asistant. When all elements are arrived, array is sent to DAQ assistant and values ar written to digital outputs.





0 Kudos
Message 6 of 7
(5,178 Views)
Hi,

Okay the main problem I could see you having is the second DAQ assistant.  Is it running in another loop?  A parallel loop?  The real issue seems to be that the Analog input sometimes does not call and that is why you get that gap.  I would recommend looking in the examples I mentioned above.  Run one of the analog input examples and one of the Digital output examples.  Start the analog input before the digital output, and see if the analog input example still seems to be missing pulses.  Just run the VIs simultaneously.

How is your analog input DAQ assistant setup.  Are you using 1 sample on demand timing, or is it on continuous timing, or N samples?

I see how VI2.jpg would work, but I think the real problem lies with how you are reading the signals with the analog input the signals.  I would recommend setting up the Analog input for continous signal acquistion. 

The pulse width is going to change, because these are just software controlled signals, you are going to have slight variation.  How big is the variation in the pulse width, because any thing smaller than a 1/100th of a second is probably going to be unavoidable unless you have a very powerful computer with nothing else being executed by the OS.

Have a great morning,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 7 of 7
(5,164 Views)