Skip to content

Commit 1c191dd

Browse files
Mike ProsserMike Prosser
authored andcommitted
clean up daqmx example
1 parent dea4895 commit 1c191dd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/nidaqmx/nidaqmx_continuous_analog_input.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
)
1919
panel.set_value("sample_rate", task._timing.samp_clk_rate)
2020
task.start()
21+
print(f"Panel URL: {panel.panel_url}")
2122
try:
22-
print(f"\nPress Ctrl + C to stop")
23+
print(f"Press Ctrl + C to stop")
2324
while True:
2425
data = task.read(
2526
number_of_samples_per_channel=1000 # pyright: ignore[reportArgumentType]

examples/nidaqmx/nidaqmx_continuous_analog_input_panel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
thermocouple_data = panel.get_value("thermocouple_data", [0.0])
2525
voltage_data = panel.get_value("voltage_data", [0.0])
2626

27-
sample_rate = panel.get_value("sample_rate", 0)
27+
sample_rate = panel.get_value("sample_rate", 0.0)
2828

2929
st.header("Voltage & Thermocouple")
3030
voltage_therm_graph = {
31+
"animation": False,
3132
"tooltip": {"trigger": "axis"},
3233
"legend": {"data": ["Voltage (V)", "Temperature (C)"]},
3334
"xAxis": {
@@ -64,7 +65,7 @@
6465
},
6566
],
6667
}
67-
st_echarts(options=voltage_therm_graph, height="400px")
68+
st_echarts(options=voltage_therm_graph, height="400px", key="voltage_therm_graph")
6869

6970
voltage_tab.header("Voltage")
7071
with voltage_tab:

0 commit comments

Comments
 (0)