This is for Rockwell/Allen-Bradley PLCs, which use all of those instructions.
For those who don't know:
- XIC = Examine If Closed. This is a normally open contact. --| |--
- XIO = Examine If Open. This is a normally-closed contact. --|/|--
- ONS = One-shot contact. This instruction does require a storage BOOL.
- OTE = Output Enable. This is a regular coil.
- OSF = One-shot Falling Edge. This is an output instruction that is on for one scan on the falling edge of the input.
Both of your methods accomplish the same thing: When the input bit (either the XIC or XIO) goes from high to low, the output bit (the OTE) will be high for one scan.
Here is what they look like in Studio5000:
As you can see, Method B requires one more BOOL tag (oneshot_output_method_B) than Method A does.
You might also notice that in the Method B logic, "oneshot_output_method_B" is really equivalent to "output_method_B". One of these tags is unnecessary.
The performance difference between the two is most likely negligible. You should choose the method that is easiest to read and understand, both for you and for anyone that needs to see your program in the future.