Think about a state mashine structure.
search the manual(s) or the site for information about this powerful way of programing.
state: read A -> (leads to, if no error or ...)
state: read B ->
state: update display ->
....
state: what'n next

state: finish
Can also be combined with one event structure
Data can be passed by shiftregisters or queue (or local variables, but try to avoid that... read about memory management)
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'