LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executable problem

Dear all,
 
Am using an utility named devcon.exe that will work similar to device manager.
 
Am using an USB device. I built an exe with labview for disabling and then enabling the device repeatedly for some iterations.
 
devcon was located at desktop inside the folder devcon\i386\devcon.exe
 
I used systemexec.vi to call that exe and passing commands to disable/enable the USB device.
 
Everything works fine and exe also works fine in the same system.
 
But when i tried the exe in another system, the program is fine, but the device is not disabled/enabled. that means devcon.exe not working.
 
Any workaround?
 
Thanks,
Mathan
0 Kudos
Message 1 of 9
(2,516 Views)
You will get an error  if the "working directory" input to the System Exec VI is not a valid path to an existing directory. Please double-check your path entry, and also make sure there are no non-printable characters, like extra spaces or carriage returns in the path. 😛
We learn from each other 🙂
LV 8.2
0 Kudos
Message 2 of 9
(2,506 Views)
Hi Mathan,

"devcon.exe not working" - is it really so?
Can you check that devcon.exe is really running?
Does it receive all needed parameters?
Does it have needed access rights on this other computer?
Does it have all needed drivers/dlls?
And yes, did you check that error cluster?

What else can we help for a non-NI program?


Message Edited by GerdW on 06-26-2008 02:52 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 9
(2,505 Views)

GerdW wrote:
"devcon.exe not working" - is it really so?
Can you check that devcon.exe is really running?
Does it receive all needed parameters?
Does it have needed access rights on this other computer?
Does it have all needed drivers/dlls?
And yes, did you check that error cluster?

devcon.exe when running from DOS prompt(cmd) working fine. But when called from labview using systemexec.vi not working. No access rights needed and all are granted. It seems there are no driverfiles/dlls for that.
BTW, what do u mean by error cluster.
 
Thanks,
Mathan
0 Kudos
Message 4 of 9
(2,475 Views)
Hi mathan,

almost all "critical" LabView functions provide an error cluster output on their lower right connector pane. Just switch on the context help... It's common coding practice to check for errors...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(2,468 Views)
Dear GerdW,
 
I will check that out.
 
Meanwhile, in my vi, i gave the path directly as c:\d&s\admin\desktop\devcon\i386\       (systemexec)
It didn't worked for an exe in the other system (in same system it works fine).
 
I tried using 'current directory' function present in the file i/o function pallete and it also not working for an exe even in the same system.
 
How to give input to system exec function here.
 
Thanks,
Mathan
0 Kudos
Message 6 of 9
(2,460 Views)
Hi Mathan,

you're talking about "current vi's path"? The output of this function changes in an exe as an additional folder will be attached (the vi is now inside a folder like "\yourexe.exe\your.vi". You can read a lot of threads on this topic in the forum - or simply read the help for this functionSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 9
(2,452 Views)

GerdW wrote: Hi Mathan,
You can read a lot of threads on this topic in the forum - or simply read the help for this functionSmiley Wink

Dear all,
 
This leads me to a fine tune in the forum and let me solved the problem quiet easily. Thanks for the GerdW for not providing the solution directly, and made me solved it by myself.
 
And here we go, the solution for the problem. (Others can get benefitted, so just sharing)
 
Thanks,
Mathan
0 Kudos
Message 8 of 9
(2,444 Views)
Hi Mathan,

do I hear some sarcasm?Smiley Wink

Well, your example vi is nice, but it seems not related to "current vi's path". Anyway, here's my user.lib-version of the same function - found somewhere, somewhen here in the forum!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 9
(2,431 Views)