A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
For example I like to have my alarms in a DDT so I can have easy to read names for each alarm. I then want to read this structure from HMI/SCADA so a %M variable is needed for each alarm. (my SCADA isn't great at extracting bits from a %MW but that is another story).
This is how I do it now and that might not be the nicest way at all so that is why I would like others comments and ideas on this 🙂 I create two equal size arrays as the DDT, one EBOOL and one BOOL (since the DDT elements isn't accessible by a number/index too which I sometimes wished also but that too is another story).
I then give both the DDT and the BOOL array the same %MW start address making the %MW address the "glue" between those two data structures. The EBOOL array gets an %M start address. I then use a FOR loop in ST and loop through each BOOL array element and copies the value to the EBOOL array. This creates a one way copy of a BOOL DDT structure as an EBOOL array where %M addressing is possible. I might mention that my ST loop can have per alarm conditions too like blocking or delay as I thought this was a good place to do that too at.
The downside to my approach is that is is not directly clear what %M address a specific alarm in the DDT has, you have to count the BOOLs in the DDT. Second is that this approach is not a very efficient workflow if you have to do it with more BOOL DDTs, maybe one of these per project could be ok but I can't imagine doing it with many. Third it is one way which is fine for alarms. And last, it is not that obvious why and how it works for someone else looking at this code as it is what I consider a "workaround".
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-09-1809:41 PM
I assume that you need to transfer an Array of EBOOLS located at %M addresses to communicate to your SCADA. Keep the array of located EBOOLs, i.e. assign the array to a %M address. "Alias" a second bool with the alarm name to the first element of the array, repeat this for elements of the array. You can use the spreadsheet tool that comes with Control expert to simplify this.
Use the alias tags in the alarm logic to help it make easier to understand. Make sure that you have the tools \ project settings \program \languages \common \ enable implicit type conversion = ticked.