Useful notes


There are two common approaches to register a timestamp to a reading. Either one can rely on a software timer of the master PC – suggested: time.perf_counter() – and log a timestamp inside of your DAQ_function routine. Or one could rely on a hardware timer build into the I/O device and have this timestamp additionally being send back to the PC together with the other requested readings. In general, the latter is superior in high-speed applications. There are pros and cons to each of these approaches, which is a topic in itself and will not be discussed here.

Increase process priority


import psutil

# Set priority of this process to maximum in the operating system
print("PID: %s\n" % os.getpid())
    proc = psutil.Process(os.getpid())
    if == "nt":  # Windows
    else:                # Other
    print("Warning: Could not set process to maximum priority.\n")