I program as the manual TestStat.kfdx
<Script Name="ScriptKeyUp">
<SetVar Fullpath="$OUT[2]" Value="False" />
</Script>
but when I test the program,there is always a message showed the command is interrupted,so what's wrong with this program?
I program as the manual TestStat.kfdx
<Script Name="ScriptKeyUp">
<SetVar Fullpath="$OUT[2]" Value="False" />
</Script>
but when I test the program,there is always a message showed the command is interrupted,so what's wrong with this program?
there is nothing wrong with the 3 lines you show... but this cannot work on its own (this is not complete .KFDX)
it should be something like this
<?xml version="1.0" encoding="utf-8"?>
<KukaTechDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Application Name="Panic" SOT="FALSE" SOC="TRUE">
<Script Name="Key1Pressed">
<SetVar Fullpath="$OUT[1]" Value="TRUE" />
</Script>
<Script Name="Key1Released">
<SetVar Fullpath="$OUT[1]" Value="FALSE" />
</Script>
<Script Name="Key2Pressed">
<SetVar Fullpath="$OUT[2]" Value="TRUE" />
</Script>
<Script Name="Key2Released">
<SetVar Fullpath="$OUT[2]" Value="FALSE" />
</Script>
<Script Name="Key4Pressed">
<SetVar Fullpath="$OUT[4]" Value="TRUE" />
</Script>
<Script Name="Key4Released">
<SetVar Fullpath="$OUT[4]" Value="FALSE" />
</Script>
<StatKey Name="Key1" Style="#SWITCH" Next="" Enable="TRUE" UserMode="0">
<Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\Bild11.ico" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom=" " />
<Needs SafetySwitch="TRUE" DrivesOk="TRUE" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key1Pressed" OnKeyUp="Key1Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</StatKey>
<StatKey Name="Key2" Style="#SWITCH" Next="" Enable="TRUE" UserMode="0">
<Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\Bild21.ico" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom=" " />
<Needs SafetySwitch="TRUE" DrivesOk="TRUE" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key2Pressed" OnKeyUp="Key2Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</StatKey>
<StatKey Name="Key4" Style="#SWITCH" Next="" Enable="TRUE" UserMode="0">
<Picture Default="C:\KRC\TP\USERTECH\TEMPLATE\Bild41.ico" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom=" " />
<Needs SafetySwitch="TRUE" DrivesOk="TRUE" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key4Pressed" OnKeyUp="Key4Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</StatKey>
<Set Name="Key1" Enable="" UserMode="" Style="" Next="">
<Picture Default="" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom="" />
<Needs SafetySwitch="" DrivesOk="" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key1Pressed" OnKeyUp="Key1Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</Set>
<Set Name="Key2" Enable="" UserMode="" Style="" Next="">
<Picture Default="" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom="" />
<Needs SafetySwitch="" DrivesOk="" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key2Pressed" OnKeyUp="Key2Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</Set>
<Set Name="Key3" Enable="" UserMode="" Style="" Next="">
<Picture Default="" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom="" />
<Needs SafetySwitch="" DrivesOk="" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key3Pressed" OnKeyUp="Key3Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</Set>
<Set Name="Key4" Enable="" UserMode="" Style="" Next="">
<Picture Default="" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom="" />
<Needs SafetySwitch="" DrivesOk="" Prostate0="Free|Stop|Reset|End|Active" Prostate="Free|Stop|Reset|End" ModeOp="T1|T2" />
<Scripts OnKeyDown="Key4Pressed" OnKeyUp="Key4Released" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</Set>
<StatkeyBar Name="Panic_KB" />
<Set Name="Panic_KB" Enable="" UserMode="" Style="" Next="">
<SK Name="Key1" Pos="1" />
<SK Name="Key2" Pos="2" />
<SK Name="Key4" Pos="4" />
<Picture Default="" KeyDown="" KeyDownMinus="" />
<Text Top="" Center="" Bottom="" />
<Needs SafetySwitch="" DrivesOk="" Prostate0="" Prostate="" ModeOp="" />
<Scripts OnKeyDown="" OnKeyUp="" OnKeyShow="" OnKeyDownMinus="" OnKeyUpMinus="" OnKeyRepeat="" OnKeyRepeatMinus="" />
</Set>
</Application>
</KukaTechDescription>
Display More