Robots in Architecture Forum
KUKAprc  parametric robot control for Grasshopper => Support => Topic started by: evo85210 on October 04, 2019, 11:59:35 AM

I'm importing gcode generated by cura, the gcode flavour is bits from bytes
Everything seems to be working fine, but the digital output command doesn't get added

Hello,
In your Gcode example, is E the target speed of the extruder? It seems that we have mostly dealt with distance values before, i.e. the Gcode defines how many mm of filament to extrude, not how fast to move stepper motor.
Best,
Johannes

yes, E is how much the extruder extrudes in mm
but the extruder on my tool is set to extrude at constant speed, and only extrudes when it receives signal from D32 on the robot.
So what I'm wondering is if it's possible to convert the E in the gcode to D32?
.
I'm also curious as to by default, what does the component expect in the Gcode for the extrusion mode? I could probably modify the gcode to match?

Hello,
Here's an example that I think we produced before. I'm not at my main PC, so I couldn't verify it, but I'm pretty sure that's the right file.
It looks like this:
G1 X187.993 Y102.063 E1.9422
G1 X189.27 Y103.839 E1.971
G1 X189.637 Y104.407 E1.9799
G1 X190.73 Y106.291 E2.00858
G1 X191.043 Y106.898 E2.01758
G1 X191.941 Y108.871 E2.04612
G1 X192.187 Y109.488 E2.05487
Best,
Johannes

Hi Johannes,
I've tested the file you provided, but from what i can tell, the src file still isn't toggling any digital outputs?
&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF kukaprc_project ( )
;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;ENDFOLD (INI)
;FOLD STARTPOSITION  BASE IS 2, TOOL IS 1, SPEED IS 15%, POSITION IS A1 5,A2 90,A3 100,A4 5,A5 10,A6 5,E1 0,E2 0,E3 0,E4 0
$BWDSTART = FALSE
PDAT_ACT = {VEL 15,ACC 100,APO_DIST 50}
FDAT_ACT = {TOOL_NO 1,BASE_NO 2,IPO_FRAME #BASE}
BAS (#PTP_PARAMS,15)
PTP {A1 5,A2 90,A3 100,A4 5,A5 10,A6 5,E1 0,E2 0,E3 0,E4 0}
;ENDFOLD
;FOLD LIN SPEED IS 0.25 m/sec, INTERPOLATION SETTINGS IN FOLD
$VEL.CP=0.25
$ADVANCE=3
;ENDFOLD
;FOLD COMMANDS IN FOLD. SELECT EDIT/FOLDS/OPEN ALL FOLDS TO DISPLAY
PTP {E6POS: X 188.402, Y 137.359, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0, S 'B 110'} C_PTP
$VEL.CP=0
LIN {E6POS: X 188.402, Y 137.359, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
$VEL.CP=0.00001667
LIN {E6POS: X 184.532, Y 141.626, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 179.343, Y 145.374, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 176.801, Y 146.654, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 172.17, Y 148.259, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 166.023, Y 149.136, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 159.616, Y 148.662, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 155.047, Y 147.412, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 152.482, Y 146.34, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {E6POS: X 147.078, Y 143.005, Z 0, A 0, B 90, C 180, E1 0, E2 0, E3 0, E4 0} C_DIS

Hello,
I should be able to take a look at the code tomorrow and test it, sorry for the delay!
Best,
Johannes

Hello,
Please give today's version in the member section a try!
I hope it works now!
Best,
Johannes

Yup, working.
Thanks. :)

Nice, thanks for letting me know!