Dear all,
To thank in advance all those active on the website.
I need help creating a Functin Block (aka Macro) with timers inside, in the Mitsubishi GX IEC Developer (v7.04) for PLC FX3U software.
I am familiar with languages: MELSEC IL, LD, ST.
I need to make a Macro / Function Block (which will be used multiple times) in which 3+ timers will be internally used. I can not pass these timers as variables to the Function Block, and I can not define them as any variable that automatically takes instantiation out of the defined range of system timers (from T100 to T199).
With other words, I need a FB, like the integrated FB “TON” that exists in Standard Lib, which does not specify which Timer (Тnn) to use at any time, but the compiler itself takes a free timer from (T100 to T199).
I do all this because of optimization for speed and memory. If I use integrated FB “TON” in my FB, for all 3+ timers, will get 3+ CALL, additional CALL to my FB, and additionally FB TON returns two variables Q and ET (which ET do not need this time, and takes memory).
My FB would have multiple instances, so, everything is multiplied …
I have readed various literature, and I did not find anything to help me. I tried to open the embedded Standard Lib to see how “TON” was implemented, and I failed, I do not know how to open.
Thanks in advance.
Greeting,
Nick.