I am trying to change the PhysicalName of my AIChannels of my DaqAssistant generated code. I know I need to change the DaqTask.User.vb file to add in my custom functionality. I also learned that I need to dispose of my task and create a new one in order to change this field, otherwise nothing happens. Does anyone have an example of Disposing a task, then creating with new PhysicalNames assigned to my channels?
Also, when I did try to change the PhysicalName (without disposing so it never really worked), I get the exception that the Task needs to be committed or started before this property can be changed. I don't really understand this since it seemd that once the task is committed you cannot change the PhysicalName anyway. I am planning on using the following to create teh new channels so let me know if this is will work.
AIChannels.CreateVoltageChannel("Dev1/ai0", "Voltage_0", AITerminalConfiguration.Differential, -5, 5, AIVoltageUnits.Volts) AIChannels.CreateVoltageChannel("Dev1/ai1", "Voltage_1", AITerminalConfiguration.Differential, -5, 5, AIVoltageUnits.Volts)
AIChannels.CreateVoltageChannel("Dev1/ai3", "Voltage_2", AITerminalConfiguration.Rse, -5, 5, AIVoltageUnits.Volts)
Thanks for any advice.
Darren