LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

basic i/o with usb 6211

Hi,
 
I'm new to the NI world and would like to know how to perform basic I/O with LabWindows/CVI.
I'm using the DAQ USB 6211, and would like to output a DC signal to the terminals PFI0 through PFI3.
 
What's a good starting point? Are there any sample code that I could base myself on?
 
Thanks,
Concordian
0 Kudos
Message 1 of 4
(3,490 Views)
Hello,

you can start with the Analog Output/Generate Voltage DAQmx examples that were installed on your computer with DAQmx. The easiest example is VoltUpdate which sets analog voltage on one channel at a time.

I do not believe that you can generate analog voltage on the PFI lines on the 6211, you would need to consult the documentation for details.

In the future, you might want to post DAQ related questions on the DAQ board, e.g. Multifunction DAQ, you will get great answers from DAQ experts.

Hope this helps.
LDP
0 Kudos
Message 2 of 4
(3,486 Views)

oh thanks, I'll check it out.

 

0 Kudos
Message 3 of 4
(3,460 Views)
It worked, here's how:
 
 
   uInt8       data[8]; 
   char        chan[256] = "/Dev2/port1/line0";             //exact port location
 
   data[0] = 0;         //binary value, the port will output 0 or 5 VDC.
   DAQmxCreateTask("",&taskHandle);
   DAQmxCreateDOChan(taskHandle,chan,"",DAQmx_Val_ChanForAllLines);
   DAQmxWriteDigitalLines(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL);
 
 
BR,
concordian
0 Kudos
Message 4 of 4
(3,421 Views)