do - while | with time.0.minutes and time0.seconds

More
1 year 10 months ago #316057 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

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

More
1 year 10 months ago #316061 by Aciera
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:
Code:
#<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.

More
1 year 10 months ago - 1 year 10 months ago #316087 by lblabr
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?
Last edit: 1 year 10 months ago by lblabr.

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

Time to create page: 0.044 seconds
Powered by Kunena Forum