Simple Scripting Aspect 800xA/Compact HMI 800
I would like to find a way to use scripting in Compact HMI 800 (800xA).
I can see that there is an aspect named "Simple Scripting Aspect".
Does anyone know if it is possible to use this aspect to:
1 - Read an OPC tag value (integer)
2 - Process the integer value and then output a text to the Graphics Editor (textbox or similar)
3 - The script should be executed continiously
The reason for not using Express variables in this case is that I need to store "last value" of the OPC tag, evaluate if value has changed and then output a string from there.
I'm quite familiar with VBscripting but need help with the interface between
OPC tag-> VBScript -> Graphics Editor.
Thanks in advance!
Voted best answer
I recommend using a Calculation aspect instead; fully autonomous - runs as a service in the background - no need to have a workplace open to trigger execution.
Output can be persistently stored in a SoftPoint. General Properties are not recommended for frequent changes as they will cause unnecessary aspect directory transactions on each change which is no good, nor the intention with the aspect directory.
The problem with using scripting aspects is that it can be very difficult for someone else to find and troubleshoot issues after you've finished the job and walked away. Theyre also pretty much undocumented.
Do the calculation in the PLC
Set a bolean or integer flag in the PLC based on the result.
Dislay a string on the HMI using the flag