As done [here](https://github.com/tenss/SimpleMScanner/blob/dev/code/DAQmx_Scanners/polishedScanner.m).