ABS SCPI Driver 0.2.0
ABS SCPI driver library
Loading...
Searching...
No Matches
Cell Control

Functions for controlling and measuring the cells. More...

+ Collaboration diagram for Cell Control:

Modules

 Cell Faults
 Cell faulting states constants.
 
 Cell Current Sense Ranges
 Cell sense range constants.
 
 Cell Operating Modes
 Cell operating mode constants.
 

Functions

int AbsScpiClient_EnableCell (AbsScpiClientHandle handle, unsigned int cell, bool en)
 Enable a single cell.
 
int AbsScpiClient_EnableCellsMasked (AbsScpiClientHandle handle, unsigned int cells, bool en)
 Enable or disable multiple cells at once.
 
int AbsScpiClient_GetCellEnabled (AbsScpiClientHandle handle, unsigned int cell, bool *en_out)
 Query whether a cell is enabled.
 
int AbsScpiClient_GetCellsEnabledMasked (AbsScpiClientHandle handle, unsigned int *cells_out)
 Query the enable state of all cells.
 
int AbsScpiClient_SetCellVoltage (AbsScpiClientHandle handle, unsigned int cell, float voltage)
 Set a single cell's target voltage.
 
int AbsScpiClient_SetAllCellVoltages (AbsScpiClientHandle handle, const float voltages[], unsigned int count)
 Set many cells' target voltages.
 
int AbsScpiClient_SetMultipleCellVoltages (AbsScpiClientHandle handle, unsigned int cells, float voltage)
 Set multiple cells to the same voltage.
 
int AbsScpiClient_GetCellVoltageTarget (AbsScpiClientHandle handle, unsigned int cell, float *voltage_out)
 Query a cell's target voltage.
 
int AbsScpiClient_GetAllCellVoltageTargets (AbsScpiClientHandle handle, float voltages_out[], unsigned int count)
 Query many cells' target voltages.
 
int AbsScpiClient_SetCellSourcing (AbsScpiClientHandle handle, unsigned int cell, float limit)
 Set a single cell's current sourcing limit.
 
int AbsScpiClient_SetAllCellSourcing (AbsScpiClientHandle handle, const float limits[], unsigned int count)
 Set many cells' sourcing limits.
 
int AbsScpiClient_SetMultipleCellSourcing (AbsScpiClientHandle handle, unsigned int cells, float limit)
 Set multiple cells to the same sourcing limit.
 
int AbsScpiClient_GetCellSourcingLimit (AbsScpiClientHandle handle, unsigned int cell, float *limit_out)
 Query a single cell's sourcing limit.
 
int AbsScpiClient_GetAllCellSourcingLimits (AbsScpiClientHandle handle, float limits_out[], unsigned int count)
 Query many cells' sourcing limits.
 
int AbsScpiClient_SetCellSinking (AbsScpiClientHandle handle, unsigned int cell, float limit)
 Set a single cell's current sinking limit.
 
int AbsScpiClient_SetAllCellSinking (AbsScpiClientHandle handle, const float limits[], unsigned int count)
 Set many cells' sinking limits.
 
int AbsScpiClient_SetMultipleCellSinking (AbsScpiClientHandle handle, unsigned int cells, float limit)
 Set multiple cells to the same sinking limit.
 
int AbsScpiClient_GetCellSinkingLimit (AbsScpiClientHandle handle, unsigned int cell, float *limit_out)
 Query a single cell's sinking limit.
 
int AbsScpiClient_GetAllCellSinkingLimits (AbsScpiClientHandle handle, float limits_out[], unsigned int count)
 Query many cells' sinking limits.
 
int AbsScpiClient_SetCellFault (AbsScpiClientHandle handle, unsigned int cell, int fault)
 Set a single cell's fault state.
 
int AbsScpiClient_SetAllCellFaults (AbsScpiClientHandle handle, const int faults[], unsigned int count)
 Set many cells' fault states.
 
int AbsScpiClient_SetMultipleCellFaults (AbsScpiClientHandle handle, unsigned int cells, int fault)
 Set multiple cells to the same fault state.
 
int AbsScpiClient_GetCellFault (AbsScpiClientHandle handle, unsigned int cell, int *fault_out)
 Query a single cell's fault state.
 
int AbsScpiClient_GetAllCellFaults (AbsScpiClientHandle handle, int faults_out[], unsigned int count)
 Query many cells' fault states.
 
int AbsScpiClient_SetCellSenseRange (AbsScpiClientHandle handle, unsigned int cell, int range)
 Set a single cell's current sense range.
 
int AbsScpiClient_SetAllCellSenseRanges (AbsScpiClientHandle handle, const int ranges[], unsigned int count)
 Set many cells' current sense ranges.
 
int AbsScpiClient_GetCellSenseRange (AbsScpiClientHandle handle, unsigned int cell, int *range_out)
 Query a single cell's current sense range.
 
int AbsScpiClient_GetAllCellSenseRanges (AbsScpiClientHandle handle, int ranges_out[], unsigned int count)
 Query many cells' current sense ranges.
 
int AbsScpiClient_EnableCellNoiseFilter (AbsScpiClientHandle handle, bool en)
 Enable or disable the cell 50/60Hz noise filter.
 
int AbsScpiClient_GetCellNoiseFilterEnabled (AbsScpiClientHandle handle, bool *en_out)
 Query the enable state of the cell 50/60Hz noise filter.
 
int AbsScpiClient_MeasureCellVoltage (AbsScpiClientHandle handle, unsigned int cell, float *voltage_out)
 Measure a cell's voltage.
 
int AbsScpiClient_MeasureAllCellVoltages (AbsScpiClientHandle handle, float voltages_out[], unsigned int count)
 Measure many cells' voltages.
 
int AbsScpiClient_MeasureCellCurrent (AbsScpiClientHandle handle, unsigned int cell, float *current_out)
 Measure a cell's current.
 
int AbsScpiClient_MeasureAllCellCurrents (AbsScpiClientHandle handle, float currents_out[], unsigned int count)
 Measure many cells' currents.
 
int AbsScpiClient_GetCellOperatingMode (AbsScpiClientHandle handle, unsigned int cell, int *mode_out)
 Query a cell's operating mode (constant voltage or current-limited).
 
int AbsScpiClient_GetAllCellOperatingModes (AbsScpiClientHandle handle, int modes_out[], unsigned int count)
 Query many cells' operating modes (constant voltage or current-limited).
 

Detailed Description

Functions for controlling and measuring the cells.

Function Documentation

◆ AbsScpiClient_EnableCell()

int AbsScpiClient_EnableCell ( AbsScpiClientHandle  handle,
unsigned int  cell,
bool  en 
)

Enable a single cell.

Parameters
[in]handleSCPI client
[in]cellthe cell index 0-7
[in]enwhether to enable the cell
Returns
0 on success or a negative error code.

◆ AbsScpiClient_EnableCellNoiseFilter()

int AbsScpiClient_EnableCellNoiseFilter ( AbsScpiClientHandle  handle,
bool  en 
)

Enable or disable the cell 50/60Hz noise filter.

This mode filters 50/60Hz noise and increases cell measurement accuracy, but reduces the cell control rate to 10Hz.

Parameters
[in]handleSCPI client
[in]endesired cell noise filter state
Returns
0 on success or a negative error code.

◆ AbsScpiClient_EnableCellsMasked()

int AbsScpiClient_EnableCellsMasked ( AbsScpiClientHandle  handle,
unsigned int  cells,
bool  en 
)

Enable or disable multiple cells at once.

Parameters
[in]handleSCPI client
[in]cellsa bitmask of cells to control, where bit 0 corresponds to cell 1
[in]enthe desired enable state of the masked cells
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellFaults()

int AbsScpiClient_GetAllCellFaults ( AbsScpiClientHandle  handle,
int  faults_out[],
unsigned int  count 
)

Query many cells' fault states.

Parameters
[in]handleSCPI client
[out]faults_outarray to store the returned fault states
[in]countlength of the array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellOperatingModes()

int AbsScpiClient_GetAllCellOperatingModes ( AbsScpiClientHandle  handle,
int  modes_out[],
unsigned int  count 
)

Query many cells' operating modes (constant voltage or current-limited).

Parameters
[in]handleSCPI client
[out]modes_outarray to store the returned modes, one per cell
[in]countnumber of cells to query (must not be greater than the total number of cells)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellSenseRanges()

int AbsScpiClient_GetAllCellSenseRanges ( AbsScpiClientHandle  handle,
int  ranges_out[],
unsigned int  count 
)

Query many cells' current sense ranges.

Parameters
[in]handleSCPI client
[out]ranges_outarray to store the returned sense ranges
[in]countlength of the array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellSinkingLimits()

int AbsScpiClient_GetAllCellSinkingLimits ( AbsScpiClientHandle  handle,
float  limits_out[],
unsigned int  count 
)

Query many cells' sinking limits.

Parameters
[in]handleSCPI client
[out]limits_outarray to store the returned limits
[in]countlength of the array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellSourcingLimits()

int AbsScpiClient_GetAllCellSourcingLimits ( AbsScpiClientHandle  handle,
float  limits_out[],
unsigned int  count 
)

Query many cells' sourcing limits.

Parameters
[in]handleSCPI client
[out]limits_outarray to store the returned limits
[in]countlength of the array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetAllCellVoltageTargets()

int AbsScpiClient_GetAllCellVoltageTargets ( AbsScpiClientHandle  handle,
float  voltages_out[],
unsigned int  count 
)

Query many cells' target voltages.

Parameters
[in]handleSCPI client
[out]voltages_outan array to store the returned voltages
[in]countlength of the voltages array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellEnabled()

int AbsScpiClient_GetCellEnabled ( AbsScpiClientHandle  handle,
unsigned int  cell,
bool *  en_out 
)

Query whether a cell is enabled.

Parameters
[in]handleSCPI client
[in]cellcell index 0-7
[out]en_outpointer to the returned enable state
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellFault()

int AbsScpiClient_GetCellFault ( AbsScpiClientHandle  handle,
unsigned int  cell,
int *  fault_out 
)

Query a single cell's fault state.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]fault_outpointer to the returned fault state
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellNoiseFilterEnabled()

int AbsScpiClient_GetCellNoiseFilterEnabled ( AbsScpiClientHandle  handle,
bool *  en_out 
)

Query the enable state of the cell 50/60Hz noise filter.

Parameters
[in]handleSCPI client
[out]en_outa pointer to the returned filter state
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellOperatingMode()

int AbsScpiClient_GetCellOperatingMode ( AbsScpiClientHandle  handle,
unsigned int  cell,
int *  mode_out 
)

Query a cell's operating mode (constant voltage or current-limited).

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]mode_outpointer to returned operating mode
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellsEnabledMasked()

int AbsScpiClient_GetCellsEnabledMasked ( AbsScpiClientHandle  handle,
unsigned int *  cells_out 
)

Query the enable state of all cells.

Parameters
[in]handleSCPI client
[out]cells_outpointer to the returned bitmask containing a 1 bit for each enabled cell and a 0 for each disabled cell
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellSenseRange()

int AbsScpiClient_GetCellSenseRange ( AbsScpiClientHandle  handle,
unsigned int  cell,
int *  range_out 
)

Query a single cell's current sense range.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]range_outpointer to the returned sense range
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellSinkingLimit()

int AbsScpiClient_GetCellSinkingLimit ( AbsScpiClientHandle  handle,
unsigned int  cell,
float *  limit_out 
)

Query a single cell's sinking limit.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]limit_outpointer to the returned sinking limit
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellSourcingLimit()

int AbsScpiClient_GetCellSourcingLimit ( AbsScpiClientHandle  handle,
unsigned int  cell,
float *  limit_out 
)

Query a single cell's sourcing limit.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]limit_outpointer to the returned sourcing limit
Returns
0 on success or a negative error code.

◆ AbsScpiClient_GetCellVoltageTarget()

int AbsScpiClient_GetCellVoltageTarget ( AbsScpiClientHandle  handle,
unsigned int  cell,
float *  voltage_out 
)

Query a cell's target voltage.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]voltage_outpointer to the returned cell voltage target
Returns
0 on success or a negative error code.

◆ AbsScpiClient_MeasureAllCellCurrents()

int AbsScpiClient_MeasureAllCellCurrents ( AbsScpiClientHandle  handle,
float  currents_out[],
unsigned int  count 
)

Measure many cells' currents.

Parameters
[in]handleSCPI client
[out]currents_outarray to store the returned currents, one per cell
[in]countthe number of cells to measure
Returns
0 on success or a negative error code.

◆ AbsScpiClient_MeasureAllCellVoltages()

int AbsScpiClient_MeasureAllCellVoltages ( AbsScpiClientHandle  handle,
float  voltages_out[],
unsigned int  count 
)

Measure many cells' voltages.

Parameters
[in]handleSCPI client
[out]voltages_outarray to store the returned voltages, one per cell
[in]countthe number of cells to measure
Returns
0 on success or a negative error code.

◆ AbsScpiClient_MeasureCellCurrent()

int AbsScpiClient_MeasureCellCurrent ( AbsScpiClientHandle  handle,
unsigned int  cell,
float *  current_out 
)

Measure a cell's current.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]current_outpointer to the returned current
Returns
0 on success or a negative error code.

◆ AbsScpiClient_MeasureCellVoltage()

int AbsScpiClient_MeasureCellVoltage ( AbsScpiClientHandle  handle,
unsigned int  cell,
float *  voltage_out 
)

Measure a cell's voltage.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[out]voltage_outpointer to the returned voltage
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllCellFaults()

int AbsScpiClient_SetAllCellFaults ( AbsScpiClientHandle  handle,
const int  faults[],
unsigned int  count 
)

Set many cells' fault states.

Parameters
[in]handleSCPI client
[in]faultsfault states, one per cell
[in]countnumber of cells to target (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllCellSenseRanges()

int AbsScpiClient_SetAllCellSenseRanges ( AbsScpiClientHandle  handle,
const int  ranges[],
unsigned int  count 
)

Set many cells' current sense ranges.

Note
This is unnecessary for most applications. By default, the cell will choose a sense range based on its current sourcing and sinking limits.
Parameters
[in]handleSCPI client
[in]rangessense ranges, one per cell
[in]countnumber of cells to target (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllCellSinking()

int AbsScpiClient_SetAllCellSinking ( AbsScpiClientHandle  handle,
const float  limits[],
unsigned int  count 
)

Set many cells' sinking limits.

Parameters
[in]handleSCPI client
[in]limitssinking limits, one per cell
[in]countnumber of cells to target (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllCellSourcing()

int AbsScpiClient_SetAllCellSourcing ( AbsScpiClientHandle  handle,
const float  limits[],
unsigned int  count 
)

Set many cells' sourcing limits.

Parameters
[in]handleSCPI client
[in]limitssourcing limits, one per cell
[in]countnumber of cells to target (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetAllCellVoltages()

int AbsScpiClient_SetAllCellVoltages ( AbsScpiClientHandle  handle,
const float  voltages[],
unsigned int  count 
)

Set many cells' target voltages.

Parameters
[in]handleSCPI client
[in]voltagesarray of voltages
[in]countlength of the voltages array (must not be greater than the total cell count)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetCellFault()

int AbsScpiClient_SetCellFault ( AbsScpiClientHandle  handle,
unsigned int  cell,
int  fault 
)

Set a single cell's fault state.

Parameters
[in]handleSCPI client
[in]cellcell index, 0-7
[in]faultdesired cell fault
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetCellSenseRange()

int AbsScpiClient_SetCellSenseRange ( AbsScpiClientHandle  handle,
unsigned int  cell,
int  range 
)

Set a single cell's current sense range.

Note
This is unnecessary for most applications. By default, the cell will choose a sense range based on its current sourcing and sinking limits.
Parameters
[in]handleSCPI client
[in]cellcell index, 0-7
[in]rangedesired cell current sense range
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetCellSinking()

int AbsScpiClient_SetCellSinking ( AbsScpiClientHandle  handle,
unsigned int  cell,
float  limit 
)

Set a single cell's current sinking limit.

Parameters
[in]handleSCPI client
[in]cellcell index, 0-7
[in]limitdesired sinking limit, 0-5 (may be positive or negative)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetCellSourcing()

int AbsScpiClient_SetCellSourcing ( AbsScpiClientHandle  handle,
unsigned int  cell,
float  limit 
)

Set a single cell's current sourcing limit.

Parameters
[in]handleSCPI client
[in]cellcell index, 0-7
[in]limitdesired sourcing limit, 0-5
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetCellVoltage()

int AbsScpiClient_SetCellVoltage ( AbsScpiClientHandle  handle,
unsigned int  cell,
float  voltage 
)

Set a single cell's target voltage.

Parameters
[in]handleSCPI client
[in]celltarget cell index, 0-7
[in]voltagecell voltage, 0-5
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetMultipleCellFaults()

int AbsScpiClient_SetMultipleCellFaults ( AbsScpiClientHandle  handle,
unsigned int  cells,
int  fault 
)

Set multiple cells to the same fault state.

Parameters
[in]handleSCPI client
[in]cellsbitmask of cells to target, one bit per cell
[in]faulttarget cell fault state
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetMultipleCellSinking()

int AbsScpiClient_SetMultipleCellSinking ( AbsScpiClientHandle  handle,
unsigned int  cells,
float  limit 
)

Set multiple cells to the same sinking limit.

Parameters
[in]handleSCPI client
[in]cellsbitmask of cells to target (one bit per cell)
[in]limittarget sinking limit, 0-5 (positive or negative)
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetMultipleCellSourcing()

int AbsScpiClient_SetMultipleCellSourcing ( AbsScpiClientHandle  handle,
unsigned int  cells,
float  limit 
)

Set multiple cells to the same sourcing limit.

Parameters
[in]handleSCPI client
[in]cellsbitmask of cells to target (one bit per cell)
[in]limittarget sourcing limit, 0-5
Returns
0 on success or a negative error code.

◆ AbsScpiClient_SetMultipleCellVoltages()

int AbsScpiClient_SetMultipleCellVoltages ( AbsScpiClientHandle  handle,
unsigned int  cells,
float  voltage 
)

Set multiple cells to the same voltage.

Parameters
[in]handleSCPI client
[in]cellsbitmask of cells to target (one bit per cell)
[in]voltagetarget voltage
Returns
0 on success or a negative error code.