You are not logged in.

#1 2016-10-10 21:35:17

RogerP
Member
Registered: 2016-04-22
Posts: 20

Set Variable Values in Gcode

Is it possible to set values to nanoDLP variables in Gcode fields? Like [[PositionSet mm]]

I would like to set ZLiftDistance and ZSpeed dynamically in the GCODE After Each Layer textbox.

Offline

#2 2016-10-11 07:26:41

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,536

Re: Set Variable Values in Gcode

Are you using RAMPS or direct control?
It is possible to add these variables. How you are going to use them? You know we have loads of small features which I guess no one use.

Offline

#3 2016-10-11 11:53:17

RogerP
Member
Registered: 2016-04-22
Posts: 20

Re: Set Variable Values in Gcode

No I am not using RAMPS I use another board with arduino UNO.
My idea is to calculate a value for ZLiftDistance and ZSpeed, using { } in the textbox, set them to the correspondent variables and use them with G1 command.
For instance, if it is available:
[[ZLiftDistanceSet {operation}]]
[[ZSpeedSet {operation}]]
G1 Z [[ZLiftDistance]] F [[ZSpeed]]

Offline

#4 2016-10-11 15:49:21

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,536

Re: Set Variable Values in Gcode

You can already do
G1 Z {{Lift Calculation}} F {{Speed Calculation}}

How load and save will be useful in the same text area?

Offline

#5 2016-10-11 18:35:31

RogerP
Member
Registered: 2016-04-22
Posts: 20

Re: Set Variable Values in Gcode

I know and I use it, but as I am planning to use a big formula for each parameter (dependent on layer position and area) it would be easier if they were not in the same command as G1. But no problem if it is not implemented, just asking to know if it is possible.
Is there a size limit for the text formula?

Offline

#6 2016-10-12 05:19:57

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,536

Re: Set Variable Values in Gcode

No limit on text formula.

Offline

Board footer

Powered by FluxBB