I am looking for some help with a problem I have been struggling with. On a KRC4 KR180 R2500 extra with KSS 8.3.32 I am running the SPS to control the AEXT of the robot so that no external PLC is used and to load a specific program to the robot.
The issue is that if you reset the program or cancel it you get the error $PRONAME[] - value invalid - on the screenshot. The error occurs randomly - not every time you reset or cancel the program, so I am thinking it must be some timing issue with the closing of the program and the fast SPS cycle. The trouble is that this variable is nowhere to be seen. It's not $PRO_NAME[] and I am using $PRO_NAME1[] in the SPS to check the loaded program and I check if it is #INITIALISED. And my biggest concern is that when I get this error I need to reset the SPS and I want to get rid of this crash but I fail to see what causes it.
In the user section of the loop I have this regarding the $PRO_NAME1[]
IF (VARSTATE("$PRO_NAME1[]") == #INITIALIZED) THEN
STORE_PRONAME[] = $PRO_NAME1[]
StrCompare = STRCOMP(STORE_PRONAME[], PROGRAM_NAME[], #NOT_CASE_SENS)
IF (StrCompare) AND ($I_O_ACTCONF) THEN
IF $IN_HOME AND ($PRO_STATE1 == #P_STOP) AND (NOT Running_FLAG) AND Start_SIGNAL THEN
Start_FLAG = TRUE
ENDIF
IF $IN_HOME AND ($PRO_STATE1 == #P_END) AND Start_SIGNAL THEN
CWRITE ($CMD, STAT, MODE, "RESET")
Start_FLAG = TRUE
ENDIF
IF ($PRO_STATE1 == #P_ACTIVE) AND Running_FLAG AND Pause_SIGNAL THEN
Pause_FLAG = TRUE
;Resume_FLAG = FALSE
ENDIF
IF ($PRO_STATE1 == #P_STOP) AND Pause_FLAG AND Resume_SIGNAL THEN
Resume_FLAG = TRUE
Pause_FLAG = FALSE
ENDIF
IF ($PRO_STATE1 == #P_ACTIVE) AND Running_FLAG AND Stop_SIGNAL AND (NOT Stop_FLAG) THEN
Running_FLAG = FALSE
Stop_FLAG = TRUE
IF Start_FLAG == TRUE THEN
Start_FLAG = FALSE
ENDIF
ENDIF
...
Display More