Difference between revisions of "826 demo (VB.NET)"
(→ADC tab) |
(→ADC tab) |
||
Line 97: | Line 97: | ||
;Slot info (left control group) | ;Slot info (left control group) | ||
* Slot enable checkbox - adds slot to slotlist; see | * Slot enable checkbox - adds slot to slotlist; see | ||
− | * Chan - | + | * Chan - analog input channel |
− | * Range - | + | * Range - analog input range |
− | * Settle - | + | * Settle - settling time in microseconds |
− | * Data - | + | * Data - measured sample data |
− | ** in Volts - | + | ** in Volts - display data in Volts (vs. binary) |
− | * Burst - | + | * Burst - burst number (red indicates sample buffer overflow) |
− | * Timestamp - | + | * Timestamp - time when input was sampled |
;General (right control group) | ;General (right control group) | ||
− | * ADC Enable - | + | * ADC Enable - Enable A/D conversions |
− | * Raw Data - | + | * Raw Data - Display uncorrected (vs. cal-corrected) data |
− | * External Trigger | + | * External Trigger |
− | * | + | ** Enable - Trigger bursts from signal (vs. free-running back-to-back bursts) |
− | * | + | ** Source - Trigger signal source (when Enable checked) |
− | * Default Settling Time - | + | ** Invert - Invert trigger signal (when Enable checked) |
− | * Sample | + | * Default Settling Time - |
− | * Calibration Constants | + | * Sample Averaging - Number of samples to average for each displayed Data value |
+ | * Calibration Constants | ||
+ | ** For factory use only; <span style="color:red">do not click Write as it may corrupt the board's calibration!</span> | ||
===Counter tab=== | ===Counter tab=== | ||
[[File:826DemoCounter1.png|800px|Counter tab]] | [[File:826DemoCounter1.png|800px|Counter tab]] |
Revision as of 12:30, 17 May 2017
To jump-start your model 826 project, we offer a comprehensive demo that provides a GUI for nearly every hardware resource on the board. A pre-built executable is included to allow you to immediately configure and exercise the board's I/O interfaces. All VB.NET source files are provided, including a reusable module (mid826.vb) that declares all functions, types, and constants for the 826 API.
Contents |
Installation
To install the demo software, follow these steps:
- If you haven't already done so, download and install the 826 SDK
- Create a new folder for the demo
- Download the demo
- Unzip the demo into the new folder
You may now run the demo in either of the following ways:
- Run app-826-win-vb.exe
- Open the VisualStudio project (app-826-win-vb.sln) and run the demo in the VB.NET development environment
User guide
The demo program has a single window containing a system of tabs, in which each tab groups together GUI controls related to a particular I/O subsystem. If only one board is detected, it will be automatically selected and the tab system will appear when the demo starts. If multiple boards are installed, a dialog box will be displayed when the program starts which shows the IDs of all detected boards (set by board switches); you may select one board, whereupon the tab system will appear. The ID of the selected board appears at the top of the demo window (e.g., "Board #0").
When the tab system is first displayed, all GUI controls are initialized to indicate the current board state. The board state is not changed in any way when the demo program starts or terminates; consequently, the demo program can be terminated and restarted without disturbing the board's configuration or operation.
Multiple instances of the demo may be run concurrently. Typically, the selected board associated with each instance will not also be selected by another instance, though this is permitted (because the API is process- and thread-safe).
Many of the demo's GUI controls are associated with API functions, as noted in the following sections. Please refer to the 826 technical manual for information about the API functions, and to the 826 technical wiki for application examples.
General tab
- Hardware Versions
- Board - PWB revision letter; see S826_VersionRead
- FPGA - firmware version number; see S826_VersionRead
- Software Versions
- API - middleware version number; see S826_VersionRead
- Driver - device driver version number; see S826_VersionRead
- SafeMode
- Active - SAF bit (safemode state); see S826_SafeControlRead, S826_SafeControlWrite
- Write-Enable Data - SWE bit (safemode write enable); see S826_SafeWrenRead, S826_SafeWrenWrite
- Triggers
- Dio47 - XSF bit (enable dio47 triggering); see S826_SafeControlRead, S826_SafeControlWrite
- Watchdog - SEN bit (enable watchdog triggering); see S826_WatchdogConfigRead, S826_WatchdogConfigWrite
- Virtual Outputs
- 0-5 - see S826_VirtualRead, S826_VirtualWrite
- Watchdog
- Control
- Enable - enable/disable watchdog; see S826_WatchdogEnableRead, S826_WatchdogEnableWrite
- Kick - click to kick watchdog; see S826_WatchdogKick
- Status | 0-2 - timeout status of watchdog timer stages; see S826_WatchdogStatusRead
- Configure
- Enable Stage1 Output - NIE bit; see S826_WatchdogConfigRead, S826_WatchdogConfigWrite
- Enable Stage2 Output - OEN bit; see S826_WatchdogConfigRead, S826_WatchdogConfigWrite
- Pulse RST - PEN bit; see S826_WatchdogConfigRead, S826_WatchdogConfigWrite
- Interval - watchdog time intervals; see S826_WatchdogConfigRead, S826_WatchdogConfigWrite
DIO tab
- Inputs
- Top row of checkboxes indicate pin states, which are automatically polled by the demo; see S826_DioInputRead
- Filters - enables for debounce/noise filters; see S826_DioFilterRead, S826_DioFilterWrite
- Filter Delay - filter time for debounce/noise filters; see S826_DioFilterRead, S826_DioFilterWrite
- Outputs
- Set All - turn on all 48 DIO output drivers (drive to 0V)
- Reset All - turn off all 48 DIO output drivers (pull up to +5V)
- Output Register - DIO output driver states; see S826_DioOutputRead, S826_DioOutputWrite. When calling S826_DioOutputWrite, S826_BITSET and S826_BITCLR modes are used to allow a board to be selected by multiple instances of the demo program.
- Alternate Source - see S826_DioOutputSourceRead, S826_DioOutputSourceWrite. Note: Control Tab | SafeMode | Write-Enable Data must be checked to enable changes to these checkboxes.
- Fail-Safe
- State - see S826_DioSafeRead, S826_DioSafeWrite. Note: Control Tab | SafeMode | Write-Enable Data must be checked to enable changes to these checkboxes.
- Enable - see S826_DioSafeEnablesRead, S826_DioSafeEnablesWrite. Note: Control Tab | SafeMode | Write-Enable Data must be checked to enable changes to these checkboxes.
- Capture
- Rising Edge - enable rising edge capture; see S826_DioCapEnablesRead, S826_DioCapEnablesWrite
- Falling Edge - enable falling edge capture; see S826_DioCapEnablesRead, S826_DioCapEnablesWrite
- Status - indicates captured edge (click to clear); see S826_DioCapRead
DAC tab
- Control
- Show SafeMode Settings - allows channel controls (below this control) to display/modify safemode (vs. normal mode) settings. Note: Control Tab | SafeMode | Write-Enable Data must be checked to enable writing the settings.
- Sliders - controls output setpoint; see S826_DacRead, S826_DacDataWrite
- Value - shows output setpoint in Volts
- Range - controls output range; see S826_DacRead, S826_DacRangeWrite
- Calibration Constants
- For factory use only; do not click Write as it may corrupt the board's calibration!
ADC tab
- Slot info (left control group)
- Slot enable checkbox - adds slot to slotlist; see
- Chan - analog input channel
- Range - analog input range
- Settle - settling time in microseconds
- Data - measured sample data
- in Volts - display data in Volts (vs. binary)
- Burst - burst number (red indicates sample buffer overflow)
- Timestamp - time when input was sampled
- General (right control group)
- ADC Enable - Enable A/D conversions
- Raw Data - Display uncorrected (vs. cal-corrected) data
- External Trigger
- Enable - Trigger bursts from signal (vs. free-running back-to-back bursts)
- Source - Trigger signal source (when Enable checked)
- Invert - Invert trigger signal (when Enable checked)
- Default Settling Time -
- Sample Averaging - Number of samples to average for each displayed Data value
- Calibration Constants
- For factory use only; do not click Write as it may corrupt the board's calibration!