Hello,
Thank you for contacting National Instruments.
It is not possible to determine the device number programmatically from the task id. This would be slightly redundant since you must supply a device number when you Port Config executes. You could simply create a local variable of the Device Number control that is connected to the Port Config.vi if you need to use the device number elsewhere in your VI. Simply right-click on the Device number control and select Create >> Local Variable. Then right click on the local variable and select change to read. This will allow you to read the value of the device number you provided anywhere in your VI.
If you would rather determine the actual device that is being used rather than the device number, yo
u can use the Get DAQ Device Info.vi. I have attached a simple example program that demonstrates how to use the VI.
Regards,
Bill B
Applications Engineer
National Instruments