# The faults a bench program must survive, one instrument each, for flowRS's own tests and for # an agent to rehearse against (spec/flowrs-bench-sim-1.md §5 and §11). Written for flowRS # (Apache-2.0). # A meter whose measurement takes 2.5 s to come back: a read with the default 2 s timeout # fails, and the late answer is still there for the next read. [[visa.instrument]] resource = "SIM::SLOW0" idn = "SIM,DMM,SLOW,1.0" match = "scpi" [visa.instrument.measure] "MEASure[:VOLTage][:DC]?" = "voltage" [visa.instrument.quantity.voltage] value = 12.0 noise = 0.001 seed = 31 [visa.instrument.faults.delay] "MEASure[:VOLTage][:DC]?" = 2500 # A supply that stops answering 1.5 s into the run, as a hung firmware does. [[visa.instrument]] resource = "SIM::HANG0" idn = "SIM,PSU,HANG,1.0" match = "scpi" latency_ms = 10 [visa.instrument.set] "VOLTage" = "voltage" [visa.instrument.measure] "MEASure[:VOLTage]?" = "voltage" [visa.instrument.quantity.voltage] value = 0.0 settle_ms = 100 min = 0 max = 30 [visa.instrument.faults] hang_ms = 1500 # A meter that reads 230 V through ranges: on its 100 V range the reading is an overload. [[visa.instrument]] resource = "SIM::RANGE0" idn = "SIM,DMM,RANGE,1.0" match = "scpi" [visa.instrument.measure] "MEASure[:VOLTage][:DC]?" = "voltage" [visa.instrument.range] "[SENSe:]VOLTage[:DC]:RANGe" = "voltage" [visa.instrument.quantity.voltage] value = 230.0 noise = 0.05 seed = 1 ranges = [0.1, 1, 10, 100, 1000] # A meter whose every reading also queues an error, with a queue four deep: a program that # never reads its errors finds the last of its four replaced by -350, "Queue overflow". [[visa.instrument]] resource = "SIM::ERR0" idn = "SIM,DMM,ERR,1.0" match = "scpi" queue_depth = 4 [visa.instrument.measure] "MEASure[:VOLTage][:DC]?" = "voltage" [visa.instrument.quantity.voltage] value = 5.0 [visa.instrument.faults] error_on = { "MEASure[:VOLTage][:DC]?" = [-221, "Settings conflict"] }