LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use Labview to input some DOS command

Dear everyone,
This is the first time I program external device using Labview. You may come up the solution for me in 2 seconds, but it took me more than 20 hrs and still not success.
My question is I need to control a 68HC11 device. It seems like I need to use DOS to upload a *.S19 file before I am able to talk with the device. Is there any way, I can upload the S19 file and some setting using Labview instead to go to DOS? I try to use DOS to upload S19 file and do setting FIRST and then use Labview to input command, but it doesn't success.
Please help!!
Thanks
Download All
0 Kudos
Message 1 of 6
(3,467 Views)
What about Functions->Communication-> System Exec.vi
Does this work?

Pawel
0 Kudos
Message 2 of 6
(3,467 Views)
A fast workaround: in your VI diagram's function palette, there is a "sys exec" under communication tab. You can use it to run DOS commands.

hope it helps,
Dan
0 Kudos
Message 3 of 6
(3,467 Views)
It seems you are using zterm from the commandline to communicate to a serial device (this is not DOS per se, you are just using a DOS window to start the zterm program).

You should be able to duplicate all that in LabVIEW by communicating directly with the serial port. Are you sure you have to program your module every time?

Apparently, F9 initiates some file transfer. Do you know what standard it uses (e.g. xmodem, zmodem, etc.)? LabVIEW does not incoroprate serial transfer utilities, but there might be utilities available elsewhere (see this note).

There should also be no problem uploading the code using zterm, then later
communicate with the device using LabVIEW by sending commands to the serial port. What do you mean exactly by "but it doesn't success". How are you communicating? What kind of errors are you getting?
Message 4 of 6
(3,467 Views)
Hi Marco,

You only have to use the "System Exec.vi" located under the Communications subpallet. In that vi u have to put correctly the path of the working directory and the command line. I have included a sample code for your convenience.

May the force be with u!
GN
0 Kudos
Message 5 of 6
(3,467 Views)
This answer from attenbach is the only one that is really viable for full automation. Zterm is an old terminal emulation program. I don't have it on my Win2K or XP systems. Don't know when it went away but you could just as easilry use something like Hyperterminal. Even if you are successful in having Zterm and starting it, you would still need a lot of manual intervention to send addtional commands, change baud rate, initiate the file transfer and then select the file to transfer. Maybe this is what you want. You could however, just as easily do everything with a script in a modern terminal emulation program such as Procomm. You could also do everything in LabVIEW with VISA Writes. As attenbach noted, you will have to do some research and find out
the protocol required for file transfer.
Message 6 of 6
(3,467 Views)