PLC/HMI Training Tutorial Programming, Basics & Best Practices - rslogix 500

Weintek USA, Inc.
Weintek USA, Inc.
4.1 هزار بار بازدید - 4 سال پیش - In this video we will
In this video we will take a look at some good practices for accessing plc data from an HMI using an rslogix 500 as an example.

Often, we are met with a choice of whether to hack something together that will work for now, or to engineer a well-defined solution with traits like: good performance, reliability, portability and maintainability.

The basic practice we will be discussing is setting aside a block of standard memory in the plc to serve as an interface between the PLC and the HMI. For reference in this video we'll call it an interface table. This is in contrast to a more ad hoc approach of just pointing the HMI objects directly at whatever data and i/o in the PLC were interested in some memory here some control registers there some inputs some outputs and so forth.
The interface table is an alternate approach where the HMI reads from and writes to a well defined area of plc memory. The PLC program in turn services the interface table by mapping that table data to the appropriate areas. Importantly this allows the PLC program to maintain control over the HMIS access.
Why might it be worthwhile to do this?
One reason is performance particularly as related to the efficiency of communication between the HMI and PLC. Simply put, data that is less scattered leads to fewer data packets clogging your bus or your network, and therefore potentially better system responsiveness. Data packets or message frames carry a lot of overhead unrelated to your data. Concentrating HMI data into an interface table results in more data per packet, and hence fewer packets and less overhead.
Next up is reliability. The main point here involves keeping the plc which is engineered to be extremely reliable in control wherever possible. You may be able to directly control the PLC's outputs with an HMI but having the HMI instead right to the interface table allows the PLC program to maintain a degree of control. The PLC program can for example implement an HMI enable bit whose value could depend done things like completing a startup sequence, the current comm status, or various safety checks. By the same method, the PLC program can referee the HM eyes reading of data particularly i/o ensuring its validity prior to enabling HMI access.
Let us take a closer look at this simple implementation of an interface table in an rslogix 500 application. I have got a table of bits here which serves as my HMI interface table in this toy program. For example, the HMI can write to these bits to control PLC outputs. If the running PLC program has enabled HMI control, then a simple subroutine copies the bits from the HMI interface table to the outputs every scan. In this case we have copied bit by bit because we like to be very explicit when allowing HMI control of outputs. In servicing the HMI reads of i/o we just move or copy entire words of input and output bits to the interface table for HMI access.
The development and maintenance of a system is determined in large part by its design and its documentation. If we take kind of a half hazard approach to how we interface the HMI to the PLC we may end up making more work for ourselves or others down the line. If we want to make even minor changes to the PLC program which happen to affect the areas accessed by the HMI then the HMI or HMI’s will have to be reprogrammed as well and hopefully the person changing the PLC program will be aware of the affected HMIS both local and remote. However if we've implemented an HMI interface table in the PLC there may need to be no change to the HMIS only a remapping of the interface table in the PLC to the various PLC data areas affected. The presence of the interface table in the PLC code or configuration is itself a kind of documentation if you will making it clear to those modifying the PLC program that there are HMI requirements to be considered but ideally the interface table is described in a document that is kept up to date as changes are made to the system design HMI functionality and the PLC implementation. This is particularly useful when the development or maintenance of the system entails more than one person working on it. The interface table is a clear method of communication between those working on the PLC program and those programming the HMIS. With a well-documented interface table those working on HMI code don't need to know about every little change being made to the PLC program and don't have to be concerned about exactly how for example the i/o as implemented be it embedded expansion or remote i/o etc. And even if you were the only one programming the system and somehow are the only one who ever has to maintain it you'll appreciate not having to relearn the intricacies of the PLC program and i/o structure just to make a small change to the HMI program.

#PLCtraining #HMItraining #Automation #AutomationBasics #HMIprogramming #WeintekPLC #PLCmemory #HMIcoding #coding
4 سال پیش در تاریخ 1399/07/30 منتشر شده است.
4,183 بـار بازدید شده
... بیشتر