File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2121
2222try :
2323 print (f"Panel URL: { panel .panel_url } " )
24- print (f"Press Ctrl + C to quit" )
24+ print (f"Waiting for the 'Run' button to be pressed..." )
25+ print (f"(Press Ctrl + C to quit)" )
2526 while True :
26- print ( f"Waiting for the 'Run' button to be pressed..." )
27+ panel . set_value ( "run_button" , False )
2728 while not panel .get_value ("run_button" , False ):
2829 time .sleep (0.1 )
2930
30- panel .set_value ("is_running" , True )
31-
3231 # How to use nidaqmx: https://nidaqmx-python.readthedocs.io/en/stable/
3332 with nidaqmx .Task () as task :
3433 task .ai_channels .add_ai_voltage_chan (
6463 try :
6564 print (f"Starting data acquisition..." )
6665 task .start ()
66+ panel .set_value ("is_running" , True )
67+
68+ panel .set_value ("stop_button" , False )
6769 while not panel .get_value ("stop_button" , False ):
6870 data = task .read (
6971 number_of_samples_per_channel = 1000 # pyright: ignore[reportArgumentType]
You can’t perform that action at this time.
0 commit comments