LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital out on pci-6220

Hi, I am a newbie using a PCI-6220 card with Labview 7.0 I am having troubles getting the Digital output to work.  Using the DAQ assistant, I click on Digital output >>>  Port 1 output >>> 1 Sample (On Demand) >>> Test   In the test screen, I have the output set to FF.  I have one leg of an oscilloscope connected to PFI 5/1.5 [pin 6], and one leg connected to D GND [pin 44].  On the scope, I am not reading anything, however.    So my question is, what am I doing wrong!?

Additionally, if I set the Sample Type to Continous, or N samples, using either internal, or a myriad of external clock types, I get an error that says:

"Error -201062 occurred at DAQ Assistant

Possible Reason(s):

Selected lines do not support buffered operations.

Ensure only lines that support buffered operations are being used in the task. If using change detection, the task must be changed to non-buffered hardware timed single point to support these lines.

Device: Dev2
Physical Channel: port1/line0"

Your feed back is very much appreciated!!!


0 Kudos
Message 1 of 10
(3,774 Views)
Hello heepofaje,

What are you outputting, FF doesn't look right to me, but if you mean a false constant you should see a 0 V potential, if you output a true you should see a 5 V constant.

If you just use a multimeter between the pins you described you should see these values, a good start may be Measurement an Automation explorer (MAX), here you can set easily the states of the outputs.

The reason you cannot ouput more than one sample in a stream is because you can only do buffered (or hardware timed) output on the first port.

Success,

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 10
(3,766 Views)
Are you sure that PFI 5 is port 1? A quick look at the M series manual and it looks like that pin is port 0 to me.
0 Kudos
Message 3 of 10
(3,765 Views)
 

Hi heepofajeep,

Fisrt we have to see if the board is working correctly. The best thing to do, is to use the Test Panels in MAX. Open Max, go to Device and Interfaces, NI-DAQmx Devices, click on you device, and then look for the "Test Panels" button.  Then in the Test panels, go to Digital I/O, select Port 1, then click the button "All ouput", and then in the "Select State" section, change the switches, the values of the lines of the port, do that you can check with your oscilloscope.

Also you can use the next utility to test you board, be sure to have the board disconected from any signal:

https://www.ni.com/en/support/downloads/software-products/download.daq-diagnostic-utility.html

Whar version of NI-DAQmx are you using?

Let me know how it turns out.

Tania Lozoya

0 Kudos
Message 4 of 10
(3,762 Views)

PFI5 is pin 6 is port 1 line 5 Smiley Wink
PFI's are always port 1 to give room to use port 0 for buffered in/output

 

Pin 51 is port 0 line 5

manual

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 10
(3,753 Views)
Argh. I guess it would help to read the correct manual.
0 Kudos
Message 6 of 10
(3,744 Views)
Ok, I verified correct operation through MAX, so I am sure I am just doing something wrong...  Basically, what I need to do is send a digital command [ie 0x1F] to a motor controller I am using... What would be the correct way of doing this?

Thanks!!!!
0 Kudos
Message 7 of 10
(3,695 Views)
The VI you posted doesn't have the DAQ Assistant configured so that won't do anything. If you were to double click the icon, create a digital out task for a single port. Select the port you want. On demand timing is all that you probably need. Click OK and the assistant will create a VI with an input called 'Data'. You would wire the FF (or any other value) to this input. If you still have problems, post back with another VI where you have created an actual task that can be looked at.
0 Kudos
Message 8 of 10
(3,683 Views)
I can't seem to merely wire a numerical Hex constant to the 'data', as it wants a 1D boolean array... any suggestions?

Thanks!
0 Kudos
Message 9 of 10
(3,674 Views)
I'm not sure. When I create an assistant, if requires a numeric array as an input. I seldom use the assistant anyway and if you want to write a single numeric in hex, just look at the shipping example called Write Dig Port. To see what is going on in the assistant, you can open it's front panel and look at it. There's so many options with a DAQmx Write and the DAQ Assistant may not be flexible enough, though you can still probably use it by creating a numeric and then using the Number to Boolean Array function.
0 Kudos
Message 10 of 10
(3,670 Views)