I have the following status key defined in a .kfd:
Code
DEFTP WeldKeys
DECL STATKEY Key1 = { _
PICTURE[] "C:\KRC\TP\USERTECH\TEMPLATE\favicon.ICO", _
TOPTEXT[] "Welding", _
BOTTOMTEXT[] "OFF", _
ENABLE TRUE, _
NEED_SAFETYSWITCH TRUE, _
NEED_DRIVESOK TRUE, _
NEED_PROSTATEO 0, _
NEED_PROSTATE 30, _
NEED_MODEOP 3, _
USERMODE 0, _
STYLE #SWITCH}
DEFSCRIPT Key1Pressed
SETVAR(FULLPATH[] "DO_manualWeld", VALUE[] "TRUE")
SET Key1 = {BOTTOMTEXT[] "ON"}
ENDSCRIPT
DEFSCRIPT Key1Released
SETVAR(FULLPATH[] "DO_manualWeld", VALUE[] "FALSE")
SET Key1 = {BOTTOMTEXT[] "OFF"}
ENDSCRIPT
SET Key1 = {ONKEYDOWN Key1Pressed, ONKEYUP Key1Released}
DECL STATKEYBAR KeyBar
SET KeyBar={STATKEY[1] Key1}
ENDTP
Display More
This works as expected; when pressed, function Key1Pressed is triggered, and when released, Key1Released is triggered.
Problem arises when pressing the button, then right away jogging the robot using the keys. Key1Released will not be triggered when the status key is released while still jogging the robot.
The following error is returned SETVAR (FULLPATH[] "DO_MANUALWELD", VALUE[] "FALSE") failed. Script WELDKEYS.KEY1RELEASED ABORTED
Unfortunately, the documentation does not give any information for this use case.
Is there any way to make it work when multiple status keys are held pressed simultaneously?
KSS 8.5.7 HF1
UserTech: version 3.4.2