Update Using the CyDAQ User Interface authored by clangner's avatar clangner
......@@ -4,21 +4,21 @@
# Mode Selector
When running the app, you will be greeted with the main page, which is the mode selector. It's pretty simple, just select one of the modes. Only two of them are enabled at the moment.
When running the app, you will be greeted with the main page, which is the mode selector. It's pretty simple, just select one of the modes. Only two of them are enabled at the moment.
There is a top menu bar where you can ping the CyDAQ and access the debug page. None of the other options work at the moment.
![image](uploads/4b847c9a81fa2daab4ececb908954460/image.png)
![homepage](uploads/c7f1c149bd056b08bee8c17be178c57e/homepage.PNG)
# Basic Operation
# Basic Operation
On this page, you can collect samples from the CyDAQ with any custom settings you want and save them to a file.
You can set the sample rate with the dropdown menu or typing in a value, and you can set the Input and Filters with the dropdowns.
You can set the sample rate with the dropdown menu or typing in a value, and you can set the Input and Filters with the dropdowns.
For the Filters, the interface will morph depending on whichever other options you need. For 'All Pass,' there are no extra settings required, so that it will be empty. But for options like '1st Order High Pass' or '6th Order Band Pass,' the options will pop up on the screen.
For the Filters, the interface will morph depending on whichever other options you need. For 'All Pass,' there are no extra settings required, so that it will be empty. But for options like '1st Order High Pass' or '6th Order Band Pass,' the options will pop up on the screen.
You have the choice to either start/stop sampling as you choose, or you can set a specified time to sample in the "Sampling Time" field.
You have the choice to either start/stop sampling as you choose, or you can set a specified time to sample in the "Sampling Time" field.
If you want to just send the configuration to the CyDAQ, you can with the "Send Config" button. This sends the config without sampling, and can allow for the CyDAQ to be used as a component in a circuit. Make sure that the CyDAQ is connected and the bottom label says "Connected!" before attempting.
......@@ -28,20 +28,19 @@ When sampling, you can leave the 'Sampling Time' field blank and you will have c
There is a label on this (and other) pages at the bottom that lets you know if the CyDAQ is connected or not, and will update about every second. You will not be able to sample if the CyDAQ is not connected.
To return to the home page, click the Home button at the top left of the page.
To return to the home page, click the Home button at the top left of the page.
![image](uploads/dbd23e8d44a5923b13af85dfa594d610/image.png)
![bomode](uploads/fdf1c8cd8aed425aa9f359795e5bdb5f/bomode.PNG)
# Plotter
> **Note: This page has been disabled.** The original idea was to have data be livestreamed from the cydaq and plotted directly as it was received, but we ran out of time. This current edition can input a CSV file and plot it live, which still has some functionality if you were to want to see what your sample output looked like. You have to re-enable it in the code in the `mode_selector.py` by uncommenting the live plotter code block.
This page can be used to plot sample data on a graph. You can plot it instantly or have a delay to have a live plotting effect (this will be used in live streaming plotting data in a later feature).
This page can be used to plot sample data on a graph. You can plot it instantly or have a delay to have a live plotting effect (this will be used in live streaming plotting data in a later feature).
First, you entire a file name by either clicking the button or typing in a file path. Then, you can choose between a scatter plot or a line plot. Next, you can choose the graphing speed delay by using the slider, setting it to 0 for zero delay (as fast as python can plot the data) or up to 100ms between plotting per delay. Then you can start the plotting with the "Start" button, and if you're "streaming" it, you can pause/unpause the graph with the pause button. At any time, you can clear the graph and plot another file.
First, you entire a file name by either clicking the button or typing in a file path. Then, you can choose between a scatter plot or a line plot. Next, you can choose the graphing speed delay by using the slider, setting it to 0 for zero delay (as fast as python can plot the data) or up to 100ms between plotting per delay. Then you can start the plotting with the "Start" button, and if you're "streaming" it, you can pause/unpause the graph with the pause button. At any time, you can clear the graph and plot another file.
![image](uploads/1079282b23e182b26aabcb88e1e4dd70/image.png)
![image](uploads/0291fa658ff6b41bf081e483f650979f/image.png)
![image](uploads/1079282b23e182b26aabcb88e1e4dd70/image.png) ![image](uploads/0291fa658ff6b41bf081e483f650979f/image.png)
![image](uploads/1a5a39a7f15234f70537089fe1738dac/image.png)
......@@ -49,32 +48,32 @@ You can click the "Home" button in the top left to return to the mode selector p
# Balance Beam
This page is the redesign of the old balance beam GUI that exists separate of the CyDAQ Mixer. This one aims to fix a few of the issues that the other one has, such as not being able to hotplug the CyDAQ, and having lots of issues where it needs to be reconnected and restarted to work, etc.
This page is the redesign of the old balance beam GUI that exists separate of the CyDAQ Mixer. This one aims to fix a few of the issues that the other one has, such as not being able to hotplug the CyDAQ, and having lots of issues where it needs to be reconnected and restarted to work, etc.
> This version of the CyDAQ was implemented without any form of live connection to the CyDAQ, other than the wrapper. This was also a feature that we had originally planned to add, but had run out of time.
The Balance Beam Page looks like this:
The Balance Beam Page looks like this:
![image](uploads/6dc7f4c75ac04def06dbd04a86faecf5/image.png)
As you can see, there is an indicator at the bottom of the page that shows if the CyDAQ is connected.
As you can see, there is an indicator at the bottom of the page that shows if the CyDAQ is connected.
First, we have the button panel on the left side. None of the buttons will work unless the CyDAQ is connected. IF the CyDAQ is connected, then none of the buttons will work (with the exception of the start button) unless the balance beam is currently active.
First, we have the button panel on the left side. None of the buttons will work unless the CyDAQ is connected. IF the CyDAQ is connected, then none of the buttons will work (with the exception of the start button) unless the balance beam is currently active.
The first buttons are the start/stop buttons. The Start button will attempt to start the balance beam mode by checking if the CyDAQ has the balance beam module connected to it. It will return false if this is the case. If t is connected and everything is in order, it should start the balance beam and plot data on the graph on the right side.
The balance beam has a few constants that are set for how the balance beam is supposed to operate. They are all set to 0 from the start, this will cause the balance beam to not work well at first. The user can set the values before they start the balance beam by entering the values and hitting "Start", or they can start the balance beam first and then enter the values using the "Send Constants" button.
The balance beam has a few constants that are set for how the balance beam is supposed to operate. They are all set to 0 from the start, this will cause the balance beam to not work well at first. The user can set the values before they start the balance beam by entering the values and hitting "Start", or they can start the balance beam first and then enter the values using the "Send Constants" button.
The ball will be set on the balance beam at the set point. The default is 0, which is the center of the balance beam. You can set it to anything that is reachable on the balance beam, or else the balance beam will just send the ball to one side and not move. You can send the new set point by clicking "Send Set Point."
Save Step does nothing because we didn't know what it was originally meant to do, and neither did Matt.
Save Plot Data is a feature that let's you save the plotting data into a matlab or csv file. There is currently a semi-working function for this, but the original idea was to have the GUI save the temp data in a file in the C:\Temp\ directory and then copy over the file whenever, because holding that data in memory can be a problem given enough time. Most of the code is implemented for this (the `copyTempFile` method), but we couldn't get it working at all.
Save Plot Data is a feature that let's you save the plotting data into a matlab or csv file. There is currently a semi-working function for this, but the original idea was to have the GUI save the temp data in a file in the C:\\Temp\\ directory and then copy over the file whenever, because holding that data in memory can be a problem given enough time. Most of the code is implemented for this (the `copyTempFile` method), but we couldn't get it working at all.
Offset +/- buttons allow for the calibration of the ball on the balance beam, by moving the ball set a little bit up or down the beam depending on which button you click.
Offset +/- buttons allow for the calibration of the ball on the balance beam, by moving the ball set a little bit up or down the beam depending on which button you click.
The Pause button does what you'd think it does, it pauses and resumes the balance beam without fully stopping it.
The Pause button does what you'd think it does, it pauses and resumes the balance beam without fully stopping it.
The plotting of the balance beam works by the GUI calling a method in the CLI wrapper that sends a command to the CLI tool and gets the ball's current position. It is run a lot, to simulate the data being "streamed." Again, this is because we weren't able to do a direct connection to the CyDAQ to get more accurate/efficient live data.
The plotting of the balance beam works by the GUI calling a method in the CLI wrapper that sends a command to the CLI tool and gets the ball's current position. It is run a lot, to simulate the data being "streamed." Again, this is because we weren't able to do a direct connection to the CyDAQ to get more accurate/efficient live data.
[<< Previous Chapter](GUI) | [Home](Home) | [Next Chapter >>](Python-Performance-Testing)
[<< Previous Chapter](GUI) | [Home](Home) | [Next Chapter >>](Python-Performance-Testing)
\ No newline at end of file