LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically create a multi-channel DaqMX task

Solved!
Go to solution

Is there a way to create a multi-channel DaqMX task programatically, without having a task to copy?

0 Kudos
Message 1 of 4
(3,828 Views)
Solution
Accepted by JaNeily

Yes and there is an easy way to figure out how to do it.

 

Start by creating a task in MAX (But Ben I want to avod MAX! Have no fear this is just a one time event that will let us learn what is involved)

 

Go to a block diagram and drop a DAQmx task constant on the diagram and choose the task you created in MAX.

 

Right-click it and select "create configuration and example". LV will create the code that goes with the taks.

 

Study the config VI that was created. It will show what needs to be done to create a task without MAX.

 

I hope that helps!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(3,824 Views)

It is a thing of beauty. You are truly a gentleman and a scholar Sir Ben! 

0 Kudos
Message 3 of 4
(3,816 Views)

@JaNeily wrote:

Is there a way to create a multi-channel DaqMX task programatically, without having a task to copy?


The DAQmx Create Virtual Channel is what is used to add channels to a task.  There is also a DAQmx Create Task which creates and empty task that you can add the channels to.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,815 Views)