|
35 | 35 | # How to use nidaqmx: https://nidaqmx-python.readthedocs.io/en/stable/ |
36 | 36 | with nidaqmx.Task() as task: |
37 | 37 | chan_type = panel.get_value("chan_type", "1") |
38 | | - |
| 38 | + |
39 | 39 | if chan_type == "2": |
40 | 40 | chan = task.ai_channels.add_ai_current_chan( |
41 | 41 | "Mod3/ai10", |
|
81 | 81 | ) |
82 | 82 | panel.set_value("actual_sample_rate", task._timing.samp_clk_rate) |
83 | 83 | panel.set_value("sample_rate", panel.get_value("rate", 100.0)) |
84 | | - |
| 84 | + |
85 | 85 | task.in_stream.configure_logging( |
86 | 86 | file_path=panel.get_value("tdms_file_path", "data.tdms"), |
87 | 87 | logging_mode=panel.get_value("logging_mode", LoggingMode.OFF), |
88 | 88 | operation=LoggingOperation.OPEN_OR_CREATE, |
89 | 89 | ) |
90 | | - if panel.get_value("filter","Filter") == "Filter": |
| 90 | + if panel.get_value("filter", "Filter") == "Filter": |
91 | 91 | chan.ai_filter_enable = True |
92 | 92 | chan.ai_filter_freq = panel.get_value("filter_freq", 0.0) |
93 | 93 | chan.ai_filter_response = panel.get_value("filter_response", FilterResponse.COMB) |
94 | 94 | chan.ai_filter_order = panel.get_value("filter_order", 1) |
95 | 95 | # Not all hardware supports all filter types. |
96 | | - # Refer to your device documentation for more information. |
| 96 | + # Refer to your device documentation for more information. |
97 | 97 | panel.set_value("actual_filter_freq", chan.ai_filter_freq) |
98 | 98 | panel.set_value("actual_filter_response", chan.ai_filter_response) |
99 | 99 | panel.set_value("actual_filter_order", chan.ai_filter_order) |
|
0 commit comments