06-26-2013 10:35 PM
The basics:
LabView 11.0 (32-bit)
Windows 7 enterprise
Because I have to control an elevated app I run my built app elevated on a Win7 64 machine.
I have an application that uses the system exec.vi (attached) to get a portion of the arp table. When I run this in development it works great. However when I build an app and run it this vi causes the app to be unstable and crash.... sometimes. I have a troubleshooting vi that I wrote that I place at the start and end of vis. This puts a log file on my desktop so that I can trace where it crashes. I've attached the log as well.
Basically we have a power controller that we control by Telnet but 1st I have to get the IP. I have the MAC of the controller which is DHCP but not the IP. To get the IP I fill the ARP table and search it for the MAC.
get ARPCache.vi throws the error messaage: System Exec.vi . Command was "cmd /c "arp -a | find "192.168.120"" but only in the built app.
Update: While getting more info to complete this post I did a build where I changed "get ARPCachs.vi" to show when called so I could see the error cluster. Now it pops up but no errors. hmmm
Norm
06-27-2013 02:15 AM
Not sure about the '"' in the argument list. Are you sure that you really can use them like this without honoring escape characters?
Norbert
06-27-2013 01:22 PM
You have to remember that this is a call to the system exec and not to a labview function. Adding the esc \"\" for the quotes will cause windows to throw an error.
06-28-2013 02:14 AM
It depends on how the exe deals with the arguments. Some do honor escape characters, some not.....
Afaik, there is no difference regarding the System Exec in development environment vs. exe. But it is possible, that these are executed using different user rights?
Norbert
06-28-2013 11:14 AM
It's really strange that showing when called has cured this problem.