From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI device simulated vs. real in EXE

I have a problem here where I have 2 computers, I'll call them A and B, where A is a laptop that has the full LabVIEW software installed on it, but B is the desktop actually used in the lab to connect to the machine (company setup, not of my choosing). The NI device used here is USB 6218. I can temporarily connect A to the device (which connects to the machine) when I'm testing programs, but ultimately B is the one that will stay. 

 

So my usual thought process is I'll write a VI on A, make an EXE file (and installer) out of it, and run those on B. 

 

My question is, since I'm using the DAQ Assistant, if I create a simulated device in A, usually the instructions call for changing the physical channels in the DAQ once a real device is connected. That's fine, except once it's made into an EXE file and put on B and connected to the real device, I can't edit anything anymore. 

 

There's probably a simple answer to this -- kudos to anyone who can help.

0 Kudos
Message 1 of 4
(2,628 Views)

Don't use the DAQ assistant.  Use the lower level DAQmx functions.

 

Define your tasks programmatically within your program through task or channel controls, and other controls to set acquisition speeds or number of samples.

 

You could also define your tasks in Measurement and Automation Explorer and have your .exe program call the appropriate task by way of a front panel task control.  This would allow an ordinary user to have some limited ability to change among tasks in the program.  And a person with more experience and familiar with MAX to be able to do more detailed configuration of the task there.

Message 2 of 4
(2,625 Views)

This is a very enlightening reply! I'm going to look into it right now, except usually they want things fixed "right this moment" and I'm the only one there who knows LabVIEW. 

 

Assuming it takes me a day to figure this all out and implement it, is there no quick fix to this?

0 Kudos
Message 3 of 4
(2,621 Views)

If I'm not mistaken, the DAQ assistant writes LabVIEW code for you, and it references devices based on the names assigned to them within MAX. So, if you create a simulated device that is the same model as the real device, and you name the real device the same as the simulated device, then everything should work. Note, however, that you cannot have two devices with the same name, so if you happen to have the real device plugged into the same computer on which you defined the simulated device, you'll need to rename the one that you don't want to use.

0 Kudos
Message 4 of 4
(2,603 Views)