Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify programmaticaly a physical channel in a task

Solved!
Go to solution
Highlighted

Hi,

I'm looking for a way to modify the physical channel of a task.

I already tried this but got an error...

Does anybody has an idea how to implement this correctly?

 

The goal is to have a preconfigured task with many channels where I can change some physical channels if needed.

 

Thanks for any help.
Yves

 

image.png

0 Kudos
Message 1 of 7
(246 Views)

Instead of PhysicalChanName property, did you try using Channels property?

0 Kudos
Message 2 of 7
(191 Views)

Not yet. I'll try it tomorrow and give feedback.

Thanks for the idea.

 

Yves

0 Kudos
Message 3 of 7
(177 Views)

Hi, 

 

I just tried your approach. 

Did you meant something like this?

If yes, then it didn't work.

image.png

0 Kudos
Message 4 of 7
(162 Views)

This is not an authoritative answer, but I *suspect* it to be true:

 

A defined task is inextricably bound up with the physical channels it was configured to contain.  To change the physical channels involved in a task would require clearing the original task and configuring a new one with the new set of physical channels.

 

At least, I *think* so.

 

 

-Kevin P

Message 5 of 7
(151 Views)
Solution
Accepted by topic author Yves

Hi,

Well, to be honest too, I talked to NI support. 

And after some checks they admitted that this can't be done programmaticaly. This function seems to be read-only even if it looks like it's possible.

I'd say this is a bug! Otherwise it should be documented clearly and obviously it is not. 

And come on, why shouldn't it be allowed.

 

But anyway. For my this case is closed and I resignate to build the daqmx-task everytime I need to change something.

 

Yves

0 Kudos
Message 6 of 7
(133 Views)

@Kevin_Price wrote:

This is not an authoritative answer, but I *suspect* it to be true:

 

A defined task is inextricably bound up with the physical channels it was configured to contain.  To change the physical channels involved in a task would require clearing the original task and configuring a new one with the new set of physical channels.

 

At least, I *think* so.

 

 

-Kevin P


Just to chime in, and not an authoritative answer. I have added channels to an existing task without clearing it, etc. However, if I wanted to remove channels from an existing task, then I had to clear, configure a new one, etc.

 

mcduff

Message 7 of 7
(96 Views)