Author Topic: Problem with Controls Blinking/Flickering  (Read 2453 times)

antperez02

  • Newbie
  • *
  • Posts: 2
    • View Profile
Problem with Controls Blinking/Flickering
« on: November 12, 2014, 02:05:01 PM »
First off, thanks for the great program and your assistance with this problem. This may be user error but it seems that when I add components on the same output/input card everything works fine but as soon as I add another control using an address outside the first card everything begins to flicker. I was originally using a custom control (a simple pilot light) I had made which is where I began seeing the flickering. It maybe coincidental but it seems if the data is a high value (True) then the control would not flicker low but all of the low value controls would flicker high. I switched to the provided pilot light control and the lamp illumination does not flicker but I get a flicking legend plate label that alternates from the specified label text to "Invalid Value Returned" and then a random number(1187 or -3655 for example). I added simple labels for the same addresses and they flicker from the correct true or false to the random number. I am not sure of the problem because I have used AdvancedHMI for a few other applications and never had a problem but that was a previous release. Hopefully I haven't confused you too much and I tried to provide any relevant information below. I will continue to play around and see if I can find the problem or a workaround but any help would be appreciated. Thanks!

PLC: SLC 500 1747-L55
Visual Studio 2013
EthernetIPforPLCSLCMicroCom Driver -  Version 3.8

Used addresses with no problems:
O:8/0
O:8/1
O:8/2
O:8/3
O:8/4

Problems arise when using:
O:8/0
O:8/1
O:7/0

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Problem with Controls Blinking/Flickering
« Reply #1 on: November 13, 2014, 06:59:54 AM »
There have been a few reports of this flicker and it seems to be all related to the Micro/SLC series PLCs, but I have not been able to replicate here yet. There seems to be a trend with the read optimizing the driver does behind the scenes. In your case, the driver would group the O:8s all in a single read. But then when you add the O:7, it has to do 2 separate reads.

Does it flicker if you only use internal bits and no IO addresses?

antperez02

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Problem with Controls Blinking/Flickering
« Reply #2 on: November 13, 2014, 09:49:21 AM »
So I kept the flickering components in place and added a few more with the addresses:
B3:0/0
B3:1/0
B3:2/0
B3:8/0
B12:0/9
B12:0/10
B12:0/11
B12:0/12

These new controls worked perfectly and only the ones that flickered before were showing the problem. I can assign bits to the I/O as a workaround and it should work fine. I appreciate your help and  please let me know if there is anything you would like me to test further to assist you. Again thanks for your time and generosity.

Jimlee20

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Problem with Controls Blinking/Flickering
« Reply #3 on: November 20, 2014, 02:37:45 PM »
I have a slight change in one of mine.  However, in mine, the PLC code may be doing it.   When I run the same PLC code with Factory Talk it doesn't happen.  Basically in my code the scan sees one rung true and another rung later changes the value so I see a slight flicker occasionally.  I am running a CompactLogix.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Problem with Controls Blinking/Flickering
« Reply #4 on: January 11, 2015, 01:40:59 PM »
I have 2 applications that flicker.  One with a Controllogix and one with a Compactlogix.  Have any of the newer releases addressed this?  I'd like to go back and update those two applications.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Problem with Controls Blinking/Flickering
« Reply #5 on: January 11, 2015, 02:20:55 PM »
This is a problem that several people have reported, but I have never been able to reproduce. I am not sure if it is related to PC hardware or a Windows setting or the application.

AdvancedHMI uses Winforms with GDI+ for its graphics. GDI+ paints the forms in layers starting with the background. Typically this flicker is seen when the screen updates in between a background paint and control paint.

One method to avoid this is to use what is referred to as Double Buffering. Essentially the full form is drawn completely in memory, then paint to the form as a single bitmap.

On the MainForm is a property named DoubleBuffered. Setting this to True may reduce the flicker.

StephenSDH

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Problem with Controls Blinking/Flickering
« Reply #6 on: January 11, 2015, 02:30:27 PM »
I have another application coming up with a compactlogix.  I'll try the double buffer and document it, if it shows up.

Thanks,

Steve