10-03-2019 07:01 AM
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
Solved! Go to Solution.
10-06-2019 06:49 PM
Instead of PhysicalChanName property, did you try using Channels property?
10-07-2019 06:19 AM
Not yet. I'll try it tomorrow and give feedback.
Thanks for the idea.
Yves
10-08-2019 02:03 AM
Hi,
I just tried your approach.
Did you meant something like this?
If yes, then it didn't work.
10-08-2019 08:53 PM
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
10-10-2019 02:02 PM
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
10-12-2019 10:13 AM
@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