Author Topic: relay not latch Random  (Read 12636 times)

artkraft

  • Newbie
  • Posts: 22
  • I'm a llama!
    • View Profile
relay not latch Random
« on: July 26, 2017, 05:28:07 PM »
I have 2 identical machines running same program. They have been working fine for over a year. Now they will fail to latch a relay at
random. The PLC sees the input and will work if I latch it on line. I am using a CusFn to update parameters from a touch screen every .5 sec. If nothing has changed does it still record the setting and use up the memory record limits. I also have one machine that a counter will not count down to zero even thought the PLC sees the trigger.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:relay not latch Random
« Reply #1 on: July 27, 2017, 09:44:36 PM »
Are you using the touch screen to trigger an input?

Note that the PLC physical input is refreshed every end of the ladder logic scan. That means that if the HMI triggers a physical input when the ladder logic program has already passed the rung that uses the input (to latch a relay or count down a timer), the input bits will be refreshed at the end of the ladder logic scan and the changes from the HMI is lost. This can cause the input trigger from the HMI to be unseen by the ladder program.

The correct way is always for the HMI to turn on an internal relay bit and the internal relay bit is then used by the ladder logic program for decision making. The program can then clear the internal relay bit after the command has be executed. This ensure that the input will not be cleared by the I/O refresh cycle.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS