SoftwareJanitor
Member
More dumb questions from the 'Janitor:
In this program I've been looking through (that I didn't write), I see hard-coded constants which are against my coding religion.
What's the equivalent of a "#define ARRAYSIZE 500" on these PLCs? This program *could've* been written in structured text, but a contractor wrote it in ladder (unfortunately). Do I just have to declared a variable and set it to this value (hoping it never gets accidentally overwritten)?
In this program I've been looking through (that I didn't write), I see hard-coded constants which are against my coding religion.
What's the equivalent of a "#define ARRAYSIZE 500" on these PLCs? This program *could've* been written in structured text, but a contractor wrote it in ladder (unfortunately). Do I just have to declared a variable and set it to this value (hoping it never gets accidentally overwritten)?