From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

single write to digital port

Solved!
Go to solution

Hi all,

 

A bit embarrassed to ask but I have a simple question. Is there, BTW, a general document about DAQMX, not just help pages. I always miss the overview and have to look in the examples. This works as long the examples match your goal, otherwise I start trying around. Suggestions are welcome.

 

To end a digital out session I want to write all 1's to the 32 bit port p0 of a PCI-6229. See attached pic. Now,

 

1: do I first start the task and then write data? Or write data and then start?

2: do I have to 'wait until done' before stopping and clearing?

 

your answers are appreciated!

 

Mark

0 Kudos
Message 1 of 2
(3,176 Views)
Solution
Accepted by topic author markjoe

For a general overview, see the Getting Started With DAQmx page.

 

In your example, it's fine to first start the task and then write the data.

 

It's not always necessary to do a Is Task Done. When you have a static write like in your example, you don't need it. If you were doing a continuous, hardware timed generatation, then it would be appropriate.

Message 2 of 2
(3,171 Views)