do - while | with time.0.minutes and time0.seconds
- lblabr
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
05 Dec 2024 22:37 #316057
by lblabr
do - while | with time.0.minutes and time0.seconds was created by lblabr
i have realized a mixer for fluids with linuxcnc (linear axis and servos)
i have a question:
the mixer needs to be go up and down a certain time. i tried to use the time module, but everytime i try to use the calculated value in the while clause linuxcnc stops loading or hangs on realoding the program
#<z_mischen_start> = [#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>]
G97 S800 M03
o101 do
#<z_mischen_elapsed> = [[#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>] - #<z_mischen_start>]
G1 X270 F1000
G1 X250 F1000
o101 while [#<z_mischen_elapsed> LT 4]
any ideas? i'm quite new to linuxcnc ....
thanks a lot !!!
Lars
i have a question:
the mixer needs to be go up and down a certain time. i tried to use the time module, but everytime i try to use the calculated value in the while clause linuxcnc stops loading or hangs on realoding the program
#<z_mischen_start> = [#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>]
G97 S800 M03
o101 do
#<z_mischen_elapsed> = [[#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>] - #<z_mischen_start>]
G1 X270 F1000
G1 X250 F1000
o101 while [#<z_mischen_elapsed> LT 4]
any ideas? i'm quite new to linuxcnc ....
thanks a lot !!!
Lars
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4077
- Thank you received: 1763
05 Dec 2024 23:32 #316061
by Aciera
Replied by Aciera on topic do - while | with time.0.minutes and time0.seconds
Reading hal pins in gcode is tricky as you need to sync the interpreter to update the values:
linuxcnc.org/docs/stable/html/gcode/over...gcode:ini-hal-params
Try this:
linuxcnc.org/docs/stable/html/gcode/over...gcode:ini-hal-params
Try this:
#<z_mischen_start> = [#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>]
G97 S800 M03
o101 do
M66 E0 L0
#<z_mischen_elapsed> = [[#<_hal[time.0.minutes]> * 60 + #<_hal[time.0.seconds]>] - #<z_mischen_start>]
G1 X270 F1000
G1 X250 F1000
o101 while [#<z_mischen_elapsed> LT 4]
Please Log in or Create an account to join the conversation.
- lblabr
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
06 Dec 2024 09:18 - 06 Dec 2024 09:19 #316087
by lblabr
Replied by lblabr on topic do - while | with time.0.minutes and time0.seconds
it does not work, loading linuxcnc hangs an reload program,
endless rotating cursor
it looks like that linuxcnc does somthing with the gcode (syntax check, duration calculation ??) can that swicthed off?
endless rotating cursor
it looks like that linuxcnc does somthing with the gcode (syntax check, duration calculation ??) can that swicthed off?
Last edit: 06 Dec 2024 09:19 by lblabr.
Please Log in or Create an account to join the conversation.
Time to create page: 0.057 seconds