This is kinda common on forums. Someone makes a thread with a list of questions and starts a Question Number. If you have an answer, you make a post quoting the question number and the question, and post an answer.
For example
Q1 What is a label?
Both GOTO and CALLSUB use label to identify where to execute next instruction.
Label can be any string less than 10 characters. Label cannot be identical to any
instruction keyword. If sub routines are used then they are coded after the END of
the main routine body. Sub routines start at their label and must end with the
instruction RET e.g.
TEST_IO_SUB:
#instructions here
RET
Subroutines can be called from the main program and from within other subroutines.
Note that WebControl PLC has a return program address stack depth of 8 (or call
stack 8).
And that would be the end of my post with the answer to the question.
So i'll continue with a few questions of my own. Feel free to quote this in your answer, or just reference the question number if quoting is too complicated.
Q2 Can I call END inside a label?
Q3 Can I figure out how deep I am in the call stack?
Q4 Is there a best way to do the year sanity check for a power fail?
Q5 Can we get all the PLC questions in a sticky so we can have one place to look at all the already asked and answered questions?
For example
Q1 What is a label?
From page 22 in the PLC manualQ1 What is a label?
Both GOTO and CALLSUB use label to identify where to execute next instruction.
Label can be any string less than 10 characters. Label cannot be identical to any
instruction keyword. If sub routines are used then they are coded after the END of
the main routine body. Sub routines start at their label and must end with the
instruction RET e.g.
TEST_IO_SUB:
#instructions here
RET
Subroutines can be called from the main program and from within other subroutines.
Note that WebControl PLC has a return program address stack depth of 8 (or call
stack 8).
And that would be the end of my post with the answer to the question.
So i'll continue with a few questions of my own. Feel free to quote this in your answer, or just reference the question number if quoting is too complicated.
Q2 Can I call END inside a label?
Q3 Can I figure out how deep I am in the call stack?
Q4 Is there a best way to do the year sanity check for a power fail?
Q5 Can we get all the PLC questions in a sticky so we can have one place to look at all the already asked and answered questions?