LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

configuring single pin for writing in a digital port

is it possible to condigure single line in a digital port for wriitng. like i have used DAQPad 6508 before which has 8255A's. that doesnt allow single line of a port to be configures rather a complete port has to be always configured.
please tell me that through which DAQPad i can accomplish ths task as i want to replace DAQpad 6508 device with the one which allows me to configure single line in it.
thanks in advance.
waitin for a prompt reply.  
0 Kudos
Message 1 of 5
(4,071 Views)

Hi Huzach,

You are correct, the DAQPad-6508 does not allow single line configuration, only port configuration.  As a replacement, I would recommend our USB-6501 or USB M-Series because they will allow single line configuration.

I hope this helps, please let me know if you have any other questions.

Regards,
Erik J.
National Instruments

 
0 Kudos
Message 2 of 5
(4,047 Views)
I have the same question regarding the DAQ 6015 device.  Can I only write to all lines at once?  I can not specify an individual line instead of all 8 lines in the port?  Does "WriteToDigitalLine" really not work for my device like the error suggests?  When using "DAQmxWriteDigitalLines" you can only specify the handle and not the channel and you have to use the 8 bit wide array.  You can create multiple channels in a task but not use them indivually?

thanks
0 Kudos
Message 3 of 5
(3,878 Views)
A continuation of the last post/question i added.  If i have a different task for each line(with one channel & one line within that task)  how do i write to that single line without affecting the other tasks/lines?  With 'DAQmxWriteDigitalLines"  you still have to write to an array of 8 bits. 

Or if all lines are in one task I would want to do something like this but the x's arent allowed:

uInt8 line1_on[8]={1,x,x,x,x,x,x,x};
uInt8 line1_off[8]={0,x,x,x,x,x,x,x};

Then using the write function
 
if x==1
DAQmxWriteDigitalLines(digitalouts_handle,1,1,10.0,DAQmx_Val_GroupByChannel,line1_on,NULL,NULL);
else
DAQmxWriteDigitalLines(digitalouts_handle,1,1,10.0,DAQmx_Val_GroupByChannel,line1_off,NULL,NULL);

The x's signify a don't care, so i dont write to the other channels specified
0 Kudos
Message 4 of 5
(3,874 Views)
Hi eward,

It is certainly possible to write to a single line on your 6015. You can test this out in the Measurement and Automation Explorer (MAX) Test Panels. If you would like to write to specific digital line(s) simply configure the specific line(s) using the DAQmxCreateDOChan and then write to them using the DAQmxWriteDigitalLines function. Keep me posted if your have more questions.
Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 5 of 5
(3,805 Views)