12-26-2023 08:11 PM
I am writing a Labview program that writes G Code for a Machine tool. I would like my program to start NC Viewer, then allow the user to paste the G Code into the NC viewer, and to copy and paste the G Code from the viewer or another G Code editor back into Labview. NC viewer runs in a website. https://ncviewer.com
How would I do this? Would finding out how to call an Apple script from Labview be of any use?
Please point me in the right direction
Thanks, Mike
12-26-2023 08:42 PM
Can you share more details about the user workflow?
12-29-2023 06:14 PM
First, Please look at NC viewer. It is always used to check the tool path before taking the Code to the CNC Machining station, no matter who or what wrote the g code. My G code is 4 axis, but only 2 at a time and continuing to 3 in the future.
Looking in NC viewer You see the GCode in the window. It was pasted into the window from the source. In my case, my labview output. A person can tweak the Code by hand while seeing the result. Afterwards The code is copied from NC viewer back into Labview or sent to be cut.
These are complex Geometric patterns. When the user wants to see the 3D version of a pattern, I need NC viewer to do that. The pattern would be tweaked and copied back into Labview, A copy would be manipulated, rotated to be overlaid over the base pattern, then sent back to NC viewer. The user has to interact.
Please run the code to see what could be done. There is nothing wrong with the code except I did not send you the unfinished Code compiler
Thanks, Mike
01-04-2024 05:39 PM
You can embed a web browser as an ActiveX control in LabVIEW (example attached), but the website doesn't seem to expose any API to upload/download code, and all the interactions seem to be implemented in the JS running on the webpage.
You need to reach out to the owner/developer of the website to understand how to programmatically interact with the tool.