Posts by singline
-
-
Code
CWRITE($FCT_CALL,s,m,"krl_fopen","spline_log.txt","a", handle) SWRITE(tester[], S, OFS,"%d", $PRO_NAME1[]) CWRITE($FCT_CALL,s,m,"krl_fwriteln", handle, tester[]) CLEAR = STRCLEAR(tester[])
I just double checked and $pro_name1[] returns same error as above: tester value invalid.. think I've given up and will create another variable to store the additional details i need.
-
-
orangeapps sell a lego set based upon kuka robotic arms, not sure its dimensions or specs, but worth checking out.. ?
theres been some kickstarters / indiegogos pop up over the last few years for desk 6axis arms..
-
I'm surprised I can't write $PRO_NAME[] to a line via swrite? I know the variable is write protected, but does that mean I am unable to read it within the submit interpreter.. ?
This line with $pro_name included throws the KSS01422 error that fileinfo[] value invalid. So I attempted to create another CHAR array name[] = $pro_name - still no luck. Is this futile?
edit: I also attempted strcopy..
-
Great minds think alike?
At this remove, it's hard to remember which functions I created, and which I collected from various sources. Pretty sure the random-number generator, for one, is based heavily on your example.
Yeah, the string-over-IO function only got developed to a certain point, then stopped, b/c we ended up needing to move so much string data that it would take a couple minutes, even using ridiculous amounts of I/O and assuming 24ms for each block transfer. That's when we switched to using EKI, which was more difficult to set up, but worked much better once it was (aside from causing a SYS 14 fault and hard-killing the robot until KUKA eventually fixed that bug in the EKI error counter).
Interestingly, I started with EKI for this project. The data points were 200ms apart, which was too lo-fidelity, so switched to recording locally on the control pc. Pretty sure it wasn't a networking issue, but that I was using the sps.sub to communicate with EKI, but by that stage I was using cwrite.
-
Thanks for the advice guys. Including the strclear() within the loop worked perfectly. I've also removed the issue of duplicates. It was when moving into negative numbers it was adding 1 to 6 characters to the array through the '-' character that I wasn't accounting for.
Python being the language I'm probably most comfortable in, shifting to KRL is always a bit of a shock to the system.
And thanks for the functions, I'll go over them in detail.
-
Hi all, currently testing on:
KSS 8.6.6
KR 10 R1100-2
I'm attempting something similar as the above. Attempting to get the workflow in place before it becomes more difficult, but I have a sub file recording the XYZABC of the robot and a timer that is written to a text file with CWRITE. It all seems to work well, except that the timer variable will increase sporadically (maybe when the timer variable is identical to the previous);
The Sub:
Code
Display MoreDECL CHAR CURRENT[200] DECL STATE_T S DECL MODUS_T M DECL IN OFS decl bool ran decl int handle ;ENDFOLD (USER DECL) ;ENDFOLD (DECLARATIONS) ;FOLD INI ;FOLD USER INIT ; Please insert user defined initialization commands OFS = 0 ran = false handle = 0 ; open file CWRITE($FCT_CALL,s,m,"krl_fopen","spline_log.txt","a", handle) ;ENDFOLD (USER INIT) ;ENDFOLD (INI) LOOP ;FOLD USER PLC ;Make your modifications here ;IF ($TIMER[63] > UPDATETIME) THEN IF RECORD THEN ran = true ofs = 0 SWRITE(CURRENT[], S, OFS, "%.4f, %.4f, %.4f, %.4f, %.4f, %.4f, %i", $POS_ACT.X, $POS_ACT.Y, $POS_ACT.Z, $POS_ACT.A, $POS_ACT.B, $POS_ACT.C, $TIMER[8]) M = #SYNC ; write data CWRITE($FCT_CALL,s,m,"krl_fwriteln", handle, CURRENT[]) ENDIF IF NOT RECORD AND RAN THEN ; close file CWRITE($FCT_CALL, s,m,"krl_fclose", handle) wait sec 0 ran = false ENDIF ;ENDFOLD (USER PLC) ENDLOOP ;FOLD ;%{H}; END ;ENDFOLD ;FOLD USER SUBROUTINE ;Integrate your user defined subroutines ;ENDFOLD (USER SUBROUTINE)
the KRL is very simple:
Code
Display More;FOLD LIN SPEED IS 0.25 m/sec, INTERPOLATION SETTINGS IN FOLD $VEL.CP=0.25 $ADVANCE=3 ;ENDFOLD PTP {X 10, Y -10, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0, S 'B 110'} C_PTP LIN {X 10, Y -10, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} C_DIS SPLINE SPL {X 290, Y -110, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} WITH $ORI_TYPE = #VAR SPL {X 10, Y -210, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} WITH $ORI_TYPE = #VAR SPL {X 290, Y -310, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} WITH $ORI_TYPE = #VAR SPL {X 10, Y -410, Z 0, A 0, B 90, C 0, E1 0, E2 0, E3 0, E4 0} WITH $ORI_TYPE = #VAR ENDSPLINE PTP {A1 5, A2 -90, A3 100, A4 5, A5 10, A6 -5, E1 0, E2 0, E3 0, E4 0} C_PTP END
Any ideas what's causing the timer to add additional numbers. The code ends at 5232ms by the timer, but the last recorded timer variable is 5232066..?
-
I knew it would be something relatively simple I was missing. The peaks were not changing as they were all set to 0 - clearly mentioned in the documentation, but since jogging collision detection was working, I assumed program colldet would be working too. Changed the peak values to 500 to register new peaks, however I still didn't get savemax to work.
-
just sharing my experience thus far.. didn't realise it was such an inconvenience in a related thread topic.
I'll be back in front of the bot tomorrow and will figure it out and follow up here.
-
Yep. Goes without saying, like I said in missing a step and I've done the examples.
Tried savemax also after setting collmon_max for all 6 to 0.. l
-
you may work on it alone i guess.
That was the plan! But alas I had no luck. As I said, I was testing on a KR 3 R540 with KSS 8.5..
I made a super simple module, start pos with three SPTP movements, on two of the three I set COLLDETECT to [1] and ran the program with programmed velocity in both T2 and AUT logged in as Expert with Collision detection - Data set configuration window open, yet no peak value left 0.
Bonus question: is it possible to use a collision as an interrupt?
-
Damn, Panic, I've been attempting collision detection on KSS 8.5 all morning and must be missing one or two steps. I remember there being something during programming 2, but for the life of me I can't remember. I remember simply being able to run my program and assign the axis values to a collision data set, but for the life of me cannot figure the step I'm missing or doing incorrectly from the SI manual.
-
Huh. If I was to guess after my testing on OfficeLite from home last night, SPTP_REL {A6 720} would not move as it is already positioned there in modulo, but with the #AS_PROG it might, however, I just tested SPTP_REL {A6 720} and it did two full spins.
Edit: I just went back into OfficeLite to test, but I wasn't using SPTP, but PTP relative movement, which will not work (and #AS_PROG resulted in an error), whereas a spline PTP does. Good to know. Thanks for the help.
-
I did just find some ASYPTP (I've never used it before) documented in KSS 8.3 System Integrator's documentation and appears to be external axis only.. so that's good to know. But, it leaves me with one question, what is #AS_PROG, and what is it telling the compiler?
-
In one of the referenced threads I found the code:
ASYPTP {E2 720} #AS_PROG - by panic with the note that it will rotate twice if the axis is at zero.
I changed it to ASYPTP {A6 720} #AS_PROG with the axis set to endless on a quantec KR 210 R 2700 extra with KSS 8.3.28, but it doesn't do anything, no error, just passes the line and ends the program.
-
this is why being able to search forum is so important
yep!
-
its new to me too! I'm currently referring 8.3 System integrators and its not listed in there. Actually, I can't find any documentation for it anywhere, can someone point me int he right direction?
-
I understand the logic, kind of. Because a relative move should be move x degrees from your position, not move into this position as efficiently as possible.. I did a 370 turn with a for loop.. I wonder how it would go on an actual bot.
-
I'm super curious about this, I am currently testing on OfficeLite with KSS 8.6.5 simply simulating an A6 to perform a relative or axis movement greater than 360, so a full spin and then some. I turned the axis to endless, changed the direction of the axis in machine.dat as mentioned above, but if I give the command PTP_REL {A6 -370} it simply moves -10 degrees and doesn't move a relative number of degrees to its current position?