you need to build in a few features to your logic,
assuming valve feedbacks are normally open,
basic pseudocode as follows
if not output
and input
or
if output
and not input
=error 1
if error1
run timer 10 secs
if timer elapsed
set error bit
if acknowledge
reset error
if any interlocking valves open
=interlock bit
am assuming local/remote operation controlled by hand/off/auto switch
if auto position input
and auto activation required (from program)
or
if hand pos
and
not error bit
not interlock bit
=output
this is for one device
you need to get this into whatever plc you have, using editor and
test it for one device first.
get your client to supply list of interlocking valves, (usually stuff like a line drain valve and a product from tank valve can't be open together).
write up a document explaining planned device operation for approval
test first device and then copy/paste/replace for rest of devices.
tadg