movement pauses during the execution of an MCode

More
26 Jul 2022 13:49 #248325 by mich94
Goodevening,
i'm a university student and i'm doing a thesis on a robot for bioprinting , this robot has an extruder on the end effector (a syringe)  that we control by the spindle pin: the same command that would rotate the spindle clockwise in this setup send a signal to an electropump that make some pressure to extrude, but this is not the problem. 
The Problem: during the execution of the Gcode i have some M3 commands to control the pressure and the program stops the movements while "reading" these code lines.
my question is: is there something i can do to reduce this "delay" and force the code not to stop while reading the code and continue to go on to the next point?
i've found some post on the forum about the exact opposite problem: some peoples needs the delay to wait for the spindle to fully load, i need the opposite
i've checked the .hal files and there isn't any time delay set, nor a G04 Pxxxx at the beginning, 
i'm sorry for my bad english, i'm a little "rusted", and please ask for more information if you need

here an example of GCode
G1 X-144.0043 Y-46.88943 Z-107.7 A132 B-19.88953 F300
M3 S1551
G1 X-144.9043 Y-46.70393 Z-107.9928 A132 B-19.99673
G1 X-145.3567 Y-46.61593 Z-108.1315 A132 B-20.04743
G1 X-157.0258 Y-45.48123 Z-109.9082 A132 B-20.68933
G1 X-157.5 Y-45.47953 Z-109.9108 A132 B-20.69033
M3 S1257
G1 X-157.5 Y-45.72773 Z-109.5239 A132 B-20.55163
G1 X-157.5 Y-45.97603 Z-109.136 A132 B-20.41203
G1 X-157.5 Y-46.24492 Z-108.7471 A132 B-20.29202

when the end effector is on the last point before the "M3 Sxxxx" it stops for half a second, but the pressure is still on and it makes a "clot" of material in that point, i'm trying to reduce this clot by "forcing" the program to continue moving to the next point

i'm aware of the fact that this might be veri bad explained and i'm sorry, ask for explanation if needed

p.s. in the hal file i only have this line of code about the spindle speed
net spindle-at-speed   =>   spindle.0.at-speed 
and i sincerely don't know what it means

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

More
26 Jul 2022 16:28 #248345 by Todd Zuercher
Unfortunately no there is no way to prevent a pause in motion for an M3 command because it is a que buster command.

The best way to turn on/off or pass a value to a hal pin in Linuxcnc without pausing motion is to use an M62-M63 commands to turn on/off hal pins, and M67 to set a value for a float.
The following user(s) said Thank You: mich94

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

More
17 Aug 2022 09:49 #249940 by mich94
hello Todd, thank you for the fast answer, i'll go study these Mcodes and try to figure out a solution :)

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

More
05 Sep 2022 08:36 #251216 by mich94
Goodmorning, this could be another silly question, i've figured out how to turn on and set the pin to a certain value, i'm now asking how can i set this value as an input for the M3 command,
example:
M62 P01
M67 E01 Q1000
M3 ? (SE01 doesn't go as like just E01)
may i have to extract the number with another command? or may i have to modified something in the .hal file?
sorry for all this questions and thanks for the answers

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

More
05 Sep 2022 15:14 #251232 by mich94
Nevermind, after a little of studying i think i just cannot heheh
i figured out a possible solution would be converting one of the output of the daughtercard from step-generator to pwm-generator and with this control the extruder

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

More
06 Sep 2022 12:30 #251289 by Todd Zuercher
I'm afraid you are miss understanding what I was suggesting. You need to use the M-codes above to turn your extruder on/off and set the speed instead of using M3 and Snnn. So instead of connecting the hal pins that control your extruder to the hal pins that control the spindle. You would connect them to the hal pins "motion.analog-out-00" and "motion.digital-out-00" and set their values directly using the M-codes. So your example G-code above would end up looking like this:
G1 X-144.0043 Y-46.88943 Z-107.7 A132 B-19.88953 F300
M67E0Q1551
M62P0 (optional if you need/want a digital output to turn on/off your extruder)
G1 X-144.9043 Y-46.70393 Z-107.9928 A132 B-19.99673
G1 X-145.3567 Y-46.61593 Z-108.1315 A132 B-20.04743
G1 X-157.0258 Y-45.48123 Z-109.9082 A132 B-20.68933
G1 X-157.5 Y-45.47953 Z-109.9108 A132 B-20.69033
M67E0Q1257
G1 X-157.5 Y-45.72773 Z-109.5239 A132 B-20.55163
G1 X-157.5 Y-45.97603 Z-109.136 A132 B-20.41203
G1 X-157.5 Y-46.24492 Z-108.7471 A132 B-20.29202
...
M63P0 (to turn off the extruder or simply use M67E0Q0 to set it's feed to zero)

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

More
06 Sep 2022 12:35 #251290 by Todd Zuercher
All of the above is still true if you are using a stepgen to control your extruder motor (which you probably need to do anyway,)
The following user(s) said Thank You: tommylight, mich94

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

More
07 Sep 2022 14:31 #251406 by mich94
You are my saviour, yes i was misunderstanding: i was wondering wich was the motion analog pin out, the robotic platform i'm working on use the Mesa 7i76 as doughtercard and on the manual/datasheet/pin map i have seen i can't find analogs output.
This sounds strange to me because on the Hal Meter on the AXIS of linuxcnc that i'm using there are 4 motion.analog-out-00 as you previously said...
have u ever had the 7i76? is there something i don't know about the position of these analog pins?
the robot also mounts a 7i80 only for the motors, can those pins be there?
thank you for all the time you dedicated to this

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

More
07 Sep 2022 14:34 #251407 by mich94
this is the pinmap i use
Attachments:

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

More
07 Sep 2022 15:42 #251413 by Aciera
" motion.analog-out-00" is an internal pin that holds your analog value and you would then connect that pin to to other pins in HAL, like a hardware analog output or another software analog pins.
As far as I know the 7i76e has no analog output capability, for that you could use something like this board to connect to the smart serial on your card:
store.mesanet.com/index.php?route=produc...oduct&product_id=122
However if you are using a stepper motor on the extruder you might want to run that from a step generator on your 7i76e and set the speed in hal using the "motion .analog-out-00" value.
The following user(s) said Thank You: mich94

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

Time to create page: 0.108 seconds
Powered by Kunena Forum