Continuing....
As a matter of good programming practice, a one shot storage bit should
NOT be used more than once. Writing to the storage bit elsewhere can cause unpredictable results and can be a major pain to debug.
But there are some exceptions.
In the SLC-500 suppose we needed a fallig edge pulse - we need something to be on for one scan just as we turn something off. The OSF instruction is not available.
Suppose we have this rung and we need a one shot
pulse when O:0/0 turns off.
I:0/0 I:0/1 O:0/0
---] [---+---] [---+------( )--
| |
| O:0/0 |
+---] [---+
And so we add the following rung:
O:0/0 B3/0 B3/1
---]\[-----[OSR]-------( )---
At first glance you might think this is OK, as soon as O:0/0 turns off we will get our pulse, right? But there is another condition that will generate a pulse as well. When the processor makes its first scan after power up or switching to run from program O:0/0 is off and a pulse will be generated. This pulse is not a true falling edge pulse - one where we get a pulse only after O:0/0 has actually been on and then shuts off. In some applicaitons this won't be a problem, but in others it could be a really big problem.
So you might be tempted to just throw in a first pass bit like this:
O:0/0 S:1/15 B3/0 B3/1
---]\[----]\[----[OSR]-----( )-
But it won't work. It will just delay the pulse by one scan, (In the SLC-500/501 you can't put an instruction between the OSR and the output instruction)
But presetting the storage bit will make it work like a true falling edge one shot.
First Pass
S:1/15 B3/0
---] [----------------(OTL)--
O:0/0 B3/0 B3/1
---]\[-----[OSR]-------( )---
This little bit of ladder legerdemain is not necessary in processors that have an OSF instruction which behaves as a true falling edge one shot.