Hi,
We have a KR Agilus that runs with KR C4 and communicates with a server on another PC through EthernetXML. I wanted my KRL program to run a spline block and also report its current status back to a server while traveling. So far, I've been able to do this with TRIGGER PATH calls within the Spline Block, like such:
===================================================================
DEF RunSplineBlock( )
;FOLD INI;%{PE}
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
ReportStatEKI()
PTP HOME
ReportStatEKI()
SPLINE
TRIGGER WHEN PATH = 0 DELAY = 0 DO ReportStatEKI() PRIO = 4
SPL P1
TRIGGER WHEN PATH = 0 DELAY = 0 DO ReportStatEKI() PRIO = 5
SLIN P2
TRIGGER WHEN PATH = 0 DELAY = 0 DO ReportStatEKI() PRIO = 6
SPL P3
TRIGGER WHEN PATH = 0 DELAY = 0 DO ReportStatEKI() PRIO = 7
SCIRC P4, P5
ENDSPLINE
PTP HOME
END
--------------------------------------------------------------------------------------------------------------------------------
GLOBAL DEF ReportStatEKI( )
DECL EKI_STATUS kRet
DECL CHAR stzChannelName[30]
;FOLD INI
;FOLD BASISTECH INI
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
stzChannelName[] = "KRCReportAndControl"
kRet = EKI_Init( stzChannelName[] )
kRet = EKI_Open( stzChannelName[] )
kRet = EKI_SetFrame( stzChannelName[], "Robot/Data/ToolCoord", TOOL_DATA[1] )
kRet = EKI_Send( stzChannelName[], "Robot" )
kRet=EKI_Close( stzChannelName[] )
kRet=EKI_Clear( stzChannelName[] )
END
===================================================================
For the next step, I want to have the ReportStatEKI( ) subprogram moved to its own src. Once I do that, though, I start getting “Instruction inadmissible” errors (KSS01425) when the main program gets to the Spline Block and should be triggering it; the program counter was on SLIN P2.
On a side note, the two calls to ReportStatEKI() works before the spline block worked fine, and the server has been able to receive data from these calls.
Was exactly does the KSS01425 error mean here? Can I still trigger a global subprogram defined in another src from within the spline block?
Thank you in advance for any help you can give on this subject.