Is it possible to create own variables?

This forum is for requests and queries about machine tool support for Vectric Products
Post Reply
LF_TEC
Posts: 37
Joined: Tue Dec 25, 2007 10:28 am
Location: Germany

Is it possible to create own variables?

Post by LF_TEC »

Hello!

is it possible to create a separate variable like XPS = ( X PLUNGE START ) , with the value of Current tool Position X in the file ppVariables.lua?
The Problem i have - some parameters of the machine control need only the value without the Character String. Delete the character String from Current coordinate axis of tool position in X, then this is also missing in the G-code.

have a nice day ;-)

User avatar
BrianM
Vectric Staff
Posts: 1964
Joined: Mon May 16, 2005 10:15 am
Model of CNC Machine: A few ...
Location: Alcester U.K
Contact:

Re: Is it possible to create own variables?

Post by BrianM »

Hi,

You can't create your own variables for the normal post processor. The ppVariables.lua file associates existing variables with a lua variable.

Brian

LF_TEC
Posts: 37
Joined: Tue Dec 25, 2007 10:28 am
Location: Germany

Re: Is it possible to create own variables?

Post by LF_TEC »

thanks for the quick response.

Then I need another solution!! :(

User avatar
BrianM
Vectric Staff
Posts: 1964
Joined: Mon May 16, 2005 10:15 am
Model of CNC Machine: A few ...
Location: Alcester U.K
Contact:

Re: Is it possible to create own variables?

Post by BrianM »

LF_TEC wrote:Hello!

is it possible to create a separate variable like XPS = ( X PLUNGE START ) , with the value of Current tool Position X in the file ppVariables.lua?
The Problem i have - some parameters of the machine control need only the value without the Character String. Delete the character String from Current coordinate axis of tool position in X, then this is also missing in the G-code.

have a nice day ;-)
Hi,

If you remove the character strign from the master variable declaration, you can then include it in those strings which actually need the variable.

e.g.
VAR X_POSITION = [X|C|X|1.4]
goes to
VAR X_POSITION = [|A|X|1.4]
Remove the X and change the C to an A so variable is always output

then
begin RAPID_MOVE
"G0[X][Y][Z]"
Changes to
begin RAPID_MOVE
"G0X[X][Y][Z]"
The X is inserted in the block definition rather than the variable definition.


Brian

LF_TEC
Posts: 37
Joined: Tue Dec 25, 2007 10:28 am
Location: Germany

Re: Is it possible to create own variables?

Post by LF_TEC »

many thanks, thats a great idea! :D

another problem i have to fix is the Safe-Z value. :?
The machine control NUM750 set Z-Axis to Zero on the first Line of the NC-Code.
Actually Safe-Z is on 10mm over material, now the Frist Plunge-Move get on Z-5.00, nothing happens. Is it possible to calculate SAFEZ+Z-Plunge?

it is difficult and the machine is very old :oops:

User avatar
Mark
Vectric Staff
Posts: 1058
Joined: Sat Aug 18, 2007 2:55 pm
Model of CNC Machine: CNC Shark, ShopBot, Roland PNC3000
Location: Alcester U.K.
Contact:

Re: Is it possible to create own variables?

Post by Mark »

Hello LF_TEC,

If you would like to send me an example of what you are trying
to do, plus any documentation of the format required for your machine,
that you have.

(A reference VCarve Pro CRV file would be useful as well).

We are unable to make any promises that we will be able to drive your
machine, but we will take a look and get back to you.

I hope that this helps.

Cheers,

Mark.

LF_TEC
Posts: 37
Joined: Tue Dec 25, 2007 10:28 am
Location: Germany

Re: Is it possible to create own variables?

Post by LF_TEC »

Hello Mark,

see the attached files.
We need the value of SAFE-Z add to the variable Z_POSITION.
If Z_POSITION actually Z-5.00 and the SAFE-Z -10.00 so we need on Z_POSITION -15.00

The Z-Axis get on Z=0 with the First Plunge Move, but the machine is 10mm over material.


thanks for your help

Jürgen
Attachments
TESTFILE.crv
Original Testfile of VCarve 5.5
(15 KiB) Downloaded 182 times
TESTFILE.txt
NC-Code from VCarve | attached PP
(3.05 KiB) Downloaded 216 times
WeekeBP05_G90_Arcs_V7_mm.pp
VCarvePP for Weeke BP05 Router
(5.64 KiB) Downloaded 203 times

Post Reply