Lab View Code Walkthrough
The Project
First: Download the project files in the following zip:
Once you have the project open, you should see this as the project landing page. To get everything up and running you will open and boot the VI's in the following order
1. RobotMicSourceLocator.vi (located under robot0 NOT robot1) 2. BasicUST.vi under My Computer 3. LabVIEWMatlabComm.vi (Functionality covered in the Matlab section, it's essentially a black box to us that takes our output from the Matlab processing and brings it into Labview for us to use in BasicUST implementations.) The vi's you are to launch are highlighted in the picture of the project view to the right |
The RobotMicSourceLocator.vi
RobotMicSourceLocator.vi (Block Diagram)
BasicUST.vi
Basic UST essentially acts as the interface between you and the robot. This is the second of the vi's that you need to run in order to set up the robot. From this vi you can establish the threshold distance for the UST to avoid, you can assign start and end coordinates and iterate the robot through movements.
1. To Set the threshold for the UST, enter the value (in meters) to the Thresh input 2. You can set respective start and final positions from the 4 input plates just below Thresh. The d input doesn't actually do anything, it's just another leftover from the 297 project. The current position and output position are primarily as meters to ensure that values are being passed correctly. 3. The Iteration is another meter to ensure things are working correctly, if it isn't speedily increasing, the loop is taking too long. 4. The MoveRobots button allows to manual control over when the robot executes it's next movement, each press iterates a movement. 5. When the UST is panning, the "new picture" input will show the output from the UST plotted into a polar plot. 6. The Real/Test toggle switches between commands being implemented by the robot and not. If in the upper position, the robot will make movements as shown in the current position. If in the lower Test position, the robot will not receive commands to move and instead the movements are only reflected in the Output/Current position. |