did you save changes?
did you reinitialize UserTech?
did you save changes?
did you reinitialize UserTech?
Yes of course;
reinitialized UserTech, BOF, and even cold rebooting every time
NEED_SAFETYSWITCH TRUE, _
Should be false.
Should be false.
Thanks! You are right!
I don't know why i was thinking at emergency stop while writing that parameter.
Anyways, now i can activate the on button after pressing the deadman switch,
and leave the off button always active.
But when i press the off button (Key4) without pressing the deadman switch it gives me those two errors:
Execution of Script "" aborted. Instruction 1 failed
So it is displayed, but still doesn't work.
Why doesn't this script work without enable switch?
Here is my .KFD
DEFTP CustomStatKeys
DEFSCRIPT Key3Pressed
SETVAR (FULLPATH[] "$OUT[65]", VALUE[] "TRUE")
ENDSCRIPT
DEFSCRIPT Key4Pressed
SETVAR (FULLPATH[] "$OUT[65]", VALUE[] "FALSE")
ENDSCRIPT
DECL STATKEY Key3 = { _
PICTURE[] "C:\KRC\TP\USERTECH\TEMPLATE\Bild1.ICO", _
STYLE #SWITCH, _
ENABLE TRUE, _
NEED_SAFETYSWITCH TRUE, _
NEED_DRIVESOK FALSE, _
NEED_PROSTATEO 63, _
NEED_PROSTATE 63, _
NEED_MODEOP 31, _
USERMODE 0, _
ONKEYDOWN Key3Pressed}
DECL STATKEY Key4 = { _
PICTURE[] "C:\KRC\TP\USERTECH\TEMPLATE\Bild2.ICO", _
STYLE #SWITCH, _
ENABLE TRUE, _
NEED_SAFETYSWITCH FALSE, _
NEED_DRIVESOK FALSE, _
NEED_PROSTATEO 63, _
NEED_PROSTATE 63, _
NEED_MODEOP 31, _
USERMODE 0, _
ONKEYDOWN Key4Pressed}
SET Key3 = {ONKEYDOWN Key3Pressed}
SET Key4 = {ONKEYDOWN Key4Pressed}
DECL STATKEYBAR KeyBar
SET KeyBar={STATKEY[3] Key3, STATKEY[4] Key4}
ENDTP
Display More
Setting an output always needs "drives on". So in T1/T2 Deadman switch is needed. Will be not possible to change that.
you can replace address to something else (not an output). for example you can use $FLAG[] or your own boolean.
this will make sure that TP script works without issue.
then if you still need this to activate and output, you can have in SPS line that transfers value, for example:
$OUT[56]=$FLAG[56]
that would set the output value but of course, physical output may or may not respond to that change depending if powered from US1 or US2
Ok, thanks you all!
Setting an output always needs "drives on". So in T1/T2 Deadman switch is needed. Will be not possible to change that.
Well, one can use $OUT_NODRIVE, but that doesn't last through reboots.
did not try on a real robot but at least in OfficeLite, SPS can set outputs even with $OUT_NODRIVE at FALSE