| Omnitrig.stm |
There are two stimulus modes (smode): Continious - stimulus is updated on each received parameter (smode=0) Triggered - stimulus is shown on trigger only (smode=1) On startup, we are in smode 0 readparams block is called, and stimulus is updated within readparams loop until the "transfer finished" flag is received. Before that, script is switched to smode=1, and background appears. Then we go to the main loop, and wait for trigger, and then SHOWONTRIGGER(rise,1) is executed and trial begins. If we are in the search mode of the system, stimulus can be updated during trial (the UpdateTrial option).
Also see the comments in the script code.