Files
dev/script/MonitorScan.py
2018-01-19 10:56:53 +01:00

19 lines
734 B
Python
Executable File

###################################################################################################
# Demonstrate the use of Monitor Scan: sampling based on device change event
###################################################################################################
set_device_alias(sc1, None)
setup_plotting( line_plots =[sc1] )
#Execute the scan: 50 samples
r1 = mscan(sc1, [sc1], 50)
#Execute the scan: 50 samples, with a timeout of 2s, including a second device
r2 = mscan(sc1, [sc1, sin], 50, 2.0)
#Execute the scan: sampling for 5s, an undefined number of sample
#The second device is cached so the scan is entirely asynchronous (the trigger device is always cached).
r3 = mscan(sc1, [sc1, sin.cache], -1, 5.0)