Skip to content

Commit 81114c4

Browse files
author
Dilmi Wickramanayake
committed
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of https://github.com/ni/nipanel-python into users/DilmiWickramanayake/Analog_Input_filtering
2 parents e5e2b9b + fcbc70c commit 81114c4

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

examples/nidaqmx_analog_input_filtering/nidaqmx_analog_input_filtering_panel.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
is_running = panel.get_value("is_running", True)
4646
with left_col:
47-
st.write(panel.get_value("is_running", False))
4847
if is_running:
4948
st.button("Stop", key="stop_button")
5049
else:
@@ -89,17 +88,19 @@
8988
st.selectbox("Sample Clock Source", options=["Onboard Clock"], index=0, disabled=True)
9089
st.number_input(
9190
"Sample Rate",
92-
value=1000,
93-
min_value=1,
94-
step=1,
91+
value=1000.0,
92+
min_value=1.0,
93+
step=1.0,
9594
disabled=panel.get_value("is_running", False),
95+
key = "rate"
9696
)
9797
st.number_input(
9898
"Number of Samples",
9999
value=100,
100100
min_value=1,
101101
step=1,
102102
disabled=panel.get_value("is_running", False),
103+
key = "total_samples"
103104
)
104105
st.selectbox("Actual Sample Rate", options=[panel.get_value("sample_rate")], disabled=True)
105106

@@ -194,6 +195,22 @@
194195

195196
with right_col:
196197
with st.container(border=True):
198+
st.title("Task Types")
199+
id = stx.tab_bar(
200+
data=[
201+
stx.TabBarItemData(id=1, title="No Trigger", description=""),
202+
stx.TabBarItemData(id=2, title="Digital Start", description=""),
203+
stx.TabBarItemData(id=3, title="Digital Pause", description=""),
204+
stx.TabBarItemData(id=4, title="Digital Reference", description=""),
205+
stx.TabBarItemData(id=5, title="Analog Start", description=""),
206+
stx.TabBarItemData(id=6, title="Analog Pause", description=""),
207+
stx.TabBarItemData(id=7, title="Analog Reference", description=""),
208+
],
209+
default=1,
210+
211+
)
212+
trigger_type = id
213+
panel.set_value("trigger_type", trigger_type)
197214
st.title("Trigger Settings")
198215
tab1, tab2, tab3, tab4, tab5, tab6, tab7 = st.tabs(
199216
[

0 commit comments

Comments
 (0)