diff --git a/artiq/frontend/novatech409b_controller.py b/artiq/frontend/novatech409b_controller.py index 8eb6b280a..d3c5ddf75 100755 --- a/artiq/frontend/novatech409b_controller.py +++ b/artiq/frontend/novatech409b_controller.py @@ -31,6 +31,11 @@ def main(): args = get_argparser().parse_args() init_logger(args) + if not args.simulation and args.device is None: + raise ValueError("You need to specify either --simulation or " + "-d/--device argument. Use --help for more " + "information.") + dev = Novatech409B(args.device if not args.simulation else None) try: simple_server_loop( diff --git a/artiq/frontend/pdq2_controller.py b/artiq/frontend/pdq2_controller.py index 9a9885565..95b86caa5 100755 --- a/artiq/frontend/pdq2_controller.py +++ b/artiq/frontend/pdq2_controller.py @@ -27,6 +27,12 @@ def main(): args = get_argparser().parse_args() init_logger(args) port = None + + if not args.simulation and args.device is None: + raise ValueError("You need to specify either --simulation or " + "-d/--device argument. Use --help for more " + "information.") + if args.simulation: port = open(args.dump, "wb") dev = Pdq2(url=args.device, dev=port) diff --git a/artiq/frontend/pxi6733_controller.py b/artiq/frontend/pxi6733_controller.py index 1c4a5ce64..1307bede2 100755 --- a/artiq/frontend/pxi6733_controller.py +++ b/artiq/frontend/pxi6733_controller.py @@ -25,6 +25,11 @@ def main(): args = get_argparser().parse_args() init_logger(args) + if not args.simulation and args.channels is None: + raise ValueError("You need to specify either --simulation or " + "-C/--channels argument. Use --help for more " + "information.") + if args.simulation: daq = DAQmxSim() else: diff --git a/artiq/frontend/thorlabs_tcube_controller.py b/artiq/frontend/thorlabs_tcube_controller.py index c8766dd6c..fd879d0a5 100755 --- a/artiq/frontend/thorlabs_tcube_controller.py +++ b/artiq/frontend/thorlabs_tcube_controller.py @@ -26,6 +26,11 @@ def main(): args = get_argparser().parse_args() init_logger(args) + if not args.simulation and args.device is None: + raise ValueError("You need to specify either --simulation or " + "-d/--device argument. Use --help for more " + "information.") + if args.simulation: if args.product == "TDC001": dev = TdcSim()