In a system with HMI as the interface, and HMI talking to PLC, servo drive or any other devices to collect information or exercise control, it’s very convenient that we could access register addresses from external devices directly on our HMI projects. However, when done poorly, this could cause response latency, windows flicking and some other problems, especially when using these addresses directly in script programming. Here is the guidelines in accessing external addresses in HMI programming ( we use PLC as a sample for external devices):
- It’s generally OK to use PLC addresses in components’ settings for reading and writing.
- It’s generally OK to directly read from PLC address in script programming.
- In script programming, do not try to catch rising pulses or falling pulses on PLC addresses.
- Do not use PLC addresses to control the visibility of windows or components, in script or in the components’ settings.
- It’s generally OK to write directly to PLC addresses when it’s done infrequently. Writing to bit addresses on PLC is much more faster than writing to word addresses, and caution should be taken to execute the writing code as less frequent as possible.
- Using PLC addresses for writing on components’ settings, instead of script, is generally OK, providing no more than a few addresses are used to do so.
- In any cases, scripting programming or component settings, the recommended practice when it comes to writing to PLC addresses is to establish an address mapping on those addresses so that you can map the PLC address to a local HMI address and operate on the local HMI address only.