Update Using the CyDAQ User Interface authored by Wyatt Duberstein's avatar Wyatt Duberstein
......@@ -49,4 +49,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 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:
![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.
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 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.
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 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)