It sounds like you’re saying that (A) was correct, and (B) was not– that is, that this is actually a separate “run time” which is not equal to the setting on the DIP switches.
If I understand what you are saying, there are now a number of separate delay intervals. Let’s give them names so that we can tell them apart:
(A) The post-trigger delay, fixed at 3 seconds. We’ll call this “TIME A” to be clear.
(B) The time delay, set by the DIP switches. We’ll call this “TIME B” to be clear.
(C) A third time delay, called “TIME C”, that is somewhere in the range 0.3 – 0.5 seconds.
(D) A fourth time delay, called “TIME D”, that is 0.2 seconds
(E) A fifth time delay, called “TIME E” that is in the range 0.1 – 0.3 seconds, or perhaps 0.2 – 0.3 seconds.
You have given me several different values for these different time delays. If these values are going to be set in the program only, then you need to pick values for each of these, particularly TIME C and TIME E that still have time ranges.
Let’s see if we have this all together then:
The changes (versus the standard program) that you are asking for are now as follows:
(1) Change PB3 from an input to an output.
(2) Add a time delay (“TIME A”) of 3 seconds after receiving a trigger, without doing anything else.
(3) After that time delay, simultaneously turn on the relay and turn PB3 high. This occurs at “TIME A” after the initial trigger signal.
(4) After some to-be-specified time (“TIME C”), take PB3 low. The time between the initial trigger signal and PB3 going low is “TIME A” + “TIME C”.
(5) At a time of “TIME A” + “TIME B” – “TIME D” from receiving the trigger signal, take PB3 high again. This is an interval “TIME D” before the end of the relay turning off.
(6) At time “TIME A” + “TIME B” (the time delay set by the DIP switches plus three seconds after the initial trigger), turn the relay off.
(7) At time “TIME A” + “TIME B” + “TIME E”, turn PB3 low.
Then, wait for the next trigger.
Is this correct?