2.8 KiB
2.8 KiB
When the operator need to open another panel the script RemAccess_lineDefinition
is called to setup which panels can be access depending on the line. After this SELECT CASE
it shows the page 41.
On the page 41 when the operator press one panel call the Script RemAccess_hmiDefinition(LineNum, HMINum)
The script then open the PopUp page 1380. On the pop-up there is the SmartClient view with this parameters:
Script - RemAccess_hmiDefinition
Sub RemAccess_hmiDefinition(ByRef LineNum, ByRef HmiNum)
'Suggerimento:
' 1. Utilizzare la combinazione di tasti <CTRL+SPACE> o<CTRL+I> per aprire l'elenco completo degli oggetti o delle funzioni
' 2. Scrivere il codice con l'oggetto HMI Runtime.
' Esempio: HmiRuntime.Screens("Screen_1").
' 3. Utilizzare la combinazione di tasti <CTRL+J> per creare un riferimento dell'oggetto.
'Scrivere il codice da questa posizione:
SmartTags("LineIndex")=LineNum
SmartTags("HMIAddress")="10.1."&(LineNum)&"."&(HmiNum)
SmartTags("HMI.RemotePanel.Address")=SmartTags("HMIAddress")&"::5900"
Select Case HmiNum
Case 3,4
SmartTags("NumOfQE")=2
Case 5,6
SmartTags("NumOfQE")=3
Case 7,8
SmartTags("NumOfQE")=4
Case Else
SmartTags("NumOfQE")=1
End Select
Select Case HmiNum
Case 1,3,5,7
SmartTags("NumOfHMI")=1
Case Else
SmartTags("NumOfHMI")=2
End Select
ShowPopupScreen "1380 - Std HMI - Pannello Remoto 7", 0, 0, hmiOn, hmiAnimationOff, hmiSlow
End Sub
Script - RemAccess_lineDefinition
Sub RemAccess_lineDefinition(ByRef LineNum)
'Suggerimento:
' 1. Utilizzare la combinazione di tasti <CTRL+SPACE> o<CTRL+I> per aprire l'elenco completo degli oggetti o delle funzioni
' 2. Scrivere il codice con l'oggetto HMI Runtime.
' Esempio: HmiRuntime.Screens("Screen_1").
' 3. Utilizzare la combinazione di tasti <CTRL+J> per creare un riferimento dell'oggetto.
'Scrivere il codice da questa posizione:
SmartTags("LineIndex")=LineNum
'SmartTags("Q1.HMI1.Address")="10.1."&(LineNum)&".1::5900"
'SmartTags("Q1.HMI2.Address")="10.1."&(LineNum)&".2::5900"
'
'SmartTags("Q2.HMI1.Address")="10.1."&(LineNum)&".3::5900"
'SmartTags("Q2.HMI2.Address")="10.1."&(LineNum)&".4::5900"
'
'SmartTags("Q3.HMI1.Address")="10.1."&(LineNum)&".5::5900"
'SmartTags("Q3.HMI2.Address")="10.1."&(LineNum)&".6::5900"
'
'SmartTags("Q4.HMI1.Address")="10.1."&(LineNum)&".7::5900"
'SmartTags("Q4.HMI2.Address")="10.1."&(LineNum)&".8::5900"
'
'SmartTags("HMIAddress")="10.1."&(LineNum)&"."&(HmiNum)&"::5900"
Select Case LineNum
Case 25,26,27
SmartTags("NumOfQEForLine")=3
SmartTags("BoolQEWith2Hmi")=2
Case 24,28
SmartTags("NumOfQEForLine")=1
SmartTags("BoolQEWith2Hmi")=0
Case Else
SmartTags("NumOfQEForLine")=15
SmartTags("BoolQEWith2Hmi")=8
End Select
ActivateScreen "041- RemoteAccess",0
End Sub