If (M_Stopp_Archiv=1 And M_Stopp_Archiv_Old=0) Then
StopLogging hmiAlarmLog, "STQ_Archiv"
' HmiRuntime.Trace("Stopp Logging")
' ShowSystemAlarm("Stopp Logging")
ActivateScreen "BG 04",0
ElseIf (M_Stopp_Archiv=0 And M_Stopp_Archiv_Old=1) Then
StartLogging hmiAlarmLog, "STQ_Archiv"
' HmiRuntime.Trace("Start Logging")
' ShowSystemAlarm("Start Logging")
ActivateScreen "BG 05",0
Else
End If
M_Stopp_Archiv_Old=M_Stopp_Archiv
falsch:
M_Stopp_Archiv_Old = M_Stopp_Archiv
richtig:
M_Stopp_Archiv = M_Stopp_Archiv_Old
If (M_Stopp_Archiv=1 And M_Stopp_Archiv_Old=0) Then
StopLogging hmiAlarmLog, "STQ_Archiv"
' HmiRuntime.Trace("Stopp Logging")
' ShowSystemAlarm("Stopp Logging")
ActivateScreen "BG 04",0
End If
If (M_Stopp_Archiv=0 And M_Stopp_Archiv_Old=1) Then
StartLogging hmiAlarmLog, "STQ_Archiv"
' HmiRuntime.Trace("Start Logging")
' ShowSystemAlarm("Start Logging")
ActivateScreen "BG 05",0
End If
M_Stopp_Archiv = M_Stopp_Archiv_Old
If (M_Stopp_Archiv And !M_Stopp_Archiv_Old) Then
If (M_Stopp_Archiv And NOT M_Stopp_Archiv_Old) Then
ActivateScreen "BG 06,0
StopLogging hmiAlarmLog, "STQ_Archiv"
CloseAllLogs
ArchiveLogFile hmiAlarmLog, "STQ_Archiv", "\Storage Card MMC\", hmiCopy
OpenAllLogs
StartLogging hmiAlarmLog, "STQ_Archiv"
If (M_Stopp_Archiv And Not M_Stopp_Archiv_Old) Then
StopLogging hmiAlarmLog, "STQ_Archiv"
HmiRuntime.Trace("Stopp Logging")
' ShowSystemAlarm("Stopp Logging")
ActivateScreen "BG 04",0
End If
If (Not M_Stopp_Archiv And M_Stopp_Archiv_Old) Then
StartLogging hmiAlarmLog, "STQ_Archiv"
HmiRuntime.Trace("Start Logging")
' ShowSystemAlarm("Start Logging")
ActivateScreen "BG 05",0
End If
SetTag M_Stopp_Archiv_Old,M_Stopp_Archiv
Ist ein altes Fragment. Da hatte ich noch die Hoffnung auf eine Lösung ohne Script. Habe ich jetzt entfernt.Warum stoppst du das Archiv beim Tasten-loslassen (auch) und nicht nur im Script ?
Verwendung in der Funktionsliste
SetzeVariable (Variable, Wert)
Verwendung in benutzerdefinierten Funktionen
SetTag (Tag, Value)
Verwendbar, sofern das projektierte Gerät benutzerdefinierte Funktionen unterstützt. Weitere Informationen finden Sie unter "Geräteabhängigkeit".
Parameter
Variable
Die Variable, welcher der angegebene Wert zugewiesen wird.
Wert
Der Wert, welcher der angegebenen Variablen zugewiesen wird.
Hinweis
Die Systemfunktion "SetzeVariable" wird nur nach Aufbau einer Verbindung ausgeführt.
{
BOOL ok;
BOOL bvalue;
//Set the tag to true
ok = SetTag("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBit("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}
Der gespeicherte Rückgabewert kann im nachfolgenden Code verarbeitet werden.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?