I am writing a LabVIEW program that is used on many computers in our teaching labs and therefore the Daq device may not always be named "Dev1" in Max. My first pass is a subvi (attached) which scans the Dev Names until it finds a product match and return the device name. I would then append the port, line or counter to the name. This gives me coercion dots and there doesn't seem to be a conversion fuction between strings and I/O.
My next thought was using the I/O type property (2nd VI) but the freq output and the PFI lines which I need are not listed.
Finally, I could just rewrite the Max settings everytime the program starts but this seems to be a brute force approach.
Is there a way I can make my program adapt to whatever the Device Settings are?
Any comments or suggestions would be appreciated.
you can use the "type def" function to convert string to I/O. From the first view i think your attached examples could do what you need.
Hope it helps.
The simple way is to assign alias names in NIMAX then use the Alias in DAQMX calls. Each computer needs to be setup whith Aliases but the code remains the same.