Constants for array declarations

EPMA Probe

 

Installation > Configuration Files

Constants for array declarations

Some configuration file parameter allowable ranges are defined using the following constant declarations.

 

' New integrated intensity background fit parameter (on each side of scan)

Global Const MAX_INTEGRATED_BGD_FIT% = 50

Global Const MAX_ENERGY_ARRAY_SIZE% = 10

Global Const MAX_THROUGHPUT_ARRAY_SIZE% = 20

 

' Based on Cameca SX100 set times

Global Const KILOVOLT_SET_TIME! = 6#

Global Const BEAMCURRENT_SET_TIME_CAMECA! = 10#

Global Const BEAMCURRENT_SET_TIME_JEOL! = 12#

Global Const BEAMSIZE_SET_TIME! = 2#

Global Const HYSTERESIS_SET_TIME! = 12#

Global Const COLUMNCONDITION_SET_TIME! = 25#

Global Const BEAMMODE_SET_TIME! = 1#

 

Global Const PENEPMA_MATERIAL_TIME# = 4#         ' in seconds to init Penepma for demo EDS (running material.exe, per compositional element)

Global Const PENEPMA_STARTUP_TIME# = 15#         ' in seconds to init Penepma for demo EDS (starting penepma.exe)

Global Const PENEPMA_WDS_SYNTHESIS_TIME# = 20#   ' in seconds for demo WDS spectrum synthesis (per analyzed element)

Global Const BOUNDARYNUMBEROFPOINTS& = 100       ' number of boaundary points for cluster digitize

 

' Special folders for system

Global Const SpecialFolder_CommonAppData = &H23  ' for all Windows users on this computer [Windows 2000 or later]

Global Const SpecialFolder_AppData = &H1A        ' for the current Windows user (roaming), on any computer on the network [Windows 98 or later]

Global Const SpecialFolder_LocalAppData = &H1C   ' for the current Windows user (non roaming), on this computer only [Windows 2000 or later]

Global Const SpecialFolder_Documents = &H5       ' the Documents folder for the current Windows user

 

' VB trappable errors

Global Const VB_OutOfMemory& = 7

Global Const VB_FileNotFound& = 53

Global Const VB_FileAlreadyOpen& = 55

Global Const VB_UnrecognizedDatabaseFormat& = 3343

 

'Global Const SW_HIDE& = 0

Global Const SW_SHOWNORMAL& = 1

'Global Const SW_SHOWMINIMIZED& = 2

'Global Const SW_SHOWMAXIMIZED& = 3

'Global Const SW_SHOWNOACTIVATE& = 4

'Global Const SW_SHOW& = 5

'Global Const SW_MINIMIZE& = 6

'Global Const SW_SHOWMINNOACTIVE& = 7

'Global Const SW_SHOWNA& = 8

'Global Const SW_RESTORE& = 9

'Global Const SW_SHOWDEFAULT& = 10

 

' New constants for non-traditional emission lines

Global Const MAXRAY_OLD% = 6            ' maximum xray symbols (ka,kb,la,lb,ma,mb)

Global Const MAXRAY% = 13               ' maximum xray symbols (ka,kb,la,lb,ma,mb,ln,lg,lv,ll,mg,mz," ") including blank for non-analyzed

 

' Constants for array declarations

Global Const MAXINTERFACE% = 5          ' maximum number of instrument interfaces (0 to MAXINTERFACE%)

Global Const MAXINTERFACE_EDS% = 6      ' maximum number of EDS spectra interfaces (0 to MAXINTERFACE_EDS)

Global Const MAXINTERFACE_IMAGE% = 10   ' maximum number of imaging interfaces (0 to MAXINTERFACE_IMAGE)

Global Const MAXINTERFACE_CL% = 4       ' maximum number of CL spectra interfaces (0 to MAXINTERFACE_CL)

 

Global Const MAXCHAN% = 72              ' maximum elements per sample

Global Const MAXCHAN1% = MAXCHAN% + 1   ' maximum elements plus 1 (stoichiometric oxygen)

Global Const MAXSTD% = 132              ' maximum standards per run (changed from 128 to 132 08-23-2017)

Global Const MAXROW% = 500              ' maximum lines per sample (changed to 500 rows 08-11-2012)

Global Const MAXVOLATILE% = 400         ' maximum volatile/alternating intensities per chan per line per sample

Global Const MAXEDG% = 9                ' maximum emission edges

Global Const MAXELM% = 100              ' maximum elements (do not change due to data restrictions in AbsorbGetMAC)

Global Const MAXEMP% = 20               ' maximum empirical MAC/APFs

Global Const MAXSAMPLE% = 19999         ' maximum samples per run

Global Const MAXINTF% = 6               ' maximum interferences per element

Global Const MAXINDEX% = 10000          ' maximum standards per standard database   (changed to 10000 as of 2-27-2007)

Global Const MAXMAN% = 112              ' maximum MAN assignments per element   (changed from 36 to 112 08-23-2017)

Global Const MAXSET% = 30               ' maximum sets for drift correction

Global Const MAXCRYSTYPE% = 60          ' maximum crystal types

Global Const MAXCRYS% = 6               ' maximum crystals per spectrometer

 

Global Const MAXCOND% = 64              ' maximum number of analytical or column conditions per sample

 

Global Const MAXSPEC% = 6                       ' maximum spectrometers per run (spectro 0 = EDS)

Global Const MAXAXES% = 3                       ' maximum stage axes (x, y, z)

Global Const MAXMOT% = MAXSPEC% + MAXAXES%      ' maximum motors (spectrometer + stage)

 

Global Const MAXSPECTRA_CL% = 4096      ' maximum number of CL channels

 

Global Const MAXDIM% = 3                ' maximum number of dimensions for matrix transformation

Global Const MAXCOEFF% = 3              ' maximum number of linear fit coefficients

Global Const MAXCOEFF4% = 4             ' maximum number of linear fit coefficients

Global Const MAXCOEFF9% = 9             ' maximum number of fit coefficients

Global Const MAXBITMAP% = 12            ' maximum number of stage bit maps

Global Const MAXLINE& = 99999           ' maximum number of data lines per run

Global Const MAXDET% = 12               ' maximum number of detector parameters

Global Const MAXMULTI% = 12             ' maximum number of points on each side for multi point background acquisition

Global Const MAXCATION% = 100           ' maximum number of formula cations (1 to MAXCATION% - 1) and oxygens (0 to MAXCATION% - 1)

Global Const MAXCI% = 5                 ' maximum number of t-test confidence intervals

Global Const MAXPLOTPOINTS% = 6000      ' maximum number of points in plot graph control

Global Const MAXORDER% = 72             ' maximum number of elements per spectrometer (sample().OrderNumbers)

Global Const MAXEND% = 4                ' maximum number of mineral end members per mineral type

Global Const MAXPHASCAN% = 256          ' maximum number of PHA scan data points (see Cameca MCA PHA code)

Global Const MAXBRAGG% = 9              ' maximum analytical Bragg order

Global Const MAXELEMENTSORTMETHODS% = 3        ' 0 to MAXELEMENTSORTMETHODS% (0 = none)

 

Global Const MAXCORRECTION% = 6          ' maximum number of matrix correction types (0 = phi/rho/z, 1,2,3,4 = alpha fits, 5 = calilbration curve, 6 = fundamental parameters)

Global Const MAXBINARY% = 11             ' maximum binary pairs for alpha factor calculations

Global Const MAXDENSITY# = 30#           ' maximum density (gm/cm3)

Global Const BLANKINGVALUE! = 1.70141E+38   ' Surfer blanking grid value

Global Const MAXPATHLENGTH% = 255        ' maximum file path length

Global Const MINCPSPERNA! = 0.00000000001 ' default minimum bgd count rate for P/B calculations

Global Const SIMULATION_ZERO! = 0.0000000001    ' zero intensity

 

Global Const MAXEMPFAC% = 100            ' maximum empirical alpha factors (from EMPFAC.DAT)

Global Const MAXCALIBRATE% = 5           ' maximum number of elements for multiple peak calibration

Global Const LIF2D! = 4.0267             ' 2d spacing of LIF crystal

 

Global Const SCROLLBARWIDTH% = 325       ' scroll bar width for sizing grid column widths (twips)

Global Const WINDOWBORDERWIDTH% = 175    ' window border width for sizing image width

Global Const FRAMEBORDERWIDTH% = 120     ' window border width for sizing controls

Global Const GRIDCOLUMNWIDTH% = 1100     ' width of a single grid column

 

Global Const PPMPERWTPERCENT# = 10000#   ' PPM per weight percent

Global Const DEFAULTDENSITY! = 5#        ' default density for sample (needs user input)

 

Global Const ANGPERMICRON& = 10000       ' angstroms per micron

Global Const NMPERMICRON& = 1000         ' nano-meters per micron

Global Const UMPERMICRON& = 1            ' micro-meters per micron

Global Const MMPERMICRON# = 0.001        ' milli-meters per micron

Global Const CMPERMICRON# = 0.0001       ' centi-meters per micron

Global Const MPERMICRON# = 0.000001      ' meters per micron

Global Const MICRONSPERCM& = 10000       ' microns per centimeter

Global Const MICRONSPERMM& = 1000        ' microns per millimeter

 

Global Const ANGPERNM& = 10              ' angstroms per nanometer

Global Const NMPERANG# = 0.1             ' nanometers per angstrom

 

Global Const CMPERANGSTROM# = 0.00000001 ' centi-meters per angstrom

 

Global Const MICROINCHESPERMICRON# = 39.37007874     ' micro-inches per micron

Global Const MILLIINCHESPERMICRON# = 0.03937007874   ' milli-inches per micron

Global Const INCHESPERMICRON# = 0.00003937           ' inches per micron

 

Global Const NAPA# = 1000000000#         ' nano-amps per amp

Global Const APNA# = 0.000000001         ' amps per nano-amps

Global Const PAPA# = 1000000000000#      ' pico-amps per amp

Global Const PAPERNA# = 1000#            ' pico-amps per nano-amp

Global Const NAPERMA# = 1000#            ' nano-amps per milli-amp

 

Global Const ANGKEV! = 12.39854          ' angstrom per KeV (and visa versa)

Global Const ANGEV! = 12398.54           ' angstrom per eV (and visa versa)

Global Const EVPERKEV# = 1000#           ' eV per keV

Global Const MILLIVOLTPERVOLT# = 1000#   ' millivolt per volt

 

Global Const MSPS! = 1000000#            ' micro-secs per second

Global Const TENTHMSECPERSEC# = 10000#   ' 1/10th millsecs per second

Global Const MSECPERSEC# = 1000#         ' milli-seconds per second

Global Const SECPERMIN# = 60#            ' seconds per min

Global Const SECPERHOUR# = 3600#         ' seconds per hour

Global Const SECPERDAY# = 86400#         ' seconds per day

Global Const HOURPERDAY# = 24#           ' hours per day

 

Global Const CPSPERKCPS# = 1000#         ' cps per kcps

 

Global Const PASCALSPERTORR# = 131.578   ' Pascals per Torr conversion

Global Const PASCALSPERMBAR# = 100#      ' Pascals per mBar conversion

 

Global Const MAXCOUNT& = 100000000       ' default maximum counts for statistics based counting

Global Const MAXMINIMUM! = 10000000000#  ' (reversed) for calculating minimums

Global Const MAXMAXIMUM! = -10000000000# ' (reversed) for calculating maximums

Global Const MAXMINIMUM2& = 2147483647   ' (reversed) for calculating minimums

Global Const MAXMAXIMUM2& = -2147483648# ' (reversed) for calculating maximums

Global Const MAXMINIMUM3% = 32767        ' (reversed) for calculating minimums

Global Const MAXMAXIMUM3% = -32768       ' (reversed) for calculating maximums

 

Global Const MAXCRYSTAL2D_NOT_LDE! = 30# ' maximum 2d for non LDE crystal

Global Const MAXCRYSTAL2D_LARGE_LDE! = 100# ' maximum 2d for non large LDE crystal

Global Const ANALYTICALMAGTHRESHOLD# = 50000#    ' minimum mag for analytical warning

 

Global Const PI! = 3.14159               ' close enough!

Global Const PID# = 3.141592653          ' closer!

Global Const PIDD# = 3.14159265358979    ' even closer!

 

Global Const NATURALE# = 2.718281828     ' natural log constant

Global Const MAXLOGEXPD! = 709.6         ' maximum exponent for double precision natural log (e^MAXLOGEXPD!)

Global Const MAXLOGEXPS! = 88.721        ' maximum exponent for single precision natural log (e^MAXLOGEXPS!)

 

Global Const MININTEGER% = -32768        ' minimum integer value

Global Const MAXINTEGER% = 32767         ' maximum integer value

Global Const MINLONG& = -2147483648#     ' minimum long

Global Const MAXLONG& = 2147483647       ' maximum long

Global Const MINSINGLE! = -3.402823E+38  ' minimum single precision

Global Const MAXSINGLE! = 3.402823E+38   ' maximum single precision

Global Const MINDOUBLE# = -1.79769E+308  ' minimum double precision

Global Const MAXDOUBLE# = 1.79769E+308   ' maximum double precision

 

Global Const MAXOFFBGDTYPES% = 8         ' maximum off-peak background correction types (0 to 8, 0 = default linear)

Global Const MAXMINTYPES% = 6            ' maximum mineral end-member types (including zero for none)

Global Const MAXZAF% = 10                ' maximum number of ZAF correction options

Global Const MAXZAFCOR% = 8              ' maximum number of stored ZAF corrections (analysis structure)

Global Const MAXLIST% = 4999             ' maximum number of xray database listbox items

Global Const MAXMACTYPE% = 7             ' maximum number of mass absorption files

Global Const MAXRELDEV% = 9999           ' maxmimum size for printout of % relative standard deviations

Global Const MAXGRIDROWS% = 4096         ' maximum number of rows allowed in grid control

 

Global Const ROWLAND_JEOL# = 140#        ' default JEOL focal circle

Global Const ROWLAND_CAMECA# = 160#      ' default Cameca focal circle

 

Global Const MAXEDS% = 48                ' maximum number of eds spectrum elements

Global Const MAXSPECTRA% = 8192          ' maximum number of eds spectrum channels

Global Const MAXSTROBE% = 128            ' maximum number of strobes (resolution calibrations)

 

Global Const BIT24& = 16777215           ' maximum 24 bit depth 0-16777215

Global Const BIT23& = 8388607            ' maximum 23 bit depth 0-8388607

Global Const BIT16& = 65535              ' maximum 16 bit depth 0-65535

Global Const BIT15& = 32767              ' maximum 15 bit depth 0-32767

Global Const BIT14& = 16383              ' maximum 14 bit depth 0-16383

Global Const BIT13& = 8191               ' maximum 13 bit depth 0-8191

Global Const BIT12& = 4095               ' maximum 12 bit depth 0-4095

Global Const BIT11& = 2047               ' maximum 11 bit depth 0-2047

Global Const BIT10& = 1023               ' maximum 10 bit depth 0-1023

Global Const BIT8& = 255                 ' maximum 8 bit color palette 0-255

Global Const BIT7& = 127                 ' maximum 7 bit depth 0-127

Global Const BIT6& = 63                  ' maximum 6 bit depth 0-63

Global Const BIT5& = 31                  ' maximum 5 bit depth 0-31

Global Const BIT4& = 15                  ' maximum 4 bit depth 0-15

Global Const BIT3& = 7                   ' maximum 3 bit depth 0-7

Global Const BIT2& = 3                   ' maximum 2 bit depth 0-3

Global Const BIT1& = 1                   ' maximum 1 bit depth 0-1

 

Global Const SIZE_65536_BYTES& = 65536   ' 65536 byte constant

Global Const SIZE_32768_BYTES& = 32768   ' 32768 byte constant

Global Const SIZE_16384_BYTES& = 16384   ' 16384 byte constant

Global Const SIZE_8192_BYTES& = 8192     ' 8192 byte constant

Global Const SIZE_4096_BYTES& = 4096     ' 4096 byte constant

Global Const SIZE_2048_BYTES& = 2048     ' 2048 byte constant

Global Const SIZE_1024_BYTES& = 1024     ' 1024 byte constant

Global Const SIZE_512_BYTES& = 512       ' 512 byte constant

Global Const SIZE_256_BYTES& = 256       ' 256 byte constant

Global Const SIZE_128_BYTES& = 128       ' 128 byte constant

Global Const SIZE_64_BYTES& = 64         ' 64 byte constant

Global Const SIZE_32_BYTES& = 32         ' 32 byte constant

Global Const SIZE_16_BYTES& = 16         ' 16 byte constant

Global Const SIZE_8_BYTES& = 8           ' 8 byte constant

Global Const SIZE_4_BYTES& = 4           ' 4 byte constant

Global Const SIZE_2_BYTES& = 2           ' 2 byte constant

 

Global Const IMAGESIZE128& = 128         ' image size 128 x 128 (96 @ 4/3)

Global Const IMAGESIZE256& = 256         ' image size 256 x 256 (192 @ 4/3)

Global Const IMAGESIZE512& = 512         ' image size 512 x 512 (384 @ 4/3)

Global Const IMAGESIZE1024& = 1024       ' image size 1024 x 1024 (768 @ 4/3)

Global Const IMAGESIZE2048& = 2048       ' image size 2048 x 2048 (1536 @ 4/3)

 

Global Const INT_ZERO% = 0               ' for parameter passing

Global Const INT_ONE% = 1                ' for parameter passing

Global Const INT_TWO% = 2                ' for parameter passing

 

Global Const MAXMODELS% = 6              ' maxmimum number of PTC geometric models

Global Const MAXDIAMS% = 6               ' maxmimum number of PTC particle diameters

Global Const MAXMONITOR% = 4             ' maximum number of Monitor app lists

Global Const MAXMONITORLIST% = 13        ' maximum number of Monitor app list items

Global Const MAXSTDIMAGE% = 5            ' maximum number of standard images displayed per standard number

 

Global Const MAXAUTOFOCUSPOINTS& = 1010  ' maximum autofocus data points (1010 + 14 = 1024 longs)

Global Const MAXAUTOFOCUSSCANS% = 3      ' maximum autofocus scans (fine, coarse, 2nd fine)

Global Const MAXIMAGES% = 2000           ' maximum number of sample images in run

Global Const MAXIMAGEIX% = 2048          ' maximum number of x pixels (SX100 = 2048, all others 1024)

Global Const MAXIMAGEIY% = 2048          ' maximum number of y pixles (SX100 = 2048, all others 1024)

Global Const MAXROMSCAN% = 1000          ' maximum points per ROM scan

Global Const MAXIMAGESIZES& = 4          ' dimensioned 0 to MAXIMAGESIZES&

Global Const MAXPALETTE% = 4             ' maximum number of color palettes

 

Global Const MINTAKEOFF! = 10#           ' minimum takeoff in degrees

Global Const MINKILOVOLTS! = 1#          ' minimum beam size in kilovolts

Global Const MINBEAMCURRENT! = 0.01      ' minimum beam current in nA

Global Const MINBEAMSIZE! = 0#           ' minimum beam size in microns

 

Global Const MAXTAKEOFF! = 75            ' maximum takeoff in degrees

Global Const MAXKILOVOLTS! = 100#        ' maximum beam size in kilovolts

Global Const MAXBEAMCURRENT! = 2000#     ' maximum beam current in nA

Global Const MAXBEAMSIZE! = 500#         ' maximum beam size in microns

 

Global Const MINREPLICATES% = 1          ' minimum number of replicate samples

Global Const MAXREPLICATES% = 500        ' maximum number of replicates samples

 

Global Const MAXBEAMCALIBRATIONS% = 32   ' maximum number of beam scan calibration array members

 

' Integrated intensity constants

Global Const MININTEGRATEDINTENSITYINITIALSTEP! = 800#

Global Const MAXINTEGRATEDINTENSITYINITIALSTEP! = 10#

Global Const MININTEGRATEDINTENSITYMINIMUMSTEP! = 10000#

Global Const MAXINTEGRATEDINTENSITYMINIMUMSTEP! = 20#

Global Const INTEGRATEDINTENSITYINITIALSTEP! = 100#

Global Const INTEGRATEDINTENSITYMINIMUMSTEP! = 400#

 

Global Const SCALERSDATLINESNEW% = 90               ' number of lines in new SCALERS.DAT file

 

Global Const MAXSCANS& = 99999                      ' maximum number of PHA, bias, gain or peaking scans

Global Const MAXAPERTURES% = 4                      ' maximum number of apertures in system

Global Const SMALLAMOUNTFRACTION_HALF! = 0.0005     ' small amount fraction for motion limits (times 0.5)

Global Const SMALLAMOUNTFRACTION! = 0.001           ' small amount fraction for motion limits

Global Const SMALLAMOUNTFRACTIONx5! = 0.005         ' small amount fraction for motion limits (times 5)

Global Const SMALLAMOUNTFRACTIONx10! = 0.01         ' small amount fraction for motion limits (times 10)

Global Const MAXROMPEAKTYPES% = 6                   ' maximum number of ROM scan peaking types

Global Const DEFAULTVOLATILEINTERVALS% = 5          ' default number of volatile intervals

 

Global Const JEOL_SPECTRO_JOG_SIZE# = 0.6           ' additional room for JEOL spectro low limit jog (in mm)

Global Const JEOL_IMAGE_SHIFT_FACTOR! = 163.8       ' image_shift = um_shift * 163.8

 

Global Const MAXKLMORDER% = 20           ' maximum number of KLM higher order lines to display

Global Const MAXKLMORDERCHAR% = 5        ' maximum number of KLM higher order Roman characters to display

Global Const MAXSAMPLETYPES% = 3         ' maximumn types of samples (standard, unknown, wavescan)

Global Const MAXFORBIDDEN% = 20          ' maximum number of forbidden elements

 

Global Const NOT_ANALYZED_VALUE_SINGLE! = 0.00000001       ' 10^-8

'Global Const NOT_ANALYZED_VALUE_DOUBLE# = 0.00000001       ' 10^-8     (do not utilize as it causes a problem for Pro Essentials with .NullDataValueX property)

 

Global Const MAX_EXCEL_2003_COLS% = 256  ' maximum number of columns supported by Excel 2003 (version 11)

 

Global Const LOTSOFGRIDPOINTS% = 1000    ' lots of polygon points (hide FormAUTOMATE)

Global Const TOOMANYGRIDSTEPS% = 2000    ' too many grid steps

Global Const MAXTITLELENGTH% = 80        ' maximum graph title length

Global Const MAX_PATH% = 259             ' maximum file and path length for Dir$ command

 

Global Const FONT_REGULAR% = 0           ' regular format

Global Const FONT_BOLD% = 1              ' bold

Global Const FONT_ITALIC% = 2            ' italic

Global Const FONT_UNDERLINE% = 4         ' underline

Global Const FONT_STRIKETHRU% = 8        ' strikethru