Is it possible to configure a button on the VCP launch an external program?
Thanks in advance.
VCP and external program launch
Moderator: cnckeith
-
- Posts: 28
- Joined: Fri Nov 22, 2024 4:25 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: B4107B77A373-0905248481
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
VCP and external program launch
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 3117
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: VCP and external program launch
You can run a macro with a VCP button and use M130 in the macro to run a system command.
10.48 M130 – Run System Command
This allows shell commands to be called from a CNC program or MDI. M130 takes one string argument which
contains the system command to execute.
Example:
M130 " mycommand .bat"
will run the batch file mycommand.bat.
Normally, the command will run asynchronously, meaning that the G-code program will not wait for the command to
finish before continuing. However, if an L1 parameter is given, the M130 command will wait until the “mycommand.bat”
finishes execution or an operator abort or fault occurs (such as E-Stop).
If you need to call a command that contains spaces in the path, then you must add escaped quotes around the path.
An escaped quote is a backslash followed by a quote.
Example:
M130 "\C:\ Users \CNC User \ myfile .bat \"
Uwe
10.48 M130 – Run System Command
This allows shell commands to be called from a CNC program or MDI. M130 takes one string argument which
contains the system command to execute.
Example:
M130 " mycommand .bat"
will run the batch file mycommand.bat.
Normally, the command will run asynchronously, meaning that the G-code program will not wait for the command to
finish before continuing. However, if an L1 parameter is given, the M130 command will wait until the “mycommand.bat”
finishes execution or an operator abort or fault occurs (such as E-Stop).
If you need to call a command that contains spaces in the path, then you must add escaped quotes around the path.
An escaped quote is a backslash followed by a quote.
Example:
M130 "\C:\ Users \CNC User \ myfile .bat \"
Uwe
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 32
- Joined: Thu Feb 10, 2022 5:55 pm
- Acorn CNC Controller: No
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: VCP and external program launch
Yes, in the .xml for the vcp button you'll do
Code: Select all
<vcp_button>
<app>C:\path\to\your\program.exe</app>
</vcp_button>
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 28
- Joined: Fri Nov 22, 2024 4:25 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: B4107B77A373-0905248481
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: VCP and external program launch
That works!
Thanks!
Thanks!
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 8486
- Joined: Wed Mar 03, 2010 4:23 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: Yes
- Oak CNC controller: Yes
- CNC Control System Serial Number: none
- DC3IOB: Yes
- CNC11: Yes
- CPU10 or CPU7: Yes
- Contact:
Re: VCP and external program launch
i added this to the VCP manual along with image as a <background>, reference to color picker and edited the <run> section as well as other minor tweaks to improve the doc. here is the link. https://www.centroidcnc.com/centroid_di ... manual.pdf refresh your browser to get the latest version of the pdf with today's date.ASPeters wrote: ↑Thu Jan 16, 2025 9:14 amYes, in the .xml for the vcp button you'll do
This is how the plasma profile manager is launched in the plasma software. You can look at .\resources\vcp\Buttons\profile_manger for an example in your cnc12 install (all buttons are included with all software).Code: Select all
<vcp_button> <app>C:\path\to\your\program.exe</app> </vcp_button>
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
(Note: Liking will "up vote" a post in the search results helping others find good information faster)