08-09-2006 08:17 AM
08-10-2006
04:57 PM
- last edited on
11-16-2025
04:01 PM
by
Content Cleaner
Hello Greg,
You can control each of the individual lines of a DIO card by using a separate task for each line. A DAQmx task is a collection of virtual channels, timing and triggering information, and other properties regarding the acquisition or generation. If you want to have the ability to write to a single line you'll want to have each of the lines in separate tasks. Otherwise, you can include all of the lines in a single task and write to them all at once.
You may find these links helpful since you are just getting started with NI-DAQmx:
Transition from Traditional NI-DAQ to NI-DAQmx
Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
Post again if you have any further questions,
08-11-2006 02:00 AM
Hello Micaela,
I've found out about the difference of tasks and channels in the meantime. However, thanks a lot for answering. The application is running fine now.
Best Regards,
Greg
06-18-2007 11:40 AM
I have a 6516 card and I'm try to control the eight lines on port 3 individually. I've gone through all the sample code and such. Is this card capable of this? Here's the code that I have write now.
Dim digitalWriteTask As Task = New Task()
digitalWriteTask.DOChannels.CreateChannel("Dev1/port3/line0", "port1", ChannelLineGrouping.OneChannelForAllLines)
Dim writer As DigitalSingleChannelWriter = New DigitalSingleChannelWriter(digitalWriteTask.Stream)
writer.WriteSingleSamplePort(True, 1)
I've tried ChannelLineGrouping.OneChannelForEachLine and DigitalMultiChannelWriter with no luck. I also tried making a task in MAX to control Dev1/port3/line0 and this doesn't work either. I'm starting to think this isn't supported on this card.
Could any shed some light on this for me.
Thanks in advance,
Gary
06-18-2007 12:16 PM