adccommunitymod (AutomationDirect) asked a question.

HMI Refresh and Event Sequencing

Created Date: November 13,2010

Created By: gesingle

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I'm using a C-More EA7-T6CL HMI with a DL06. This is how it should work: I press a button on the HMI to set a relay. The PLC responds by writing values to V locations and sets a relay to say data is ready. The HMI has numeric displays to show the values. An event is triggered by the data ready relay. The event handler writes an alarm to USB memory containing the new values. The problem is that sometimes old data values are recorded in the alarm on a new event. I suspect the HMI is processing event triggers before it acquires numeric data to update the screen. How can I ensure these actions occur in the proper sequence?


  • adccommunitymod (AutomationDirect)

    Created Date: November 15,2010

    Created by: ebalarde

    That's a very interesting problem and I don't necessarily have a "good " answer, but could you delay the setting of the "data ready " relay by a couple of seconds after updating the V locations? The idea is to give the HMI enough time to read all the new data from the DL06 before logging that event.

  • adccommunitymod (AutomationDirect)

    Created Date: November 15,2010

    Created by: Do-more PE

    This is caused by the way that communications are handled. It takes time to handle communications it's not instantaneous although we tend to perceive it to be.

    Cmore processes communications in a round robin fashion. If you set the trigger to log data and that tag is the next one in line to be processed, Cmore may log old data because Cmore has not got around to updating your log data yet.

    Think of it this way. The data reads are 1, 2, 3, 4, 5. The trigger is #3 and the new data is #1. The rest of the data reads are other objects on your screen. Cmore is currently processing number 2 while you set the trigger (#3) to active. You are guaranteed to get old data since Cmore will see the trigger (#3) as active, but it has not got around to processing your new data (#1) yet.

    Next scenario. Cmore has just processed #4. You set the trigger (#3) to active. Cmore then reads 5, 1, 2, then your trigger (#3). Your data (#1) is fresh since it was read after the trigger was set active, but before Cmore read it to be processed.

    The answer is to set a small timer of a few hundred milliseconds to allow your data to be read by Cmore before setting the trigger to log.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 19,2010

    Created by: gesingle

    I added a 300ms timer and that solved the old readings problem. But through rapid button pressing I could loose some readings. To determine how fast the Cmore scans, I added some handshaking code. I found the scan time to be 481 ms. By changing the PLC to Cmore communications from 9600 to 38400 baud, I was able to reduce the scan time to 213 ms.

    Is there a SYS variable in the Cmore, or other diagnostic tool, that can easily be used to report the scan time?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 13,2010

    Created by: gesingle

    I'm using a C-More EA7-T6CL HMI with a DL06.

    This is how it should work: I press a button on the HMI to set a relay. The PLC responds by writing values to V locations and sets a relay to say data is ready. The HMI has numeric displays to show the values. An event is triggered by the data ready relay. The event handler writes an alarm to USB memory containing the new values.

    The problem is that sometimes old data values are recorded in the alarm on a new event. I suspect the HMI is processing event triggers before it acquires numeric data to update the screen.

    How can I ensure these actions occur in the proper sequence?

    Expand Post