PaulG. Posted March 12, 2009 Report Share Posted March 12, 2009 I am using System Exec.VI to run .BAT files to program PICs. If I run the BAT file manually and the programmer is not plugged in or not connected or powered up (etc) I get a "No PICkit 2 found". I would really like to automate this step. How can I get this text to show up in one of my outputs from System Exec? Or do I have to do something else to get this message into my LV code? Quote Link to comment
dannyt Posted March 12, 2009 Report Share Posted March 12, 2009 Paul I have had some fun in the past playing around with the system Exe.vi. We have some thirdparty exe's we want our ATS to run, this exe's provided back info to std output if all OK, and std Error if there are problems. I found I could not get things working correctly for me when I passed ecverything in on the commad line input (though I have had the work in the past with other exe's) and instead I just fed into the command line input "cmd.exe." I then passed into the standard input my exe name and required parameters for example "capture_phy.exe -n 330 -f tmp.t" the other key thing was I had to then remember to terminate this line with an "end of line". Using this I could get my capture_phy.exe to return both info on std output and error's on std error no problems. Hope this may be of some help dannyt Quote Link to comment
jmax007 Posted May 21, 2009 Report Share Posted May 21, 2009 I am working on the exact same thing as Paul and I am seeing the same problem. When I use systemExe.vi, my PIC gets programmed correctly, but if I unplug the pickit2, the systemExe.vi still returns '0' in the return code. I am trying to figure out how I can detect this error. I have tried dannyt's suggestion, but I cannot seem to get it to work. I am new to LabVIEW, so I may be doing something wrong. Where is the "end of line" termination supposed to be? Thanks Just to reply to my own question. I figured out how to get it working. I put the whole command into the command line. I guess for the error to return correctly I have to call the program direct through SystemExe.vi and cannot use a batch file. Thanks Quote Link to comment
dannyt Posted May 22, 2009 Report Share Posted May 22, 2009 QUOTE (jmax007 @ May 20 2009, 10:20 PM) I have tried dannyt's suggestion, but I cannot seem to get it to work. I am new to LabVIEW, so I may be doing something wrong. Where is the "end of line" termination supposed to be? Thanks I would have the "end of line " after the -m and I would not have the quotes around the string. An example is shown below Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.