LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a File As an Input After Editing

Hello,

 

I am trying to use labview to control 4 motors via Mach3 controller. In order to do this, I need to create a gcode file and then pass that into the filename in order for Mach3 to load it and and run. I am using labview to 1) edit the gcode file based on input specs and then 2) feed the file into the mach3 functions. These steps both work independently, however, when combined there is a disconnect between the file being edited and then using it as an input.

 

I think the issue lies in the fact that I am both editing the file and then using it as an input in the same vi. I was wondering if there was any workarounds? I already tried using time delays and that doesn't work.

 

Thank you.

0 Kudos
Message 1 of 2
(314 Views)

1. You are not telling the Format Into File where to save the data.  You should pass in the file path.

2. You are not closing the file either.  If you supplied a file path to the Format Into File, leave the file reference output unwired and it will close the reference for you.

3. You really should give your loop a clean exit instead of relying on the Abort button.  Using the Abort button could easily leave things in a bad state.  A simple stop button wired to the loop termination would suffice.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(306 Views)