Jump to content

Outputs from System Exec


Recommended Posts

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?

post-3786-1236776547.png?width=400

Link to comment

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

Link to comment
  • 2 months later...

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?

post-15120-1242851160.jpg?width=400

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.

post-15120-1242854411.jpg?width=400

Thanks

Link to comment

QUOTE (jmax007 @ May 20 2009, 10:20 PM)

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

post-7256-1242903279.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.