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.

Enable Machine with Python Command

Hi, 

i can´t figure out how i can enable my machine with a python command.

There is a command "d.enableMachine" in the __Device.py , but i dont know how to use it.

In Makro Editor it appers like this : d.enableMachine( Bool Enable)

If i try "d.enableMachine( 1 ) " , a execution error apperas, else with true, false, state, ....

 

Is there also a way to ste state, like Idle or EStop, .... ?

 

 

Hello,

 

The Bool type variable takes only two values, True and False.

Example :

To put simCNC in idle mode, use the d.enableMachine(True) command
To put simCNC into e-stop mode, use d.enableMachine( False ) command

Regards,

Wojtek

Chris Mannion has reacted to this post.
Chris Mannion

I am trying to make a wireless E-stop. I use d.enableMachine(False) and it works fine when I play the script in the editor.

I don't want to use the same input 0 from my "red push button"; instead, I want to use input 12. However, it doesn't work in the Python action list. What am I doing wrong?

 

Uploaded files:
  • 20230423_175702.jpg

Do as shown below (in the example, I used digital input number 3):

However, I advise you against using a separate input for the radio remote control for security reasons.
It is best to use a basic s-stop circuit.

erwan has reacted to this post.
erwan

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?