fbpx

CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Please or Register to create posts and topics.

Can i use G00 and G53 in Scripts ?

I try to use G00 and G53 coments in a python script.. Not realy work.  Are there ways to use that coments in a script ? 

armerolopezadrian has reacted to this post.
armerolopezadrian

Yo creo que en principio si mirate en la guía de phyton tienes un apartado que hace un cuadrado con un script si no probaré en un rato

The simplest but not always optimal way to move the axis from the macro level is to use the d.executeGCode() command.

Below is an example using rapids and machine coordinates (tested a moment ago with simCNC 3.420 Beta 10).

d.executeGCode("G0 G53 X100")

 

It is much more optimal and safe to use d.moveToPosition() or d.moveAxisIncremental().
These commands do not change any parameters or modes in simCNC.
We are talking about:
- f
- G0 or G1
- G53 or G54
- G90 or G91

Whenever I wrote macro scripts for Mach3,  I had to save the above-mentioned parameters and modes to variables at the beginning of the macro to restore them at the end of the macro.

In simCNC, I don't have to do this when I use the d.moveToPosition() or d.moveAxisIncremental() commands.
It is very convenient and safe and significantly shortens the macro's length.

Just like armerolopezadrian wrote, you should look at the manual, pages 21 and 22: https://en.cs-lab.eu/wp-content/uploads/2020/06/simcnc-python-scripts-guide_en.pdf

 

W.T.

CS-Lab Support Team

armerolopezadrian has reacted to this post.
armerolopezadrian

poder cambiar a otros puestos de trabajo g55 g56 etc etc.. estaria bien para poder resevar uno para un cambio de herramientas aunque creo que seria optimo hacerlo desde las coordenadas maquina...

The tool change process should always be done using the machine coordinate system.
It is recommended to use the machine coordinate system because it is only affected by:
1) Movement of a home limit switch or encoder index signal.
2) The value of the "After homing position" parameter (this parameter overwrites the machine coordinates immediately after homing)

armerolopezadrian has reacted to this post.
armerolopezadrian

aclarada mi pregunta, el compañero de arriba no se si esta clara su duda¿?¿?

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?