取消
显示结果 
搜索替代 
您的意思是: 

How to modify channels of a DAQmx task programatically?

Just wondering if the following items are possible using a LabVIEW program:

How to import a MAX task into a LabVIEW project?
How to rename/add/delete channels of a task in MAX?
How to rename/add/delete channels of a task in a LabVIEW project?

I am aware of how to Create/Copy/Rename/Delete MAX tasks and Global Channels, but I cannot seem to find out how to do the above items.

Thanks
CLA, CTA
0 项奖励
1 条消息(共 20 条)
11,940 次查看

Hi LVB

  1. install DAQmx, if that is done select a DAQmx Taskname constant from your DAQmx palette and select your in MAX created task
  2. use the MAX Help -> search for "create task"
  3. use "DAQmx Create Channel.vi" to assign channels to a task

Mike



Message Edited by MikeS81 on 02-15-2008 09:46 AM
0 项奖励
2 条消息(共 20 条)
11,922 次查看

Mike,

Thank you for the repsonse.  Please not that I am trying to do this dynamically (using a running VI).  I would like to read channels of an existing task and rename them using a running VI.

I am aware of the "
DAQmx Create Channel" function to create a new DAQmx task, but I cannot current extract the channels of an existing task in max to rename/delete/add channels to an existing task.

-Brian
CLA, CTA
3 条消息(共 20 条)
11,913 次查看

Hi LVB,

i created a simulated USB card on my pc and create a Task in MAX. The attached picture shows how you can read some information of this task. The palette where you can find all the property nodes is mark with the red ellipse.

To add new Channels to a task, read all assigned channels, create a "," separated string of them and add your new channels. Then use the "DAQmx Create Channels.vi". Now the task should have more channels then before.

Mike

0 项奖励
4 条消息(共 20 条)
11,898 次查看
Mike,

  I was lacking the reference on the DAQmx channel property node...  I can now add/rename/delete channels for tasks in MAX.  Any advice on how to do the following in a LabVIEW project (8.5)?

How to import a MAX task into a LabVIEW project?
How to rename/add/delete channels of a task in MAX?
How to rename/add/delete channels of a task in a LabVIEW project?


Thank You
CLA, CTA
0 项奖励
5 条消息(共 20 条)
11,888 次查看
Hi LVB,
to add a channel to an existing task, only call the "DAQmx Create Channels.vi". But don´t try to add a channel which is already assigned to this task. You will get an error. At the moment i see no way to remove channels from a task except for creating a new task with the lower number of channels. The picture shows an example to add a channel to an existing task.
 
Hope it helps.
Mike
0 项奖励
6 条消息(共 20 条)
11,887 次查看

Hi LVB

the reference connected to the "DAQmx Channel Property Node" is my in MAX created task.

Mike

0 项奖励
7 条消息(共 20 条)
11,874 次查看
Mike,

It looks like I am all set with using MAX (I assume the above 2 replies were dealing with MAX).  However, in the "Project Explorer" for a .lvproj file, you can create NI-DAQmx tasks/scales/channels.  I am also looking to modify these dynamically.

How to import a MAX task into a LabVIEW project (.lvproj/Project Explorer)?
How to rename/add/delete channels of a task in MAX?
How to rename/add/delete channels of a task in a LabVIEW project (.lvproj/Project Explorer)?


Thank You
CLA, CTA
0 项奖励
8 条消息(共 20 条)
11,869 次查看
Hi LVB,
i´m not sure what you want. You can create everything in your vi without using MAX. You can create a task as i show in previous picture, you can create channels on this task using (DAQmx Create Channel.vi), and by using the property nodes you can set the scalling of all channels.
 
How can i help you??
 
Mike
0 项奖励
9 条消息(共 20 条)
11,866 次查看
Mike,

Thanks for you patience.  Attached is a screen shot of how to create tasks/channels/scales in a LabVIEW project.  How can I save a task/channel to a project file?
CLA, CTA
0 项奖励
10 条消息(共 20 条)
11,858 次查看