Home

MSA 32 Bit Dynamic Link Libraries User Manual

image

Contents

1. 0 005 for MSA200 300 0 001 0 002 0 004 0 008 default for MSA 1000 start_delay 0 0 start delay in mikrosec for MSA 1000 O default 1e6 active_edge 0 active edge of the input signal for MSA 1000 0 falling default 1 rising msa_module1 MSA module 1 hardware parameters base_adr 0x280 base I O address for ISA module 0 Ox3FC active 0 module not active cannot be used msa_module2 MSA module 2 hardware parameters base_adr 0x2a0 sbase I O address for ISA module 0 Ox3FC active 0 module not active cannot be used msa_module3 MSA module 3 hardware parameters base_adr 0x2c0 sbase I O address for ISA module 0 0x3FC active 0 module not active cannot be used After an MSA_ init call we recommend to call the MSA_test_if_active function and to check which MSA modules are active Only active modules can be operated further therefore at least one module must be active It is reasonable also to check the initialisation status MSA_ get_init_status of each used module The initialisation status can show the reason of a wrong initialisation see msa_def h for possible values In case of hardware test errors values INIT_WRONG_COUNTER or INIT_WRONG_DACS the function MSA_get_test_error_string delivers additional information Additional information about MSA modules can be obtained by calling MSA_get_module_info function The function fills MSAModInfo structure see msa_
2. MSA_ init MSA_test_if_active MSA_get_init_status MSA_get_mode MSA_set_mode MSA_get_version MSA_get_module_info Setup functions MSA_get_parameter MSA_set_parameter MSA_get_parameters MSA_set_parameters MSA_get_eeprom_data MSA_write_eeprom_data MSA_get_adjust_parameters MSA_set_adjust_parameters Status functions MSA_test_if_busy MSA_read_ status MSA_get_current_sweep Measurement control functions MSA_start_measure MSA_stop_measure MSA memory transfer functions MSA_fill_memory MSA_read_data Test functions MSA_test_id MSA_get_test_error_string Functions listed above must be called with C calling convention which is default for C and C programs Identical set of functions is available for environments like Visual Basic which requires _stdcall calling convention Names of these functions have std letters after MSA for example MSAstd_test_id it is _stdcall version of MSA_test_id Description and behaviour of these functions are identical to the functions from the first default set the only difference is calling convention Application Guide Initialisation of the MSA Measurement Parameters Before a measurement is started the measurement parameter values must be written into the internal structures of the DLL functions not directly visible from the user program and sent to the control registers of the MSA module This is accomplished by the function MSA_ init The MSA
3. Single parameter values can be transferred to or from the DLL and module level by the functions MSA_set_parameter and MSA_get_parameter To identify the desired parameter the parameter identification par_id is used The parameter identification keywords are defined in msa_def h Memory Read Write Functions Reading the memory of the MSA module is accomplished by the functions MSA_read_data To fill the memory with a constant value or to clear the memory the function MSA_fill_memory is available Standard Measurements The most important measurement functions are listed below The MSA_test_if_busy function is used to control the measurement loop It sets a busy variable according to the current state of the measurement The state of all active modules on which measurement is enabled is taken into account in the return value 0 all active MSA modules have finished the measurement 1 the measurement is still running at least in one MSA module no modules are waiting for an external trigger 2 at least one module is waiting for the external trigger of the first sweep 3 at least one module is waiting for the external trigger of the current sweep The MSA_read_status function returns the current status of a particular MSA module The most important status bits delivered by the function are listed below see also msa_def h For MSA 200 300 modules ARMED 0x8000 module is armed ITRGED 0x4000 module was initially triggered MEASU
4. VO base address set to initialisation result code most of the library functions are executed only when module is active not 0 measurement enabled disabled 1 0 test EEPROM checksum on start up or not external trigger condition none 0 active low 1 active high 2 input threshold level trigger threshold level collection time of 1 point in mikrosec 0 005 default 40 96 must be a multiple of 0 time_resolution no of points to collect 64 524288 MSA 200 300 131072 MSA 1000 default 1000 no of accumulation sweeps 1 default 65535 MSA 200 300 Oxffffffff MS A 1000 input holdoff 0 5 5 0 ns only MSA 1000 trigger holdoff 0 5 5 O ns only MSA 1000 time resolution of point in mikrosec 0 005 for MSA200 300 0 001 0 002 0 004 0 008 default for MSA 1000 start delay after trigger in mikrosec for MSA 1000 O default 1e6 slot no for PCI module 0 3 or 1 for ISA module active edge of the input signal for MSA 1000 0 falling default 1 rising 15 Input parameters mod_no module number 0 3 data pointer to parameters structure type MSAdata see msa_def h Return value 0 no errors lt 0 error code see msa_def h Description The procedure sends all parameters from the MSAdata structure to the internal DLL structures and to the control registers of the MSA module mod_no The new parameter values are recalculated according to the parameter limits and hardware restric
5. float pass Pointer to Value Numeric 4 byte single For structures defined in include file xxx_def h user should build in LabView a proper cluster The cluster must contain the same fields in the same order as the C structure If a pointer to a structure is a function parameter you connect to the node the proper cluster and define parameter type as Adapt to Type with data format Handles by Value Connecting clusters with the contents which do not exactly correspond to the C structure fields can cause the program crash Problems appear if the structure and the corresponding cluster contain string fields due to the fact that LabView sends to the DLL handles to LabView string instead of the C string pointers for strings inside the cluster In such case special version of the DLL function must be used which is prepared especially for use in LabView Such functions have _LV letters after XXX for example XXX_LV_get_module_info and if found in xxx_def h file they should be used in Call Library function node instead of the standard function Another solution is to write extra C code to transform these data types create lsb file and use it in Code Interface node CIN instead of Call Library Experienced LabView and C users can prepare such CINs for every external code 8 Description of the MSA DLL Functions Input parameters ini file pointer to a string containing the name of the init
6. 0 5 5 0 ns default 0 5 time resolution of point in mikrosec 0 005 for MSA200 300 0 001 0 002 0 004 0 008 default for MSA 1000 start delay in mikrosec for MSA 1000 O default 1e6 active edge of the input signal for MSA 1000 0 falling default 1 rising MSA module 1 hardware parameters sbase I O address for ISA module 0 Ox3FC module not active cannot be used MSA module 2 hardware parameters sbase I O address for ISA module 0 Ox3FC module not active cannot be used MSA module 3 hardware parameters base I O address for ISA module 0 0x3FC module not active cannot be used The module will be initialised but only when it is not in use locked by other application If for some reasons the module which was locked must be initialised it can be done using the function MSA_set_mode with the parameter force_use 1 After successful initialisation the module is locked to prevent that other application can access it Locking modules does not apply to MSA 1000 module After an MSA_init call we recommend to call the MSA_test_if_active function to check which MSA modules are active At least one module must be active and only active modules can be operated further It is recommended but not required to check also the initialisation status by MSA_get_init_status of each used module In case of a wrong initialisation the initialisation status shows the reason of
7. DLL Functions can control up to four MSA modules either on ISA bus MSA 200 or on PCI bus MSA 300 MSA 1000 The MSA_ init function reads the parameter values from a specified initialisation file checks the base I O addresses for all active modules to avoid hardware conflicts checks and recalculates the parameters depending on the hardware restrictions and the adjust parameters from the EEPROM on each active MSA module sends the parameter values to the MSA control registers on each active MSA module performs a hardware test of each active MSA module The initialisation file is an ASCH file with a structure shown in the table below Each module has its own section in the initialisation file msa_module 0 3 Only modules which have an entry active 1 are initialised We recommend either to use the file MSA200 INI or to start with MSA200 INI and to introduce the desired changes MSA200 initialisation file MSA parameters have to be included in ini file only when parameter value is different from default module section msa_module0 3 is required for each existing MSA module msa_base simulation 0 0 hardware mode default 3 msa_module0 base_adr 0x380 pci_card_no 0 active 1 enable_meas 1 trigger 0 inp_threshold 0 1 trig_threshold 0 1 time_per_point 0 005 points_no 1000 sweeps 1 inp_holdoff 0 5 trig_holdoff 0 5 time_resolution 0 005 start_delay 0 0 ac
8. if in_use entry 0 the proper module is unlocked and can be used further When one of the simulation modes is requested for each of 4 possible modules 13 if in_use entry 1 the proper module is initialised if it wasn t with the initial parameters set from ini_file if in_use entry 0 the proper module is unlocked and can be used further Errors during the module initialisation can cause that the module is excluded from use Use the function MSA_get_init_status and or MSA_get_module_info to check which modules are correctly initialised and can be use further Use the function MSA_get_mode to check which mode is actually set Possible mode values are defined in the msa_def h file Input parameters mod_no module number 0 3 version pointer to the version variable Return value 0 no errors lt 0 error code see msa_def h Description The procedure loads the version variable with the FPGA version of the module specified by mod_no This is low a level procedure not needed normally Input parameters mod_no module number 0 3 mod_info pointer to the result structure Return value 0 no errors lt 0 error code see msa_def h Description After calling the MSA_init function see above the MSAModInfo internal structures for all 4 modules are filled This function transfers the contents of the internal structure of the DLL into a structure of the type MSAModInfo see msa_def
9. strongly discourage to use modified adjust parameters because the module function can be seriously corrupted by wrong adjust values The structure MSA_Adjust_Para is defined in the file msa_def h 18 Input parameters busy pointer to result value Return value 0 no errors lt 0 error code see msa_def h MSA _test_if_busy sets a busy variable according to the current state of the measurement The function is used to control the measurement loop after starting the measurement Possible values of busy are listed below 0 all active MSA modules finished the measurement 1 the measurement is still running at least in one MSA module no modules are waiting for the trigger 2 at least one module is waiting for the trigger for the first sweep 3 at least one module is waiting for the trigger for the current sweep Input parameters mod_no module number 0 3 status pointer to result value Return value 0 no errors lt 0 error code see msa_def h The MSA_read_status function returns the current status of the MSA module defined by mod_no The most important status bits delivered by the function are listed below see also msa_def h For MSA 200 300 modules ARMED 0x8000 module is armed ITRGED 0x4000 module was initially triggered MEASURE 0x2000 module collects data Armed and Triggered EOFM 0x1000 end of measurement OVFL 0x800 overflow of one or more accumulators TRGED 0x400 current sweep triggere
10. Becker amp Hickl GmbH Nahmitzer Damm 12277 Berlin Tel 49 30 787 56 32 Fax 49 30 7875734 email info becker hickl de http www becker hickl de msadll32 doc MSA 32 Bit Dynamic Link Libraries User Manual Version 2 3 August 2005 Introduction The MSA 32 bits Dynamic Link Library contains all functions to control the MSA modules The functions work under Windows 95 and Windows NT The program which calls the DLLs must be compiled with the compiler option Structure Alignment set to 1 Byte The distribution disks contain the following files MSADLL32 DLL MSADLL32 LIB MSA_DEF H MSA200 INI MSADLL32 DOC USE_MSA XXX dynamic link library main file import library file for Microsoft Visual C C Borland C C Watcom C C and Symantec C C compilers Include file containing Types definitions Functions Prototypes and Pre processor statements MSA DLL initialisation file This description file Set of files to compile and run a simple example of using MSA DLL functions Source file of the example is the file use_msa c The example was originally prepared under Borland C C v 4 52 For use in other compilers choose the correct import library file to link There is no special installation procedure required Simply execute the setup program from the Ist distribution diskette and follow its instructions MSA DLL Functions list The following functions are implemented in the MSA DLL Initialisation functions
11. RE 0x2000 module collects data Armed and Triggered EOFM 0x1000 end of measurement OVFL 0x800 overflow of one or more accumulators TRGED 0x400 current sweep triggered For MSA 1000 modules ARMEDI 0x40 module is armed ITRGED1 Ox8 module was initially triggered MEASURE 0x1 module collects data Armed and Triggered EOFM1 0x2 end of measurement OVFL1 0x20 overflow of one or more accumulators TRGED1 0x10 current sweep triggered 6 MSA_start_measure starts the measurement in all active MSA modules The measurement is controlled by the parameters loaded by the MSA init MSA_set_parameters or MSA _set_parameter functions The recording procedure sweeps through the specified number of collection time bins points_no Subsequent sweeps are accumulated until the specified number of sweeps are completed To check whether a measurement is finished the MSA_test_if _busy function is used A running measurement can be stopped by the MSA_stop_measure function In the figure below block diagram of a simple measurement routine is given MSA_init change module parameters if required enable measurement ENABLE_MEAS 1 set POINTS NO set SWEEPS MSA _fill_memory MSA _start_measure 0 MSA _test_if_busy 0 1 2 3 finished still running wait for initial trigger wait for current trigger MSA_read_data add to a buffer MSA_read_status check for possible overflow MSA_get_current_sweep Current sweep lt SWEEP
12. S AND overflow Yes No MSA _fill_memory MSA _start_measure 1 Figl Measurement with accumulation up to 65535 sweeps Filling memory MSA_fill_ memory is not required for MSA 1000 done by hardware Error Handling Each MSA DLL function returns an error status Return values gt O indicate error free execution A value lt 0 indicates that an error has occurred The meaning of a particular error code can be found in msa_def h file We recommend to check the return value after each function call Using DLL functions in LabView environment Each DLL function can be called in LabView program by using Call Library function node If you select Configure from the shortcut menu of the node you see a Call Library Function dialog box from which you can specify the library name or path function name calling conventions parameters and return value for the node You should pay special attention to choosing correct parameter types using following conversion rules Type in C programs Type in LabView char signed 8 bit integer byte 18 unsigned char unsigned 8 bit integer unsigned byte U8 short signed 16 bit integer word 116 unsigned short unsigned 16 bit integer unsigned word U16 long int signed 32 bit integer long 132 unsigned long int unsigned 32 bit integer unsigned long U32 float 4 byte single single precision SGL double 8 byte double double precision DBL char C string pointer
13. arameters none Return value current mode of DLL operation Description The procedure returns current mode of DLL operation hardware or simulation Possible mode values are defined in the msa_def h file define MSA_HARD 0 hardware mode define MSA_SIMUL200 20 simulation mode of MSA 200 define MSA_SIMUL300 30 simulation mode of MSA 300 define MSA_SIMUL1000 1000 simulation mode of MSA 1000 Input parameters mode mode of DLL operation force_use force using the module if they are locked in use jn use pointer to the table with information which module must be used Return value 0 no errors lt 0 error code see msa_def h Description The procedure is used to change the mode of the DLL operation between the hardware mode and the simulation mode It is a low level procedure and not intended to normal use It is used to switch the DLL to the simulation mode if hardware errors occur during the initialisation Table in_use should contain entries for all 4 modules 0 means that the module will be unlocked and not used longer 1 means that the module will be initialised and locked When the Hardware Mode is requested for each of 4 possible modules if in_use entry 1 the proper module is locked and initialised if it wasn t with the initial parameters set from ini_file but only when it was not locked not for MSA 1000 by another application or when force_use 1
14. d For MSA 1000 modules ARMEDI 0x40 module is armed ITRGED1 Ox8 module was initially triggered MEASURE 0x1 module collects data Armed and Triggered EOFM1 0x2 end of measurement OVFLI 0x20 overflow of one or more accumulators TRGED1 0x10 current sweep triggered 19 The function is a low level procedure which is normally used only to test whether an overflow occurred during the measurement and to get additional information about the MSA module state To control the measurement the MSA_test_if_busy function is recommended Input parameters mod_no module number 0 3 sweep pointer to result value Return value 0 no errors lt 0 error code see msa_def h The MSA_get_current_sweep function fills sweep with the current value of sweep counter in the MSA module mod_no The function is used to check how many sweeps were already collected during the measurement or when the measurement stops due to overflow Input parameters restart measurement restarted 1 or start from the beginning 0 Return value 0 no errors lt 0 error code see msa_def h The procedure is used to start restart the measurement Before a measurement is started by MSA_start_measure the parameters on all active modules must be set MSA_init or MSA_set_parameter s the same measurement mode must be set for all requested modules the measurement must be enabled in all requested modules parameter ENABLE_MEAS must be set by MSA_
15. def h for definition 11 Input parameters mod_no module number 0 3 Return value 0 module mod_no not active cannot be used 1 module mod_no active Description The procedure returns information whether the module specified by mod_no is active or not A module is set active only if there is the entry active 1 in the respective module section in the ini_file As a result of a wrong initialisation MSA_init function a module can be deactivated To find out the reason of deactivating the module run the MSA_get_init_status function Input parameters mod_no module number 0 3 ini status pointer to the initialisation status Return value 0 no errors lt 0 error code see msa_def h Description The procedure loads the ini_status variable with the initialisation result code set by the function MSA_ init for module mod_no The possible values are shown below see also msa_def h INIT_OK 0 no error INIT_NOT_DONE 1 init not done INIT_WRONG_EEP_CHKSUM 2 wrong EEPROM checksum INIT_WRONG_MOD_ID 3 wrong module identification code INIT_WRONG_BASE_ADR 4 not unique base address INIT_WRONG_DACS 7 DAC s test failed INIT_CANT_OPEN_PCI_CARD 8 cannot open PCI card INIT_MOD_IN_USE 9 module already in use In case of initialisation errors values INIT_WRONG_DACS or INIT_CANT_OPEN_PCI_CARD the function MSA_get_test_error_string gives additional information on the error 12 Input p
16. dress for ISA module 0 0x3FC default 0x380 pci_card_no 0 number of module on PCI bus if PCI version of MSA module 0 3 default 1 ISA module active 1 module active can be used default 0 not active enable_meas 1 enable disable 1 0 measurement default disable trigger 0 external trigger condition none 0 default active low 1 active high 2 inp_threshold 0 1 input threshold level 0 5 0 5V default 0 1 trig_threshold 0 1 trigger threshold level 1 0 1 0V default 0 1 10 time_per_point 0 005 collection time of 1 point in mikrosec 0 005 default 40 96 must be a multiple of time_resolution time_per_point must fulfil following expression points_no time_per_point us lt max_point time_resolution max_point 131072 for MSA 1000 524288 for MSA 200 300 points_no 1000 number of points to collect 64 max_point default 1000 points_no must fulfil following expression points_no time_per_point us lt max_point time_resolution max_point 131072 for MSA 1000 524288 for MSA 200 300 sweeps 1 number of accumulation sweeps 1 default max_sweep max_sweep 65535 for MSA 200 300 Oxfffffff for MSA 1000 inp_holdoff 0 5 input holdoff level for MSA 1000 0 5 5 0 ns default 0 5 trig_holdoff 0 5 trigger holdoff level for MSA 1000 0 5 5 0 ns default 0 5 time_resolution 0 005 time resolution of 1 point in mikrosec
17. ermore cross dependencies between different parameters are taken into account to ensure the correct hardware operation It is recommended to read back the parameters after setting to get their real values after recalculation Parameters BASE_ADR and ACTIVE cannot be changed They can be changed only by a new ini_file and a MSA_ init call The par_id values are defined in msa_def h file as MSA_PARAMETERS_KEYWORDS Input parameters mod_no module number 0 3 eep_data pointer to result structure Return value 0 no errors lt 0 error code see msa_def h The structure eep_data is filled with the contents of the EEPROM of the MSA module specified by mod_no The EEPROM contains the production data and the adjust parameters of the module The structure MSA _EEP Data is defined in the file msa_def h Normally the EEPROM data need not be read explicitly because the EEPROM is read during MSA _init and the module type information and the adjust values are taken into account when the MSA module registers are loaded short CVICDECL MSA_write_eeprom_data short mod_no unsigned short write_enable MSA_EEP_Data eep_data Input parameters mod_no module number 0 3 write_enable write enable password eep_data pointer to result structure Return value 0 no errors lt 0 error code see msa_def h 17 The function is used to write data to the EEPROM of an MSA module mod_no by the manufacturer To prevent corruption of the ad
18. ers mod_no module number 0 3 from Ist address to read 0 POINTS_NO 1 to last address to read from POINTS_NO 1 buf pointer to data buffer to be filled add 1 add read values to the buffer 0 rewrite buffer contents Return value 0 no errors lt 0 error code see msa_def h The procedure is used to read measurement results from the memory of the MSA module mod_no The procedure cannot be used during the measurement The procedure reads the MSA memory from the address from up to the address to and depending on the add parameter either writes or add read values to the buffer buf 21 Using the procedure with the parameter add equal 0 is recommended as a first call after the measurement start then a previous clearing of the buffer is not needed A call with add equal 1 is used to accumulate measurement results in the buffer when the measurement is restarted after an overflow Please make sure that the buffer buf be allocated with enough memory for the required number of points to from 1 Input parameters mod_no module number 0 3 Return value on success module type on error lt 0 error code The procedure is used to check the identification code of MSA module mod_no It is a low level procedure that is called already during the initialisation by MSA_init The procedure returns a module type value if the id is correct Possible module type valu
19. es are defined in the msa_def h file Input parameters error_string pointer to error message string Return value lt 0 last error code see msa_def h The procedure fills error_string with the internal DLL string generated during the last execution of the MSA init function Error string contains detailed information on an initialisation error After a call to MSA_get_test_error_string DLL s internal error string is empty 22 23
20. h which has to be defined by the user The parameters included in this structure are described below short module_type MSA module type see msa_def h short slot_number slot number on PCI bus occupied by the MSA 300 1000 mo dule short in_use 1 used and locked by other application 0 not used 1 in use not for MSA 1000 short init set to initialisation result code unsigned short base_adr base I O address 14 Input parameters mod_no module number 0 3 data pointer to result structure type MSAdata Return value 0 no errors lt 0 error code see msa_def h Description After calling the MSA_init function see above the measurement parameters from the initialisation file are present in the module and in the internal data structures of the DLLs To give the user access to the parameters the function MSA_get_parameters is provided This function transfers the parameter values of the module mod_no from the internal structures of the DLLs into a structure of the type MSAdata see msa_def h A suitable structure has to be defined by the user The parameter values in this structure are described below short base_adr short init short active short enable_meas short test_eep short trigger float inp_threshold float trig_threshold float time_per_point unsigned long points unsigned long sweeps float inp_holdoff float trig_holdoff float time_resolution float start_delay short pci_card_no short active_edge
21. ialisation file in use including file name and extension Return value 0 no errors lt 0 error code Description Before a measurement is started the measurement parameter values must be written into the internal structures of the DLL functions not directly visible from the user program and sent to the control registers of the MSA module This is accomplished by the function MSA_init The function reads the parameter values from the specified file ini_file checks base I O addresses for all active modules on ISA bus MSA 200 to avoid hardware conflicts checks and recalculates the parameters depending on hardware constraints and adjust parameters from the EEPROM in each active MSA module sends the parameter values to the control registers of each active MSA module performs a hardware test of each active MSA module The initialisation file is an ASCII file with a structure shown in the table below We recommend either to use the file MSA200 INI or to start with MSA200 INI and introduce the desired changes MSA200 initialisation file MSA parameters have to be included in ini file only when parameter value is different from default module section msa_module0 3 is required for each existing MSA module msa_base simulation 0 0 hardware mode default gt 0 simulation mode see msa_def h for possible values msa_module0 MSA module 0 hardware parameters base_adr 0x380 base I O ad
22. just data by not allowed access the function writes the EEPROM only if the write_enable password is correct short CVICDECL MSA _ get_adjust_parameters short mod_no MSA_Adjust_Para adjpara Input parameters mod_no module number 0 3 adjpara pointer to result structure Return value 0 no errors lt 0 error code see msa_def h The structure adjpara is filled with adjust parameters of the MSA module mod_no that are currently in use The parameters can either be previously loaded from the EEPROM by MSA init or MSA _get_eeprom_data or not recommended set by MSA_set_adust_parameters The structure MSA_Adjust_Para is defined in the file msa_def h Normally the adjust parameters need not be read explicitly because the EEPROM is read during MSA_init and the adjust values are taken into account when the MSA module registers are loaded Input parameters mod_no module number 0 3 adjpara pointer to a structure which contains new adjust parameters Return value 0 no errors lt 0 error code see msa_def h The adjust parameters in the internal DLL structures not in the EEPROM of the module mod_no are set to values from the structure adjpara The function is used to set the module adjust parameters to values other than the values from the EEPROM The new adjust values will be used until the next call of MSA_init The next call to MSA_init replaces the adjust parameters by the values from the EEPROM We
23. loat start_delay short pci_card_no short active_edge VO base address set to initialisation result code most of the library functions are executed only when module is active not 0 measurement enabled disabled 1 0 test EEPROM checksum on startup or not external trigger condition none 0 active low 1 active high 2 input threshold level trigger threshold level collection time of 1 point in mikrosec 0 005 default 40 96 must be a multiple of 0 time_resolution no of points to collect 64 524288 MSA 200 300 131072 MSA 1000 default 1000 no of accumulation sweeps 1 default 65535 MSA 200 300 Oxffffffff MS A 1000 input holdoff 0 5 5 0 ns only MSA 1000 trigger holdoff 0 5 5 0 ns only MSA 1000 time resolution of point in mikrosec 0 005 for MSA200 300 0 001 0 002 0 004 0 008 default for MSA 1000 start delay after trigger in mikrosec for MSA 1000 O default 1e6 slot no for PCI module 0 3 or 1 for ISA module active edge of the input signal for MSA 1000 5 0 falling default 1 rising To send the complete parameter set back to the DLLs and to the MSA module e g after changing parameter values the function MSA_set_parameters is used This function checks and if required recalculates all parameter values due to cross dependencies and hardware restrictions Therefore it is recommended to read the parameter values after calling MSA_set_parameters by MSA_get_parameters
24. set_parameter MSA memory on all active modules must be cleared from 0 to POINTS_NO 1 not needed for MSA 1000 POINTS_NO and TIME _PER_ POINT must be set to define the number of frames to be measured SWEEPS must be set to define the number of sweeps to be accumulated The measurement continues until the specified number of points and accumulations has been reached or an overflow occurred In case of overflow the measurement can be restarted if the current sweep counter is less than SWEEPS If restart is equal 1 sweeps counter is not reloaded and the current value is used If restart is equal 0 the sweep counter is loaded with the SWEEPS value 20 Input parameters none Return value 0 no errors lt 0 error code see msa_def h MSA_stop_measure is used to stop the measurement by a software command short CVICDECL MSA_fill_memory short mod_no unsigned long from unsigned long to unsigned short fill_value Input parameters mod_no module number 0 3 from Ist address to fill 0 POINTS_NO 1 to last address to fill from POINTS_NO 1 fill value value written to the MSA memory Return value 0 no errors lt 0 error code see msa_def h The procedure is used to fill a specified part of the memory of the MSA module mod_no with the value fill_value short CVICDECL MSA _read_data short mod_no unsigned long from unsigned long to unsigned long buf short add Input paramet
25. the error see msa_def h for possible values In case of hardware test EITOTS value INIT_WRONG_DACS the function MSA_get_test_error_string returns additional information about the error Additional information about MSA modules can be obtained by calling MSA_get_module_info function The function fills MSAModInfo structure which is described below short module_type short slot_number module type 20 MSA 200 30 MSA 300 1000 MSA 1000 slot number on PCI bus if MSA 300 1000 module short in_use 1 used and locked by other application 0 not used 1 in use not for MSA 1000 short init set to initialisation result code unsigned short base_adr base I O address After calling the MSA_ init function the measurement parameters from the initialisation file are present in the module control registers and in the internal data structures of the DLLs To give the user access to the parameters the function MSA_get_parameters is provided This function transfers the parameter values from the internal structures of the DLLs into a structure of the type MSAdata see msa_def h which has to be declared by the user The parameter values in this structure are described below short base_adr short init short active short enable_meas short test_eep short trigger float inp_threshold float trig_threshold float time_per_point unsigned long points unsigned long sweeps float inp_holdoff float trig_holdoff float time_resolution f
26. tions e g DAC resolution Furthermore cross dependencies between different parameters are taken into account to ensure the correct hardware operation It is recommended to read back the parameters after setting to get their true values after recalculation The values of base_adr init and active are not changed They can be changed only by a new ini_file an a MSA_ init call If an error occurs for a particular parameter the procedure does not set the rest of the parameters and returns with an error code Input parameters mod_no module number 0 3 par_id parameter identification number see msa_def h value pointer to the parameter value Return value 0 no errors lt 0 error code see msa_def h The procedure loads value with the actual value of the requested parameter from the DLL internal data structures of the module mod_no The par_id values are defined in msa_def h file as MSA_ PARAMETERS_ KEYWORDS Input parameters mod_no module number 0 3 16 par_id parameter identification number value new parameter value Return value 0 no errors lt Q error code see msa_def h The procedure sets the specified hardware parameter The value of the specified parameter is transferred to the internal data structures of the DLL functions and to the MSA module mod_no The new parameter value is recalculated according to the parameter limits and hardware restrictions e g DAC resolution Furth
27. tive_edge 0 msa_modulel base_adr 0x280 active 0 msa_module2 base_adr 0x2a0 active 0 msa_module3 base_adr 0x2c0 active 0 gt 0 simulation mode see msa_def h for possible values MSA module 0 hardware parameters base I O address for ISA module 0 Ox3FC default 0x380 number of module on PCI bus if PCI version of MSA module 0 3 default 1 ISA module smodule active can be used default 0 not active enable disable 1 0 measurement default disable external trigger condition none 0 default active low 1 active high 2 input threshold level 0 5 0 5V default 0 1 trigger threshold level 1 0 1 0V default 0 1 collection time of point in mikrosec 0 005 default 40 96 must be a multiple of time_resolution time_per_point must fulfil following expression points_no time_per_point us lt max_point time_resolution max_point 131072 for MSA 1000 524288 for MSA 200 300 number of points to collect 64 max_point default 1000 points_no must fulfil following expression points_no time_per_point us lt max_point time_resolution max_point 131072 for MSA 1000 524288 for MSA 200 300 number of accumulation sweeps 1 default max_sweep max_sweep 65535 for MSA 200 300 Oxfffffff for MSA 1000 sinput holdoff level for MSA 1000 0 5 5 0 ns default 0 5 trigger holdoff level for MSA 1000

Download Pdf Manuals

image

Related Search

Related Contents

Sony DVP-K330 User's Manual  Project System DVR  Business Computer Information Systems  Nokia N86 8MP User Guide  IC Intracom 177368 video switch  Dictionary - Franklin Electronic Publishers, Inc.  Aperçu du matériel d`enseignement sur l`utilisation en toute sécurité  X32 RACK DIGITAL MIXER  FCS-0030 H.264 MegaPixel IP-Kamera mit PIR-Sensor  Pilot 3380 Tracker 5380  

Copyright © All rights reserved.
Failed to retrieve file