LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Launching an app via system exec behaves differently to launching it outside LabVIEW

Hi,
 
My problem is as follows:
 
I am trying to write some code to communicate with an Anritsu unit (MT1810A chassis with MU181020A plug-ins) via ethernet.  Anritsu supply a standalone app to control this instrument (MX180000A.exe) which gives comprehensive control over the setup & config of the instrument.
 
I want to control this unit via LV however without recourse to their program.
 
The only time that either MAX or LV seem to be able to successfully communicate with the unit is when the supplied Anritsu app is running.  Not only that, the app must be opened manually, ie by clicking on the exe (or selecting it from the Start --> Programs etc menu) or using cmd prompt with exe path.  Once the app has been started this way, MAX can talk to the unit and any LV code executes without error.
 
If however I use the system exec vi within LV to launch the Anritsu app, the app opens as normal, is able to control the unit however MAX now has an exclamation mark on the VISA resource - status shown as:

VISA returned this static device when finding resources, and MAX could use VISA to parse the resource name. MAX could not succesfully open a VISA session to the device.

and it can no longer talk to the unit.  In addition any LV code now generates the following error when trying to open a VISA connection to the unit:
 
Error -1073807343 occurred at VISA Open in BER Initialize.vi
Possible reason(s):
VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
 
So, getting to the point -
 
- Why the difference in behaviour depending on how the app has been opened?
 
(oh and of course, how do I fix it? 🙂 )
 
Regards
Andy
 
System is running XP, LV version 8.5, VISA 4.2
Unit needs to be added to MAX using manual entry of raw socket, ie

TCPIP0::192.168.1.21::5001::SOCKET

There are 2 network cards in the PC.  The unit is connected to card 2 which has been specified as the default in the network control panel.
 

 

0 Kudos
Message 1 of 3
(2,834 Views)
Just a wild guess, but maybe calling the executable from LabVIEW makes it the parent process somehow and VISA can recognize that it's using the device?

In any case, I prefer to work with the TCP primitives when working with a TCP based instrument. Saves you of having to deal with VISA.

___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,808 Views)
Hi,
 
Here is a KnowledgeBase article that might help concerning the error you're receiving. Do you see this behavior on multiple PCs as well?
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 3 of 3
(2,778 Views)