Friday, September 18, 2009

Discrete Controls and HMI Complexities

Since common HMI Status displays refer to integer variables, it is common to add extra PLC code and special registers to pass the correct integer value to the display status. A typical example would be:
  • Auto Off = 0
  • Auto On = 1
  • Manual Off = 2
  • Manual On = 3
  • Fault = 4
  • MCC Local Off = 5
  • MCC Local On = 6
  • etc.
This is all very nice in terms of easy to understand code, but it is wasteful of PLC resources and completely unnecessary.

Why not instead assign a byte or two to the control element and then assign individual bits to each discrete function, for example:

  • Bit 0 = Auto (0)/Manual (1)
  • Bit 1 = Contact Output
  • Bit 2 = Aux Contact Input
  • Bit 3 = Fault Contact
  • Bit 4 = Local (0)/Remote (1)
  • Bits 5 to 7 not used in this example
Then assign the HMI status to read the same PLC variable and interpret the byte with the following statuses:

  • Auto Off = 0
  • Auto Starting = 2
  • Auto Open/Running = 6
  • Manual Off = 1
  • Manual Starting = 3
  • Manual Open/Running = 7
  • To add Fault status to any of the above add 8
  • To add Remote Status to any of the above add 16
There is no rule that says HMI status has to be some simple sequence of numbers. The approach I have described is a little more complex to map out, but it is easily tested and once you have the first one working, it is a piece of cake to pull the standard status indicator from the library and assign the appropriate PLC variable to it. There is zero code in the PLC aside from the simple few discrete rungs that you need to drive the device.

You get smaller fast PLC code and less data to transfer to the HMI. What are you waiting for? Just do it!

No comments:

Post a Comment