03-14-2024 02:07 PM
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.
03-14-2024 02:21 PM
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.