Hello All-
I'm trying to re-structure my PLC code (in LD). The current code has blocks contain different type of memory areas (%AI, %AQ, %I, %M, %Q, %R..), the variables assigned to these areas are all global scope as described in the programmer's reference manual, means they can be seen across the program.
Now I want to re-write the code utilizing the local scope variables. E.g each block has its own local scope variables and cannot be seen by other blocks. The problem is, there is only one memory reference in PACSystem PLC (%L) supports local scope and it is word type thus I cannot manipulate bit instructions like I normally do with %M reference.
Could you please provide some hints ? Would it be feasible to re-structure the code following the above method ?
Thank you.
I'm trying to re-structure my PLC code (in LD). The current code has blocks contain different type of memory areas (%AI, %AQ, %I, %M, %Q, %R..), the variables assigned to these areas are all global scope as described in the programmer's reference manual, means they can be seen across the program.
Now I want to re-write the code utilizing the local scope variables. E.g each block has its own local scope variables and cannot be seen by other blocks. The problem is, there is only one memory reference in PACSystem PLC (%L) supports local scope and it is word type thus I cannot manipulate bit instructions like I normally do with %M reference.
Could you please provide some hints ? Would it be feasible to re-structure the code following the above method ?
Thank you.