Python - yield INTERP_EXECUTE_FINISH

More
14 Apr 2023 17:53 #269014 by zz912
I tried doing it the other way around. I created an ngc file and wrote python commands in it:
;py,print("Hello")
G1 X10 Y10 f50  
;py,print("I moved")
G1 X20 Y20 f50
;py,print("I moved to second place")
M30
Unfortunately, it doesn't work the way I want it to.
It makes:
1) Print "Hello" "I moved" "I moved to second place"
2) move to x20 y20

I would like to ask if there is documentation for the command ";py," for the interpreter. I can't find anything anywhere.
 

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 11:59 #310064 by rockcnc
hey zz912
did you solve this problem?
i have the same problem and stuck in it for a while ):

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 12:07 #310065 by zz912
I made my remap in G-code.
Python doesnt like me.

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 12:23 #310066 by rockcnc
can you please give me an example of your G-code
just like you i need to wait for some entrance

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 12:27 #310067 by zz912
o<atc-right> sub

M66E0L0 (Přepočítání LCNC)
o401 if [#<_hal[hm2_7i96.0.gpio.009.in]> NE 1]
(MSG, Osa Z nesepla horní mikrospínač)
M66E0L0 (Přepočítání LCNC)
M2
o401 endif



M64 P3 (DO_3 ON - zapnuti otaceni karuselu)


(Čekání na dotočení karuselu)
#1 = 0
M66E0L0
o201 while [#<_hal[carousel.0.active]> NE 0]
G4 P0.1 (Počkej 0.1 sekundy)
M66E0L0
#1 = [#1+1] (increment the test counter)
o202 if [#1 GT 60]
(DEBUG, Karusel se otáčel moc dlouho - #1 sekund)
M66E0L0 (Přepočítání LCNC)
M65 P3 (DO_3 OFF - vypnuti otaceni karuselu)
M2
o202 endif
o201 endwhile

M65 P3 (DO_3 OFF - vypnuti otaceni karuselu)


G4 P0.05 (Počkej 0.05 sekundy)

M66E0L0
M61 Q#<_hal[carousel.0.current-position]>
G43 H#<_hal[carousel.0.current-position]>
G4 P0.01
M66E0L0

f50 (nastaveni minimalni rychlosti)

o<atc-right> endsub [1]
M2
The following user(s) said Thank You: rockcnc

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 13:15 #310074 by rockcnc
Thankyou
I send "z_up" with stm with serial and in exact moment I need z axis to go up
i really don't understand what you saying
can you help me please?

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 13:28 #310076 by zz912
I have no problem helping you, BUT you must describe what you exactly need:
- we need wiring diagrams (or description electronic)
- your current LCNC configuration
- description of machine/ATC function
- photos of the machine would help

Start a new thread called, for example, ATC - rockcnc.

Please Log in or Create an account to join the conversation.

More
13 Sep 2024 13:34 - 13 Sep 2024 13:46 #310077 by Aciera
Last edit: 13 Sep 2024 13:46 by Aciera.
The following user(s) said Thank You: zz912

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum