General Category > Application Showcase

Sample app with latest controls

<< < (3/3)

Gene T.:
OK, Sounds like staying with the ini file maybe the better way. So no bother in adding the plc description functionality back. The ini file will be fine, once created should be good for all of my projects anyway. I appreciate your help.

Gene

Phrog30:
Ok. I won't bother then.

One thing to note, after you change the trigger addresses, assuming you are using DINTs, you will need to change the bit length from 16 to 32. It's currently at 16 for the modbus test. You have to do this in code, let me know if you need help finding it.

Or, you can use INTs and there isn't anything to change.

Phrog30:
I lied, here is an updated app that will read descriptions from your PLC.
https://drive.google.com/file/d/1XQm0JiKfaghv4Ktjf22MzNqfmVjJaVcV/view?usp=sharing
I only tested for CLX/CpLX using full strings, 82 characters.  I created two PLC arrays, the triggers are DINT[10], "AlarmTriggers", the descriptions are STRING[200], "AlarmDescriptions".  Note that if the strings are blank it will use whatever is in the flat file.  You can change the bit length and description lengths in the global class, see picture 1.  It's a little clunky, but I'm using a datasubscriber for the descriptions, but you only enter the base tag in it.  It will then dynamically add items based on length you set in globals and add brackets [ ]  to it, so it has to be an array of strings, you can't use structures/UDTs the way it currently is.  If you need structures, it will need changed a bit.  Picture 2 shows the setup of datasubscriber PLC address name.  Picture 3 shows PLC tags. 

Even if you don't need this app you can play around with it, it may come in handy.  I allow the descriptions to update even while the trigger is active.  This differs from most HMIs, where the embedded server only updates on transition.  This is nice if you build strings in the PLC and they update even after the triggers first occurs.

Gene T.:
Thanks James I will check it out.

Gene

Navigation

[0] Message Index

[*] Previous page

Go to full version