My problem is that the s.startForeground takes 0.3 seconds, on average, to do this; even without the timer, just executing { tic, s.queueOutput, s.startForeground, toc} gives an elapsed time of 0.3 seconds. I need it to be faster, so that I can see the plot refresh quicker.

I searched and found the property s.Channel.ADCTimingMode that I should be able to set to 'HighSpeed' instead of the default 'HighResolution' for this purpose, but I don't seem to be able to set it. I get an error "No appropriate method, property, or field ADCTimingMode for class daq.AnalogChannel", and s.Channels says:Data acquisition analog input voltage channel 'ai0' on device 'Dev1': Coupling: DC TerminalConfig: Differential Range: -10 to +10 Volts Name: '' ID: 'ai0' Device: [1x1 daq.ni.DeviceInfo]MeasurementType: 'Voltage'