Updated Program Incorporating Sugestions
HI Folks:
I updated my program as recommended. But I get strange behavior when I run it, only the code outside the JMP - TND sections will work properly unless my output section is at the top of the program. Let me give some specifics.
I am using a Koldwater simulator for the AB SLC-500 to run this. The object of the program is to use the JMP, TND & LBL commands to run a 3 or 3+3 = 6 conveyer system using the JMP to bypass the 3 conveyer code. Each conveyer comes on at a different time and shuts down at a different time and in reverse order of start up. This is one of the projects in the Koldwater training.
I replaced all of the outputs between the JMP - TND and LBL - End sections with internal relays so as not to refer to the same output in two places. Then I associated the internal relay with an output. I have three control switches, Start, Stop and the jump switch.
When the output section is between the bottom of the LBL instructions and the program END (after rung 32 but before 33), only the 6 conveyer section works in setting the outputs (rungs 16 to 32), and when I place the output section Above where the JMP command rung is positioned (as shown in the attachment) both the 3 and six conveyer sections work fine.
In trying to troubleshoot the program behavior when the output section is after the 6 conveyer code, I can see that the bit status is working fine, in both the 3 or 6 conveyer system, but even though the internal relays (B3) is directly connected in the output, the output does not energize. Maybe this is a simulator bug - not sure, but wanted to get any comments folks have.
I will enclose my working program where the output section is placed first so that my descriptions are more clear. The output section is shown as rungs 0 through 5. So the code is as shown works fine, when the output section is placed starting after rung 32 it does not work. Since I am training my self, any comments on program approach are welcomed.
Thanks in advance for any comments folks have.
Cougar440