LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daqmx device name

Hello,

 

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.

Download All
0 Kudos
Message 1 of 5
(3,331 Views)

Hi drog,

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.

Mike

Message 2 of 5
(3,319 Views)
I think Strings shound work inplace of the IO Channel or you can explicily typecast between strings and I/O types 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 5
(3,316 Views)

Thank you gentlemen...  I will give this a try.

 

Drog

0 Kudos
Message 4 of 5
(3,272 Views)

drog

 

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.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 5 of 5
(3,261 Views)