Attribute VB_Name = "Public_Vars" Public UnitIP(16, 3) ' capture up to 16 IPs per Netfinder? Public UnitIPStatus(16) ' the Netfinder status (3=locked, etc.) Public EthernetConnected As Boolean Public NetfinderActive As Boolean 'Public Scope(2048) As Byte ' make this a structure, with scope info? Public Scope(2048) As Integer ' handle 12-bit scope data Public Form4_loaded As Boolean Public TPEA As Single, TFLA As Single, CLCK As Integer Public TimePowered As Long ' number of seconds powered, from Netfinder packet Public RepFileNumber As Integer, BaseFilename As String ' for repetitive file save Public RunningDriftCorrection As Single Public Type Packet_In PID1 As Byte PID2 As Byte LEN As Integer ' signed, but data payload always less than 32768 STATUS As Byte DATA(32768) As Byte End Type Public Type Packet_Out PID1 As Byte PID2 As Byte LEN As Integer ' signed, but data payload always less than 32768 EXPECTEDRESPONSE As Byte DATA(514) As Byte End Type Public Type Stat RAW(64) As Byte SN As Long FAST_COUNT As Single ' LONG is signed :( SLOW_COUNT As Single FP As Byte FW As Byte BUILD As Byte Acc_Time As Single HV As Single DET_TEMP As Single DP5_TEMP As Single PX4 As Boolean AFAST_LOCKED As Boolean MCA_EN As Boolean PRESET_COUNT_REACHED As Boolean PRESET_REALTIME_REACHED As Boolean SUPPLIES_ON As Boolean SCOPE_DR As Boolean DP5_CONFIGURED As Boolean GP_COUNTER As Single AOFFSET_LOCKED As Boolean MCS_DONE As Boolean RAM_TEST_RUN As Boolean RAM_TEST_ERROR As Boolean DCAL As Single PZCORR As Byte ' or single? UC_TEMP_OFFSET As Byte AN_IN As Single VREF_IN As Single PC5_SN As Long PC5_PRESENT As Boolean PC5_HV_POL As Boolean PC5_8_5V As Boolean LIVETIME As Single REALTIME As Single PS_55P_GOOD As Boolean PS_55M_GOOD As Boolean PS_12_GOOD As Boolean PS_25_GOOD As Boolean PS_33_GOOD As Boolean PS_INP_GOOD As Boolean BOOT_FLAG_LSB As Byte BOOT_FLAG_MSB As Byte BOOT_HV As Single TEC_V As Single BOOT_INPOFFSET As Single ' or long? ADC_GAIN_CAL As Single ADC_OFFSET_CAL As Byte SPECTRUM_OFFSET As Long ' or single? DEVICE_ID As Byte ' 0=DP5, 1=PX5, 2=DP5G REBOOT_FLAG As Boolean ' FW6.05 and later PX5_options As Byte ' 1=HPGe HVPS HPGe_HV_INH As Boolean HPGe_HV_INH_POL As Boolean End Type Public Type Stat_MNX RAW(64) As Byte SN As Long FW As Byte BUILD As Byte PWR_IN As Single PWR_XRAY As Single HV_MON As Single HV_MON_RAW As Single I_MON As Single I_MON_RAW As Single LAMP_I As Single TEMP As Single HV_EN As Boolean PWR_XRAY_FLAG As Boolean INTERLOCK_STATE As Byte LAST_FAULT As Byte SPEAKER_EN As Boolean DISABLE_FAULT_CHECKS As Boolean DISABLE_LIMIT_CHECKS As Boolean WARMUP_STEP As Byte WARMUP_TIME As Integer RUNTIME As Long ULTRAMINI_PRESENT As Boolean End Type Public Type Spec DATA() As Long ' this keeps total of static data under 64K VB limit CHANNELS As Integer End Type Public PIN As Packet_In Public POUT As Packet_Out Public STATUS As Stat Public SPECTRUM As Spec Public STATUS_MNX As Stat_MNX ' 64 byte status packet for Mini-X