Watch a servo or drives person in action, and it is generally only a matter of time before they are...
Get the Most Out of Your HMI Scripting
An underutilized item in your automation toolbox is the scripting capability embedded in your HMI software.
Quite often, the data generated by a control system requires further manipulation, massaging if you will, retransmission on alternate protocols, or long term storage on an MES/MRP system.
The default approach to these issues is typically:
- Programming in the PLC with file and data commands that are not ideally suited to the task
- Implementing a solution on a PC-based system so as to utilize third party software such as Excel
- Purchasing protocol conversion hardware such as gateways
- Saving data to text or csv files for further processing by custom written programs
While these methods can provide the required functionality, they may not be best solutions from a cost/time perspective. Depending on your role in the overall automation solution, these approaches might not even be viable.
Case Study: HMI Scripting for an OEM
An OEM for an add-on treatment system in the oil industry needed to utilize HMI data from an existing PLC of a different manufacturer than of the system they were providing. This data needed to be run through a filtering/averaging routine and an altered sampling routine.
The easiest solution may have been to add logic to the existing PLC and extract the massaged data from there. However, the OEM did not have access to the existing code.
Different solutions were proposed that:
- Manufacturing data collection via a protocol conversion gateway by their PLC where the data manipulation would be performed. Then this data would be utilized by the OEM’s HMI software. This approach would require the purchase of the gateway and alteration of their standard PLC program.
- The OEM’s HMI would be upgraded to a PC-based system, where they would use Excel to collect the raw data, via OPC, for massaging. This approach would result with an increased cost due to the PC, OPC server, Excel, and programming.
The final solution was to upgrade the OEM’s HMI software to a unit with scripting capability, for much less than an upgrade to a PC. Then the data manipulation was easily programmed via the HMI’s scripting utility, with no need to alter the standard PLC code.
Your HMI Scripting Program
A majority of HMI manufacturers include some form of scripting in their mid to high end product offerings. Most of these are based on some form of Visual Basic, typically VBA or VBScript, or C.
Finding a programmer familiar with these languages is quite often easier than tasking a PLC programmer with a data manipulation and third party communication workload.
Depending on the manufacturer’s scripting implementation, your HMI software may be able to provide direct access to higher level databases, complex string manipulation, array logic, and leveraging the application interface for the operating system. Combine these features with the fact that HMI software typically provides built-in drivers for multi-vendor protocols, and you have a powerful solution to data manipulation and transfer in a piece of equipment you are already providing.
What Can Your HMI Script Do For You?
Before you look into PC-based answers or add-on software packages for the task at hand, investigate the capabilities of the equipment already on your bill of material. In the story of your machine build, you may find the solution was already in the script.
The experienced staff at ACD can discuss your HMI software and its capabilities, and advise you on how to get the most out of your HMI scripting.
You may also be interested in reading:
- Two Easy Clicks for Great Diagnostics at your HMI
- Where do the new Siemens processor fit in to the previous offerings?
- Tracing with a Siemens PLC