The Save Calibration button was made active in this installment. In addition, tab ordering on the front panel was cleaned up and keyboard shortcuts were added for all the control buttons. This involved the following:
- Add function to read calibration info on initialization.
- Add function to save calibration info.
- Add keyboard events for each command button.
- Rearrange the tab ordering using Edit»Set Tabbing Order...
The calibration data was saved using the configuration file VIs. This allows it to be easily modified by the user outside the program itself. Note the function to find the root directory. This function finds the base directory the tuner is running in, whether it is running as a VI under LabVIEW or as a built application. This will be useful when we build this into an application.
Due to the separation of user events and the commands, adding keyboard shortcuts was easy. An event to handle Key Down on the VI was added. Case structures were added to this event to filter only the keys needed. The particular cases where populated with the same code which populates the button events. Documentation was added to the buttons so the user will know what the shortcuts are (very important).
This marks the end of functionality for this application. There are still some things which could be done (e.g. tab order and keyboard shortcuts on the dialogs), but nothing which will prevent the application from doing its job. Next time, we will convert the VI to an executable.
Previous Installments