How can LabView call a bat script?

You can call a bat script in LabVIEW by using the System Exec VI. Here is a simple set of steps:

  1. Open a new VI in LabVIEW.
  2. Right-click on a blank area in the Block Diagram, then select “Functions” -> “Programming” -> “System Exec.vi”.
  3. Drag and drop the System Exec VI onto the Block Diagram.
  4. Input the path of the bat script into the “Command Line” input box of the System Exec VI.
  5. Optionally, you can enter the necessary parameters into the “Arguments” input box.
  6. Execute bat script in LabVIEW by running VI.

Please note that when calling a bat script, it may be necessary to pay attention to the permissions and path settings of the bat script to ensure that LabVIEW can call it successfully.

广告
Closing in 10 seconds
bannerAds