Some questions about VCP <Answered>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
mrm
Posts: 2
Joined: Mon Mar 24, 2025 5:38 am
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: 20D77886E367-1102226642
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Some questions about VCP <Answered>

Post by mrm »

Hello, i have a few problems i'm trying to solve for a custom VCP i programming.

1. How do i define what monitor/display to use for CNC12 + VCP?
I have 2 monitors connected to my CNC PC, and i previously had it working so CNC12+VCP always opened on my 2nd display.
I then changed display (to one that uses the correct resolution) and now, no matter what i do, CNC12+VCP opens on my primary display.
I've tried changing "main display" in windows, but that does nothing as far as i can figure out... Is there a solution for this?

2. In my VCP, i wanted to implement a "secondary" DRO for WCS.
I got this working with Machine coordinates using the system variable SV_MPU_ABS_POS_x, loading the value into a FW in the PLC program, and displaying the float-word in the VCP.
I've tried using SV_?_AXIS_METER, and SV_METER_x but without any luck.
Is there a way to store the "current position" (in WSC) to a FW variable in the PLC program?

3. My final question is a bit less specific, and i guess more of a feature request-ish.
Is it possible or is there any plans to implement a way to define the grid size for the VCP (ie. adding more columns) ?
Ideally i wopuld have the VCP on a separate display than CNC12, and would like to implement more ease-of-use functionalities, like multiple indicator lights, buttons, DRO(s) for axes and spindle speed, more graphics and so on...

for question 3, i realize that creating an external app using the API is possible, but would prefer to "just" modify the VCP

Thanks in advance :D


Centroid_Jacob
Web Developer
Posts: 96
Joined: Wed Oct 19, 2022 4:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: No
CNC11: Yes
CPU10 or CPU7: No

Re: Some questions about VCP

Post by Centroid_Jacob »

1.) CNC12 (and the VCP) will always launch on Screen 1, based on your Windows Display settings. You can tell it to launch on the second monitor by adding the line "--display2" to the startupOptions.ini file in your CNCM/CNCT directory, without the quotes. To display on a third monitor, you would add "--display3" instead. Your edited file should look something like this:
Screenshot 2025-03-25 122453.png
Screenshot 2025-03-25 122453.png (1.55 KiB) Viewed 5393 times
Note: "--display1" is not valid and will not work since by default CNC12 launches on the First screen.

2.) Something like this should be possible but this is not my area of expertise, @cncsnw or @Allin1Chris might have a better idea of how to accomplish this.
Screenshot 2025-03-25 121813.png
CNC12 keeps position data in system variables, so pulling from those should work but I am still learning PLC editing myself so I can't say for sure.

Alternatively, the CentroidAPI should be able to do this.

3.) This is an interesting idea. Making the VCP a full screen application is not a small feat. Maybe @cnckeith will chime in with his thoughts but I would say this is unlikely to happen without some noise from the community suggesting how full screen VCP for dual monitor setups would improve the operators work flow.
When requesting support please read this post first.

A fresh report makes it easier to assist you. To make a report check this post


cnckeith
Site Admin
Posts: 8843
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: Some questions about VCP

Post by cnckeith »

"meter" refers to the power level of the axis motor not position
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


cncsnw
Community Expert
Posts: 4491
Joined: Wed Mar 24, 2010 5:48 pm

Re: Some questions about VCP

Post by cncsnw »

The PLC program does not generally know what the current WCS offset is (nor even the encoder counts per inch for any given axis).

If you want your PLC program to compute an FW variable that shows axis position in local coordinates, then you will have to make your CNC programs transmit the WCS offsets to the PLC somehow: for example, by writing CNC system variables #2500, #2600 and #2700 into Machine Parameter values (preferably 700-series) at the start of any job, and/or whenever the WCS selection might have changed. For the Z axis, you would also want to transmit the tool height offset (or send [#5023-#5043] instead of #2700, to get the height offset rolled in with the WCS offset).

So, you might make a custom M function that says something like:

Code: Select all

IF #50001   ; do not proceed with parameter setting until execution reaches this point
G10 P701 R#2500
G10 P702 R#2600
G10 P703 R[#5023-#5043]
Then you could call that M function at the start of every job, and after any coordinate system or tool height offset changes.

Your PLC program could the convert SV_MPU11_ABS_POS_n to units in machine coordinates, then subtract SV_MACHINE_PARAMETER_70x to convert the position to local coordinates.


mrm
Posts: 2
Joined: Mon Mar 24, 2025 5:38 am
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: 20D77886E367-1102226642
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Some questions about VCP

Post by mrm »

Thanks all, your help very much appreciated :)

For future reference if anyone finds this:

1.) adding '--display2' to the ' startupOptions.ini' file works, i had to up to the latest version of CNC12 (seems like V5.10 introduced the feature)

2.) i pretty much used cncsnw's example*, making it a macro that i call whenever the origin is changed (probing). This works very well :)

Macro: *(P1701 instead of = P701...)

Code: Select all

IF #50001   ; do not proceed with parameter setting until execution reaches this point
G10 P1701 R#2500
G10 P1702 R#2600
G10 P1703 R[#5023-#5043]
PLC code:

Code: Select all

IF True THEN Xcoordinate_FW = ((SV_MPU11_ABS_POS_1 / 400.0) - SV_MACHINE_PARAMETER_701 * 2) 
IF True THEN Zcoordinate_FW = ((SV_MPU11_ABS_POS_0 / 800.0)*(-1)) - SV_MACHINE_PARAMETER_701
a few extra notes for anyone looking to do something similar:
- Make sure number that FW is divided by is also float (400.0 NOT 400), if not it seems to change the type to integer
- Z is multiplied by -1 since the axis is inverted
- X is divided by 400 and origin is multiplied by 2 in the end to get X in DIAMETER instead of radius

3.) Understandable, i will be hoping for a feature to add a few extra columns one day :)


cncsnw
Community Expert
Posts: 4491
Joined: Wed Mar 24, 2010 5:48 pm

Re: Some questions about VCP

Post by cncsnw »

Macro: *(P1701 instead of = P701...)
I must have missed where you told us you were using Lathe software. As you have found, the G10 format for setting machine parameters is different on lathe vs. mill.


Post Reply