Easy Builder Pro Alarm String Length

Easy Builder Pro Alarm String Length https://forum.weintekusa.com/uploads/db0776/optimized/2X/a/a4d8a26978941e12a9bf52eaed6c4ba92392f2bf_2_1024x289.png
none 0.0 0
  • HMI Model: cMT3108XP
  • EasyBuilder Pro Version: V6.10

I’ve got an Alarm Display and Alarm Bar in my project, both of which are cutting off the string that is concatenated inside of Codesys. Is there a way to extend the maximum length to include the whole string for display?

I am using the WATCH syntax as these alarm strings are created as part of each device type’s function block in Codesys.

Hi @JDControlsLLC ,

The message string limit is 32 words for the alarm display. Our recommendation would be use multiple watch address back to back to display the whole string.

Please let us know if this works for your project and if you have any questions.


I altered the String Table to have that syntax including WATCH2 and it gave me the below result

Here is how I made the change

Here is how I linked both WATCH1 and WATCH2 to the same string from Codesys. This string is concatenated in Codesys to produce the alarm message I want.

Is there some other steps needed since this is linked to a Codesys variable instead of local HMI registers?

Update, I realized I didn’t correctly link WATCH2 to the Codesys variable. But I’m just seeing a duplicate of the truncated alarm. I don’t see a way to set WATCH2 to be the continuation of where WATCH1 got truncated.

Hi @JDControlsLLC ,

To view the full message, you may need to transfer the data into LW registers. Then, within a macro, you can split the CODESYS string tag between two watch addresses.

This should allow you to view the entire message.

Please let me know if this works for your project.

I’ve never really fooled with the macros so I don’t know how I would accomplish that. Do you have an example macro I can try?

Or maybe is there another way to link an alarm display message to a Codesys string variable without using the WATCH?

Hi @JDControlsLLC ,

Below is an example of what the macro can look like. The main_string array will gather the data within the CODESYS tag using the GETDATA function. Then, using the SETDATA function, we will place this value within LW 0 and send all 80 characters.

Now, for your watch address, you can set up two. One address is set to LW 0 and the other to LW 32. Each will display 32 words and ensure the encoding type is set to Unicode.

Please try this and let us know if you have any questions.

macro_command main()

short main_string[80]

GetData(main_string[0], "Weintek Built-in CODESYS", "Application.GVL.stringVar2_60", 80)
SetData(main_string[0], "Local HMI", LW, 0, 80)

end macro_command

Looks like this will solve the truncated issue. My only problem is that I have 128 devices maximum under a unit control. So there are a maximum of 128 alarm strings that have to be separated between two LW registers.

For now, I’m just going to revert to a manually typed alarm message per device as I need to get this demo fully functional for Automate in June and am swamped with other stuff too.

Maybe after that I’ll see if I can come up with something slick using this method. Looks like some FOR loop creativity will handle it all within one macro.

Thanks!

1 Like