Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Status of Digiatal output lines

Yemi, I tried to save the vi back to v7.0, but there are functiuons taht are not compatible, apparently.  I get error messages saying it can't be saved.  I'm looking around for help on this.  Nay one else have a solution?
0 Kudos
Message 11 of 32
(3,135 Views)

Hello Yemi,

Since you are just getting started with your digital output application, I would recommend going to the Example Finder in LabVIEW (Help >> Find Examples) to find a VI to try out.  Are you using NI-DAQmx or Traditional NI-DAQ?  If your device supports it, which you can check at http://www.ni.com/support/daq/versions.htm then you should use NI-DAQmx.  In particular, a good example to look at in the Example Finder is Write Dig Chan found at Hardware Input and Output >> NI-DAQmx >> Digital Generation.  In order to use lines 0 through 5, you need to edit the channel parameters to say DevX/port0/line0:5 where X corresponds to your device number.  Then, you need to remove two active elements from the Data to Write array by right clicking on the array twice and selecting Data Operations >> Delete Element. 

Hope this helps,

Laura

0 Kudos
Message 12 of 32
(3,124 Views)
Hi Laura,
 
Your suggestion has put me in the right direction, however on following your instruction and that in the example, i got the following error which i dont know how to fix. find below the error:
 
Possible reason(s):
Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.
If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.
 
Number of Lines in Channel: 6
Number of Lines in Data: 1
 
Many Thanks
 
Yemi
0 Kudos
Message 13 of 32
(3,108 Views)

Hi Yemi,

I have modified the example I referenced previously and attached it.  I tested it, and it works correctly.

Regards,

Laura

0 Kudos
Message 14 of 32
(3,091 Views)
Hello all,

Is it also possible to monitor the status of the Digital Counter Output? Or when a trigger is found?
Quick explanation of my situation - working in LabView 8 :
I'm sending a train of pulses with the Counter Output function each time a digital trigger is found. I just want a small led flashing on the screen each time this happens.

Thanks in advance!
0 Kudos
Message 15 of 32
(2,677 Views)
Hi Little_Tee,

There is no property in DAQmx that will tell you whether or not the counter has received a trigger. You can determine if a trigger is sent/received by physically connecting the trigger to a DIO-Line.  The led on the front panel can turn on when the line is high and off when it is low.



Message Edited by Hani R on 02-21-2008 10:08 PM


Best Regards

Hani R.
Applications Engineer
National Instruments
0 Kudos
Message 16 of 32
(2,652 Views)
Hi Hani R,

I was afraid this would be the only way. I started out trying it like that to begin with, but it appeared the line was always high, so the led always on - if I connected the trigger to the DIO line. The led is only switched of if I break that connection. I don't understand why it behaves this way. If I watch the signal on the scope, it's just a 5V TTL block pulse.
Anyway, it's not that important, but if you would have an idea what's going on, you can surely let me know.

Kind regards

Tom
0 Kudos
Message 17 of 32
(2,634 Views)
Hi Tom,

Could you specify which device and channels you are using?  Also, how are you connecting the trigger to your digital input (wire/bnc, any grounding, etc)?

Digital lines may read high when not connected or when floating.  Refer to the KnowledgeBase article: KB 0H4GD3RP: Floating Digital Input Lines on Data Acquisition Boards Read Logic High for more details.  Since you are connecting a signal to the digital input lines, you may want to ensure that your digital lines are properly grounded.  




Best Regards

Hani R.
Applications Engineer
National Instruments
0 Kudos
Message 18 of 32
(2,618 Views)

Hi Hani,

I'm sorry for my late reply. At the moment I'm stuck with other chores at work. Not been able to continue my work with LabView. I'll try to give you a real reply soon.

Thanks for your help and for waiting.

Tom

0 Kudos
Message 19 of 32
(2,526 Views)
Hi Hani,

Not sure if you'd still like to reply after all this time but I'll give it a try:

To be honest, I'm not paying attention to the grounding at all Smiley Indifferent ...
I'm using a USB-6251 device and I'm connecting my counter line to the inner cable of the BNC cable and I'm not using the outer (grounding) part of the BNC cable at all. I tried to understand the info you presented in that link, but I don't really know whether to use a pull down or pull up resistor, and frankly I don't really understand fully what the picture says. I just connect the Digital I/O line with a GND line on the board with a resistance in between? As for the rest, I just keep using it the same way?

More info on this is greatly appreciated.

Tom
0 Kudos
Message 20 of 32
(2,084 Views)