(0)| 9/29/2021 5:17 PM | |
|
Joined: 4/28/2015 Last visit: 12/22/2025 Posts: 32 Rating:
|
If you use the GetDisplayValue function, it will allow the updates without any user interaction. |
| 9/30/2021 4:47 PM | |
|
Joined: 4/28/2015 Last visit: 12/22/2025 Posts: 32 Rating:
|
Follow my example: Function GetDisplayValue() 'Script function to detect the value of the attribute ' Return value: String Set NameSpec = Me.GetSpecOwner.spec("Y00T00024.Y00A01154") If Not NameSpec Is Nothing Then OPCName = NameSpec.value If OPCName <> "" Then Set OPCItem = CreateObject("ComosOPCClient.COPCItem") OPCValue = OPCItem.OPCItemValue(Me,OPCName) Else OPCValue = "" End If End If GetDisplayValue = OPCValue 'Delay redirect for two seconds' Dim StartTime, EndTime, WaitTime ' Get Start Time' StartTime = Timer() 'Get End Time' EndTime = Timer() 'Determine how long it took' WaitTime = EndTime - StartTime 'Continue checking the elapsed time until it reaches 2 seconds' Do While WaitTime < IntSegundos 'Get End Time' EndTime = Timer() 'Determine how long it took' WaitTime = EndTime - StartTime Set WShell = CreateObject("Wscript.shell") WShell.SendKeys "{F5}" Loop Delay_Timer = True End Function AttachmentOPC.avi (551 Downloads) |
This contribution was helpful to
|
|
Follow us on