New2PLCs
Guest
N
My program worked great until I fired it up with an input on. Bummer! Part of my code executes on a one-shot rising instruction. It looks like this:
<big><big><listing>
I:0 B3:0
|--| |-----------------------------------( )--|
0 0
B3:0
|--| |----------------------------+-OSR-----+-|
0 | B3:0/1 |
| B3:0/2 |
+---------+
B3:0
|--| |----------------------------+-ADD-----+-|
2 | |
+---------+
</listing></big></big>
.
The code is a bit more involved than this, instead of I:0/0 simplying turning on B3:0/0 there is some intermediate processing in a subroutine, and there's also other outputs hanging off the XIC B3:0/0, but this is essentially what it amounts to.
My question is why doesn't my one-shot fire when an input is on when the program initializes. (I've already got a work-around: an XIO S:1/15 in line with the XIC I:0/0 so that it waits to examine the inputs until the second scan, in which case my one-shot works just fine.) I was hoping one of you guys with more knowledge of the internals of this stuff might be able to tell me. I would think there's something more to the OSR that you don't see other than the storage bit and the output bit, or I would expect the one-shot to fire on the first rung scan.
Thanks,
-Don
<big><big><listing>
I:0 B3:0
|--| |-----------------------------------( )--|
0 0
B3:0
|--| |----------------------------+-OSR-----+-|
0 | B3:0/1 |
| B3:0/2 |
+---------+
B3:0
|--| |----------------------------+-ADD-----+-|
2 | |
+---------+
</listing></big></big>
.
The code is a bit more involved than this, instead of I:0/0 simplying turning on B3:0/0 there is some intermediate processing in a subroutine, and there's also other outputs hanging off the XIC B3:0/0, but this is essentially what it amounts to.
My question is why doesn't my one-shot fire when an input is on when the program initializes. (I've already got a work-around: an XIO S:1/15 in line with the XIC I:0/0 so that it waits to examine the inputs until the second scan, in which case my one-shot works just fine.) I was hoping one of you guys with more knowledge of the internals of this stuff might be able to tell me. I would think there's something more to the OSR that you don't see other than the storage bit and the output bit, or I would expect the one-shot to fire on the first rung scan.
Thanks,
-Don