> block's /bgstim seemed that it would solve the problem at least of instructions, because they are at the beginning of each block so the port would open and stay on till at least the trials > start. However, this didn’t work and the port does not open when the instruction pages appear.
No. That's the expected behavior. /bgstim is executed before the *trials* start, not before any instruction pages.
> Also, when another port opens during trial, bgstim is overwritten.
/bgstim is executed exactly once, at the time explained above, so this is again the expected behavior.
Again, as mentioned before:
- Present your instructions via regular <trial> elements in a <block>, not <page> or the like.
- Same with any "break" pages.
> Then, regarding jittered intervals I cannot think of a way that different time intervals could be presented as stimuli or trial elements.
Just branch to a <trial iti> from every regular trial and set that ITI <trial>'s /trialduration via a variable. You'll get jittered intervals implemented as a regular trial and that trial can open the air port just like any other.