Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

PYTHON based online programming

#1
Hi all

I am using Python to send commands to the robot real-time (online programming). Everything works fine as I expect. What I want to do now is get an existing KUKA src/dat file and send the setting and actuation commands, that to works fine...except I am not a KRL person, I have figured out most of it but was wondering what the corresponding python commands to these lines mean...

Again I have figured out most of it except for example invoking the BAS argument functions (which I can see being called on the KUKA HMI.) In short is there ROBOT.SETPARAMETERS(parameters list here, values here)...which, by the way, I can write a small routine in Python if I new exactly what corresponds to what.

Tanks,
Fassil

$BWDSTART=FALSE

LDAT_ACT=LCPDAT7

FDAT_ACT=FP7

BAS(#CP_PARAMS,2)

LIN XP7 C_DIS C_DIS

;ENDFOLD



;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT

$BWDSTART = FALSE

PDAT_ACT=PDEFAULT

FDAT_ACT=FHOME

BAS (#PTP_PARAMS,100 )

$H_POS=XHOME
PTP XHOME

PS. I know LCPDAT7 = {VEL 2.00000,ACC 100.000,APO_DIST 100.000,APO_FAC 50.0000,AXIS_VEL 100.000,AXIS_ACC 100.000,ORI_TYP #VAR,CIRC_TYP #BASE,JERK_FAC 50.0000,GEAR_JERK 50.0000,EXAX_IGN 0} from the .dat file.

so how isJERK_FAC 50.0000 set, for example?
#2
Hi Fassil,

When you use the driver you may be a bit more limited in terms of the number of parameters you can control. It would be best if you customize the driver for your application. For your information you can pass a program id using RunCode and change some status flags in your driver of trigger program calls:
//www.sinclairbody.com/forum/Thread-Robot-dr...program-id

This method may not be as robust as using a post processor.

Albert
#3
(03-17-2020, 10:04 PM)FG_Collins Wrote:Hi all

I am using Python to send commands to the robot real-time (online programming). Everything works fine as I expect. What I want to do now is get an existing KUKA src/dat file and send the setting and actuation commands, that to works fine...except I am not a KRL person, I have figured out most of it but was wondering what the corresponding python commands to these lines mean...

Again I have figured out most of it except for example invoking the BAS argument functions (which I can see being called on the KUKA HMI.) In short is there ROBOT.SETPARAMETERS(parameters list here, values here)...which, by the way, I can write a small routine in Python if I new exactly what corresponds to what.

Tanks,
Fassil

$BWDSTART=FALSE

LDAT_ACT=LCPDAT7

FDAT_ACT=FP7

BAS(#CP_PARAMS,2)

LIN XP7 C_DIS C_DIS

;ENDFOLD



;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT

$BWDSTART = FALSE

PDAT_ACT=PDEFAULT

FDAT_ACT=FHOME

BAS (#PTP_PARAMS,100 )

$H_POS=XHOME
PTP XHOME

PS. I know LCPDAT7 = {VEL 2.00000,ACC 100.000,APO_DIST 100.000,APO_FAC 50.0000,AXIS_VEL 100.000,AXIS_ACC 100.000,ORI_TYP #VAR,CIRC_TYP #BASE,JERK_FAC 50.0000,GEAR_JERK 50.0000,EXAX_IGN 0} from the .dat file.

so how isJERK_FAC 50.0000 set, for example?

Good morning Albert,

Thanks for the info. You may be right about the custom driver. The api is really fine except for a couple of commanding, like external axis definition, and the status & turn designation. I will see if I can work this out. Here, they use some Aerospace software to generate the .src files and I wanted to control the robots with the commands just as they have generated. I may need some help from a driver-developer with this. There are great programmers online posting nice codes all the time.

Thanks,
Fassil

STAY SAFE!
#4
Hi All,

a couple of question:

1) Where do the 'Drill' and 'Cut' subroutines I see in the RoboDKsynch.src program reside?
2) I was going to include a small program, 'Program 3' and add to the src. file...now does any one have any idea how I can 1) call the program from the API (outside the GUI) and 2)send an argument (or two) to it?

I am assuming it is very possible as the var and val for the other subroutines is passed routinely.

Thanks,
Fassil
#5
The name of those routines are just examples of integration (they are commented). You can trigger other programs that you've created yourself.

For now, you can only pass one argument.
#6
(03-30-2020, 06:29 PM)Albert Wrote:The name of those routines are just examples of integration (they are commented). You can trigger other programs that you've created yourself.

For now, you can only pass one argument.

Hi Albert,

I realized that, maybe my question should have been, where would these programs be located? So I am going to assume where the dummy ( 'commented-out') programs are.

如何将一个字符串参数通过了吗?I think I know how to call it (RunCodeCustom("program id", INSTRUCTION_CALL_PROGRAM)) but how is the argument to the program passed? Sinceprogram_id = COM_VALUE1, and is also an INT and the 'rest' of the variables are declared as REAL, I mean.

THANKS, I really appreciate your answers!
Fassil
#7
Hi Albert,

I figured it all out. THANKS!

Regards,
Fassil




Users browsing this thread:
2 Guest(s)