The ONS (one shot) seems to confuse me.
Can you explain why it would be necessary on rung #1 but not rung #2? ...
I realize others have already answered the query, and correctly, and hopefully those answers cleared up any confusion.
But because the query was made in the first place, I wonder if the fundamental issue is that @Ones_Zeros does not fully understand the significance of the scan cycle, which is a primary aspect of a digital PLC.
Background
Programming PLCs is about time: measuring or sensing
when input events occur, and choosing
when to respond to those events by modifying outputs.
The scan cycle of a digital PLC is an attempt to model a
continuous process (e.g. physical relays) with a
discrete, i.e.
non-continuous, but
repeating process. That process is the PLC running the entire program one discrete scan cycle at a time, but also running successive scan cycles
repeatedly and so
quickly that the overall PLC process of repeating
discrete scans approximates, i.e. models, a
continuous process.
Given that background, let me take a stab at getting @Ones_Zeros to answer their own query by asking these questions:
1) On Rung 1, for how many scan cycles
in a row will the output rung of the [EQU DateTime.Day 1] instruction be true?
1.1) I.e. just the output rung of that one [EQU] instruction, not including the [ONS] instruction?
2) On Rung 2, for how many scan cycles
in a row will the output rung of the [NEQ Current_Month DateTime.Month] instruction be true?
2.1) Note that, once the [NEQ] output rung is true, that activates the input rung of the [MOV DateTime.Month Current_Month] instruction.
2.1.1) That means that Rung 2,
in toto, implements a one-shot pattern (algorithm).
3) Can you implement the one-shot algorithm against a bit (boolean) tag using only XIC, XIO, and OTE instructions, i.e. with no purpose-built ONS/OSR instruction?