Why are macros slow when Schneider M340/M580 series offline

Why are macros slow when Schneider M340/M580 series offline https://forum.weintekusa.com/uploads/db0776/original/2X/4/4342dc65a57d79d30e5992b787904cc900ac65bf.png
none 0.0 0
  • HMI Model : CMT FHDX 820
  • EasyBuilder Pro Version: V6.10.01.465

Hello,

i’ve been trying to make a blinking animation between 2 states of a multi-state picture using periodic macros (run once every seconds), but for some reasons they are painfully slow, even when there’s only one running.

i tried manually blinking the picture to know if it was a probleme from displaying it, but no probleme there, display itself is fast enough.

i’ve managed to make some of them fast enough to have the picture change within a second by spliting my macro into several smaller macros, but others still can’t change state within 1 second and so it skips it and change state every 2 seconds instead.

what i don’t understand is how it is so slow while the macro itself is not even 20 lines long, i must be missing something.

here’s one macro that constantly skip :

can anyone help me understand?

Hi @PikTea ,

Thanks for reaching out!

Just for initial trouble shooting purposes and for our better understanding, do you have a “Turn around delay” set? If you do, could you set it back to zero and test your project again? You can find this setting within the driver configuration.

Another good thing to check is if there’s any memory overlap. You can use the address grid under the view tab to double check. That can also be a cause of some communication issues.

Hi @DanielDahilig ,

thank you for replying,

I checked my device settings and i don’t have any turn around delay, besides i don’t think the probleme is from communication since it also appears when i’m in an offline simulation.

I remapped all of my tags used for animation and i didn’t see any memory overlap from the adress grid, i did find it strange that some of my “LW” adressed tags used 1 adress while others used 2 adresses even though they’re all 16-bit BCD. By default i had created them thinking they would use 2

@PikTea ,

Thanks for the update, could you also also share with us some screenshots of your system parameters and driver settings, a copy of the image your trying to display, as well as the serial number for your device?

@DanielDahilig ,

Here are some screenshots of my parameters and the 3 states my picture can have.

@PikTea ,

Thanks for sending those screenshots over. We put together a little test project for you. Could you please test this project in simulation and let us know the result?

testani.cmtp

@DanielDahilig ,

I just did some tests with your project :

I can go as fast as i want to update the picture via the button.

my macro works fine, updating LW100 every seconds like it’s supposed to (also worked when i changed the period to half a second)

i then tried to link the macro with the same object that i use in my project (read word) and the picture is updated just fine even at half a second speed.

i tried spamming around 50 pictures at once, wondering if it was because there was too many of them, but they were all still updated in sync at half a second speed.

finally i added 15 or so macros that would run in the back ground, and i duplicated my macro so that there would be one with one of the first IDs and another with one of the lasts, both pictures were updated in sync at half a second speed.

Edit :

I took another look at my project and i can see with some numeric display that the data given by the macro is slower than it should be even when there’s no pictures linked to such data, it seems that the picture itslef has nothing to do with the probleme, though the macro works fine on your project even when a lot of other macros function in the background.

Edit² :

I just found out that the GetData functions seems to be the probleme, when the getdata fetch a value from M580 PLC (even if it’s offline simulation) the macro will be super slow, but if you change them to fetch values from the Local HMI it works like a charm, half a second speed on my project no probleme.

Is there any way to counter act that, or another way to get my values from PLC to the Macro?

Hi @PikTea,

When this macro reads from your PLC, do you receive a “Device no response” message? Also, does the screen on which the animation is displayed have any numeric objects or bit lamps that read from the PLC?

Hello @Brendon.S ,

right now i haven’t been able to connect my HMI to my plc, thus having the “device no response” message when using the HMI directly or an online simulation, but, the probleme also occurs when i do an offline simulation, in which the plc state shouldn’t matter and you can’t have that message .

Yes, i do have other objects on the same screen that read from PLC with and without using Macros.