Production Line Tool v5.0
The DA1470x Production Line Tool Software Package
Loading...
Searching...
No Matches
Typedefs | Functions
Current measurement instrument API functions

The Current measurement instrument API library functions. More...

Typedefs

typedef void(* _callback_ammeter) (int status, double val)
 Current measurement API callback function type definition. More...
 

Functions

AMMETER_API int ammeter_api_dbg_init (_dbg_params *dbg_params_t)
 Current measurement instrument debug session initialize. More...
 
AMMETER_API int ammeter_api_dbg_close (void)
 Current measurement instrument debug session close. More...
 
AMMETER_API int ammeter_api_init (const char *iface, _callback_ammeter callback_ammeter)
 Current measurement instrument initialize function. More...
 
AMMETER_API int ammeter_api_close (void)
 Current measurement instrument close function and free allocated resources. More...
 
AMMETER_API int ammeter_api_shunt_res (float shunt_res)
 Set the shunt resistor value. Only used if voltmeters or NI-DAQs are used to measure current. More...
 
AMMETER_API int ammeter_api_range (double range)
 Set the ampere range that the instrument will operate. More...
 
AMMETER_API int ammeter_api_resolution (double resolution)
 Set the resolution that the instrument will operate. More...
 
AMMETER_API int ammeter_api_samples (uint32_t samples)
 Set the number of samples/measurements that the instrument will take and average. More...
 
AMMETER_API int ammeter_api_gen_cmd (const char *gen_cmd)
 Set a SCPI command that will be passed to the instrument. Multiple, column separated commands, are supported. More...
 
AMMETER_API int ammeter_api_measure (void)
 Perform a current measurement and return the result. More...
 

Detailed Description

The Current measurement instrument API library functions.

Typedef Documentation

◆ _callback_ammeter

typedef void(* _callback_ammeter) (int status, double val)

Current measurement API callback function type definition.

Parameters
[in]statusThe measurement status taken from _AMMETER_API_STATUS_CODES.
[in]valDouble current measurement value returned to the upper layer software.

Definition at line 153 of file ammeter_api.h.

Function Documentation

◆ ammeter_api_close()

AMMETER_API int ammeter_api_close ( void  )

Current measurement instrument close function and free allocated resources.

Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_dbg_close()

AMMETER_API int ammeter_api_dbg_close ( void  )

Current measurement instrument debug session close.

Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_dbg_init()

AMMETER_API int ammeter_api_dbg_init ( _dbg_params dbg_params_t)

Current measurement instrument debug session initialize.

Parameters
[in]dbg_params_tA pointer to the a __dbg_params.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_gen_cmd()

AMMETER_API int ammeter_api_gen_cmd ( const char *  gen_cmd)

Set a SCPI command that will be passed to the instrument. Multiple, column separated commands, are supported.

Parameters
[in]gen_cmdA pointer to a SCPI based string command. Up to 256 string size is supported.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_init()

AMMETER_API int ammeter_api_init ( const char *  iface,
_callback_ammeter  callback_ammeter 
)

Current measurement instrument initialize function.

Parameters
[in]ifaceiface. A string to define the instrument interface, e.g. "COM15".
[in]callback_ammeterA callback function, with _callback_ammeter type, called whenever the current measurement is ready.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_measure()

AMMETER_API int ammeter_api_measure ( void  )

Perform a current measurement and return the result.

Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_range()

AMMETER_API int ammeter_api_range ( double  range)

Set the ampere range that the instrument will operate.

Parameters
[in]rangeThe range that the instrument will operate in Ampere units.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_resolution()

AMMETER_API int ammeter_api_resolution ( double  resolution)

Set the resolution that the instrument will operate.

Parameters
[in]resolutionThe resolution that the instrument will operate in Ampere units.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_samples()

AMMETER_API int ammeter_api_samples ( uint32_t  samples)

Set the number of samples/measurements that the instrument will take and average.

Parameters
[in]samplesThe number of samples/measurements that the instrument will take and average.
Returns
AMMETER_API_STATUS_CODES.

◆ ammeter_api_shunt_res()

AMMETER_API int ammeter_api_shunt_res ( float  shunt_res)

Set the shunt resistor value. Only used if voltmeters or NI-DAQs are used to measure current.

Parameters
[in]shunt_resThe value of the shunt resistor.
Returns
AMMETER_API_STATUS_CODES.