⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 declare.bas

📁 AD5933评估板下位机程序(keil C)和上位机程序(VB)
💻 BAS
字号:
Attribute VB_Name = "Declare"
Option Explicit
'---------------------------------------------------------------------------------
'This is where the global variables are defined.These variables need to be visible to the entire
'project as the global parameters are used in multiple locations throughout the software.
'---------------------------------------------------------------------------------

'Global sweep parameters
Global StartFrequency As Double
Global midfrequency As Double
Global FrequencyIncrements As Double
Global NumberIncrements As Long
Global num_ave As Double
Global SettlingTime As Long
'Global control variables
Global Temperature As Double
Global Gain As Long
Global OutputVoltage As Long
Global GainFactor As Double

'Global stripx variables: stripx is the activx component (a licence is required for use)
'that this software uses to plot the impedance and phase vs frequency.

Global MinFrequencyPlot As Double
Global MaxFrequencyPlot As Double
Global DDSRefClockFrequency As Double
Global RealDataArray(512) As Double
Global ImagineryDataArray(512) As Double
Global code(512) As Double
Global MagnitudeArray(512) As Double
Global PhaseArray(512) As Double                    'final phase data
Global calibration_phase_mid_point As Double        'single point calibratipon phase
Global calibration_phase_multi_point(512) As Double 'Multi point calibration phase
Global calibration_GainFactors(512) As Double       'Multi point Gain factors
Global calibration_AveGainFactor As Double          'Average multipoint gain factor
Global conductivityArray(512) As Double             'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Global impedancechoice As Integer                   'used to track the calibration impedance topology.resistor,capacitor, R+C,R||c
Global systemclock As Integer                       'used to track the current device clock ing mechanism i.e either internal oscillator (AD5933 only) of external clock
Global IndexArray As Integer                        ' used as a counter variable in the sweep routine
Global IndexImpedance As Integer
Global IndexPhase As Integer
Global MinPhase As Double
Global MaxPhase As Double

Global GlobalDataArray(512) As Double  'generic data array
Global CalibratedImpedance1 As Double
Global CalibratedImpedance2 As Double
Global temp As Double
'-------------- Download data global variable-------------------------
Global GlobalDataArray1(512) As Double 'real data contained in this array
Global GlobalDataArray2(512) As Double 'imag data contained in this array
Global GlobalDataArray3(512) As Double 'impedance data contained in this array
Global GlobalDataArray4(512) As Double 'phase data contained in this array
Global GlobalDataArray5(512) As Double 'Code =sqrt r^2+i^2 data contained in this array
Global FrequencyPoints(512) As Double ' frequency data contained in this array
Global GlobaldataArray6(512) As Double


 


Sub Main()

'Download the firmware upon s/w start up.....
Do Until DownLoadFirmware >= 0
        If vbRetry <> MsgBox("Firmware failed to download-Check USB connections", _
                            vbExclamation + vbRetryCancel, _
                            "Error") _
        Then
            End
        End If
    Loop
' initialize the front panel
Form1.Show
'Load Form1

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -