Files
frontend-elite-data-analysis/src/data/config-table/EliteEDC/index.js
T
2022-12-30 09:51:23 +08:00

1068 lines
26 KiB
JavaScript

import Idle from '../Common/Idle'
import IV from './IV'
import CycleIV from './CycleIV'
import FunctionGenerator from './FunctionGenerator'
import RT from './RT'
import VT from './VT'
import IT from './IT'
import ConstantCurrent from './ConstantCurrent'
import CyclicVoltammetry from './CyclicVoltammetry'
import LinearSweep from './LinearSweep'
import Chronoamperometry from './Chronoamperometry'
import Chronopotentiometry from './Chronopotentiometry'
import CaliDAC from './CaliDAC'
import CaliADC from './CaliADC'
import DevMode from './DevMode'
import OCP from './OCP'
import PulseSensing from './PulseSensing'
import DPV from './DPV'
/**
* Number-type-parameter
* PARAMETER_TITLE :{
* @param type value-type
* @param showName name
* @param componentType component-type
* @param range component-range
* @param defaultValue default-value
* @param defaultUnit default-unit
* @param downloadUnit download-unit
* @param unit unit-table
* @param outputRawData function return raw data
* @param outputReadabilityData function return user data
* }
*/
/**
* Array-type-parameter
* PARAMETER_TITLE :{
* @param type value-type
* @param showName name
* @param componentType component-type
* @param options select-options
* @param range select-range
* @param defaultValue default-value
* @param outputRawData function return raw data
* @param outputReadabilityData function return user data
* }
*/
const EliteZM15 = {
ADC_VALUE_I: {
type: 'none',
showName: 'Instruction',
componentType: 'dev-mode',
},
TIME_DURATION: {
type: 'number',
showName: 'Time duration',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 86400 }), // UI上能輸入的最大最小值
defaultValue: 0,
defaultUnit: 's',
downloadUnit: 's',
unit: {
ms: 1e-3,
s: 1,
m: 60,
h: 3600,
},
outputRawData: (val) => {
return parseInt(parseFloat(val))
},
outputReadabilityData: (val) => {
return parseInt(parseFloat(val))
},
},
CC_CP_SPEED: {
type: 'array',
showName: 'Response speed',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'Slow' },
{ value: 1, label: 'Normal' },
{ value: 2, label: 'Fast' },
],
range: ['Slow', 'Normal', 'Fast'],
defaultValue: 1,
outputRawData: (val) => {
const speedArr = ['Slow', 'Normal', 'Fast']
return speedArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const speedArr = ['Slow', 'Normal', 'Fast']
return speedArr[parseInt(idx)]
},
},
ADC_LEVEL_I_15: {
type: 'array',
showName: 'Current range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '<4 uA' },
{ value: 1, label: '2.5-100 uA' },
{ value: 2, label: '85-2050 uA' },
{ value: 3, label: '1800 uA' },
{ value: 4, label: 'Auto' },
],
range: ['<4 uA', '2.5-100 uA', '85-2050 uA', '1800 uA', 'Auto'],
defaultValue: 4,
outputRawData: (val) => {
const currentRangeArr = ['<4 uA', '2.5-100 uA', '85-2050 uA', '1800 uA', 'Auto']
return currentRangeArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const currentRangeArr = ['<4 uA', '2.5-100 uA', '85-2050 uA', '1800 uA', 'Auto']
return currentRangeArr[parseInt(idx)]
},
},
ADC_LEVEL_V_IN_15: {
type: 'array',
showName: 'Voltage range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '<7 mV' },
{ value: 1, label: '5-300 mV' },
{ value: 2, label: '>250 mV' },
{ value: 3, label: 'Auto' },
],
range: ['<7 mV', '5-300 mV', '>250 mV', 'Auto'],
defaultValue: 3,
outputRawData: (val) => {
const voltageInRangeArr = ['<7 mV', '5-300 mV', '>250 mV', 'Auto']
return voltageInRangeArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const voltageInRangeArr = ['<7 mV', '5-300 mV', '>250 mV', 'Auto']
return voltageInRangeArr[parseInt(idx)]
},
},
CTRL_HIGH_Z_15: {
type: 'array',
showName: 'HighZ',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'On' },
{ value: 1, label: 'Off' },
],
range: ['On', 'Off'],
defaultValue: 1,
outputRawData: (val) => {
const highzArr = ['On', 'Off']
return highzArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const highzArr = ['On', 'Off']
return highzArr[parseInt(idx)]
},
},
ADC_DAC_CHANNEL_15: {
type: 'array',
showName: 'Cali Channel',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: 'Iin' },
{ value: 1, label: 'Vin' },
{ value: 2, label: 'Vout' },
],
range: ['Iin', 'Vin', 'Vout'],
defaultValue: 0,
outputRawData: (val) => {
const caliChannelArr = ['Iin', 'Vin', 'Vout']
return caliChannelArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const caliChannelArr = ['Iin', 'Vin', 'Vout']
return caliChannelArr[parseInt(idx)]
},
syncParameter: {
0: [
['ADC_LEVEL_V_IN_15', 3],
['ADC_LEVEL_I_15', 0],
['DAC_LEVEL_V_OUT_15', 2],
],
1: [
['ADC_LEVEL_V_IN_15', 0],
['ADC_LEVEL_I_15', 0],
['DAC_LEVEL_V_OUT_15', 2],
],
2: [
['ADC_LEVEL_V_IN_15', 3],
['ADC_LEVEL_I_15', 4],
['DAC_LEVEL_V_OUT_15', 0],
],
},
},
VOLT_ORIGIN: {
type: 'number',
showName: 'Volt start',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }), // UI上能輸入的最大最小值
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_FINAL: {
type: 'number',
showName: 'Volt stop',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_STEP: {
type: 'number',
showName: 'Volt step',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 1000 }),
defaultValue: 1000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
},
outputRawData: (val) => {
if ((parseFloat(val) * 10) % 2 !== 0) {
// odd number
return parseFloat(val) * 10 + 1
} else {
return parseFloat(val) * 10
}
},
outputReadabilityData: (val) => {
return parseFloat(val) / 10
},
},
STEP_TIME: {
type: 'array',
showName: 'Step time',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '0.5s' },
{ value: 1, label: '1.0s' },
{ value: 2, label: '2.0s' },
],
range: ['0.5s', '1.0s', '2.0s'],
defaultValue: 1,
outputRawData: (val) => {
const stepTimeArr = ['0.5s', '1.0s', '2.0s']
return stepTimeArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const stepTimeArr = ['0.5s', '1.0s', '2.0s']
return stepTimeArr[parseInt(idx)]
},
downloadUnit: 's',
},
DAC_LEVEL_V_OUT_15: {
type: 'array',
showName: 'DAC range',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '0' },
{ value: 1, label: '1' },
{ value: 2, label: 'Auto' },
],
range: ['0', '1', 'Auto'],
defaultValue: 2,
outputRawData: (val) => {
const caliChannelArr = ['0', '1', 'Auto']
return caliChannelArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const caliChannelArr = ['0', '1', 'Auto']
return caliChannelArr[parseInt(idx)]
},
},
DAC_VOLT: {
type: 'number',
showName: 'Volt out',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DAC_VOLT_SCROLL: {
type: 'number',
showName: 'DAC code',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 60000 }),
defaultValue: 25000,
defaultUnit: '',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val))
},
outputReadabilityData: (val, scale = 0) => {
return parseInt(parseFloat(val))
},
},
DAC_VOLT_BUTTON: {
type: 'array',
showName: 'DAC code',
componentType: 'input-button-toggle',
options: [
{ value: 0, label: '10000' },
{ value: 1, label: '25000' },
{ value: 2, label: '50000' },
{ value: 3, label: '60000' },
],
range: ['10000', '25000', '50000', '60000'],
defaultValue: 1,
outputRawData: (val) => {
const caliChannelArr = ['10000', '25000', '50000', '60000']
return caliChannelArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const caliChannelArr = ['10000', '25000', '50000', '60000']
return caliChannelArr[parseInt(idx)]
},
},
SAMPLE_RATE: {
type: 'number',
componentType: 'input-range',
showName: (mode) => {
const nameObj = { 'Sample rate': [0, 1, 2, 3, 4, 5, 6, 9, 13, 16], Resolution: [7, 8] }
for (const key of Object.keys(nameObj)) {
if (nameObj[key].includes(mode)) {
return key
}
}
return 'Sample rate'
},
range: Object.freeze({ min: 1, max: 1000 }),
defaultValue: 1000,
defaultUnit: 'sps',
downloadUnit: 'sps',
unit: {
sps: 1,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * 10)
},
outputReadabilityData: (val, scale = 1) => {
return parseFloat(val) / 10
},
},
Charge: {
type: 'array',
showName: 'Charge',
componentType: 'input-button-toggle',
options: [
{ value: 1, label: 'Charge' },
{ value: 0, label: 'Discharge' },
],
range: ['Charge', 'Discharge'],
defaultValue: 1,
outputRawData: (val) => {
const chargeArr = ['DisCharge', 'Charge']
return chargeArr.indexOf(val.toString())
},
outputReadabilityData: (val) => {
const chargeArr = ['DisCharge', 'Charge']
return chargeArr[parseInt(val)]
},
},
Const_Current_value: {
type: 'number',
showName: 'Current',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 1500000 }),
defaultValue: 0,
defaultUnit: 'uA',
downloadUnit: 'uA',
unit: {
uA: 1,
mA: 1e3,
},
outputRawData: (val) => {
return parseInt(parseFloat(val) * 100)
},
outputReadabilityData: (val) => {
return parseFloat(val) / 100
},
},
VOLTSTOP_MAX: {
type: 'number',
showName: 'Volt max',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 50000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLTSTOP_MIN: {
type: 'number',
showName: 'Volt min stop',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 0,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_INITIAL: {
type: 'number',
showName: 'E-Initial',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_MAX: {
type: 'number',
showName: 'E1',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 27500,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_MIN: {
type: 'number',
showName: 'E2',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 22500,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_EFINAL: {
type: 'number',
showName: 'E-Final',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
VOLT_VSCAN: {
type: 'number',
showName: 'Volt (v.s. ref)',
componentType: 'input-range',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25000,
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
Scan_Rate: {
type: 'number',
showName: 'ScanRate',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 100000 }),
defaultValue: 10000,
defaultUnit: 'mV/s',
downloadUnit: 'mV/s',
unit: {
'mV/s': 1,
},
outputRawData: (val) => {
return parseInt(parseFloat(val) * 100)
},
outputReadabilityData: (val) => {
return parseFloat(val) / 100
},
},
CYCLE_NUMBER: {
type: 'number',
showName: 'Cycle number',
componentType: 'input-range',
range: Object.freeze({ min: 1, max: 50000 }),
defaultValue: 1,
defaultUnit: 'cycle',
unit: {
cycle: 1,
},
outputRawData: (val) => {
return parseInt(val)
},
outputReadabilityData: (val) => {
return parseInt(val)
},
},
V_initial: {
type: 'number-array',
showName: 'Segment Voltage',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: [50000, 25000, 25000, 25000],
defaultUnit: 'V',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1, index = -1) => {
if (index === -1) {
return parseInt(parseFloat(val) * scale * 5 + 25000)
} else {
return parseInt(parseFloat(val[index]) * scale * 5 + 25000)
}
},
outputReadabilityData: (val, scale = 1, index = -1) => {
if (index === -1) {
return parseInt((parseFloat(val) - 25000) / 5) / scale
} else {
return parseInt((parseFloat(val[index]) - 25000) / 5) / scale
}
},
},
t_pulse: {
type: 'number-array',
showName: 'Segment Duration',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 1e6 }),
defaultValue: [750, 9250, 1000, 1000],
defaultUnit: 'ms',
downloadUnit: 'ms',
unit: {
ms: 1,
s: 1e3,
},
outputRawData: (val, scale = 1, index = -1) => {
if (index >= 0) {
val = val[index]
}
let _val = parseInt(val) * scale
// 5 ms a step
const remainder = parseInt(_val) % 5
if (remainder !== 0) {
_val = parseInt(_val) + (5 - remainder)
}
return _val * 10
},
outputReadabilityData: (val, scale = 1, index = -1) => {
if (index >= 0) {
val = val[index]
}
return parseFloat(val) / 10 / scale
},
},
CURR_REC: {
type: 'number-array',
showName: 'Current Recording Period',
componentType: 'input-range-slider',
range: Object.freeze({ min: 0, max: 100 }),
defaultValue: [
[35, 90],
[35, 99],
[35, 95],
[35, 95],
],
defaultUnit: '%',
unit: {
'%': 1,
},
outputRawData: (val, scale = 1, index = -1) => {
if (index >= 0) {
val = val[index]
}
return val
},
outputReadabilityData: (val, scale = 1, index = -1) => {
if (index >= 0) {
val = val[index]
}
return val
},
sliderStep: 5,
},
segment_order: {
type: 'number-array',
range: Object.freeze({ min: -1, max: 3 }),
defaultValue: [0, 1, -1, -1],
outputRawData: (val, scale = 1, index = -1) => {
if (index === -1) {
return val
} else {
return val[index]
}
},
outputReadabilityData: (val, scale = 1, index = -1) => {
if (index === -1) {
return val
} else {
return val[index]
}
},
},
DATA_OUTPUT: {
type: 'array',
showName: 'Data Output',
range: ['Average', 'Raw Data'],
defaultValue: 0,
func: (val) => {
const outputArr = ['Average', 'Raw Data']
return outputArr.indexOf(val.toString())
},
rev_func: (idx) => {
const outputArr = ['Average', 'Raw Data']
return outputArr[parseInt(idx)]
},
},
DPV_mode: {
type: 'array',
showName: 'DPV-mode',
componentType: 'None',
options: [
{ value: 0, label: 'AUTO' },
{ value: 1, label: 'ADVANCED' },
{ value: 2, label: 'ENGINEERING' },
],
range: ['AUTO', 'ADVANCED', 'ENGINEERING'],
defaultValue: 1,
outputRawData: (val) => {
const speedArr = ['AUTO', 'ADVANCED', 'ENGINEERING']
return speedArr.indexOf(val.toString())
},
outputReadabilityData: (idx) => {
const speedArr = ['AUTO', 'ADVANCED', 'ENGINEERING']
return speedArr[parseInt(idx)]
},
},
DPV_e_init: {
type: 'number',
showName: 'E-Initial',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 20000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_e_1: {
type: 'number',
showName: 'E1',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 35000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_e_2: {
type: 'number',
showName: 'E2',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 15000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_e_final: {
type: 'number',
showName: 'E-Final',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 30000,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_increment: {
type: 'number',
showName: 'Increment',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25025,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_amp: {
type: 'number',
showName: 'Pulse Amplitude',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 50000 }),
defaultValue: 25125,
defaultUnit: 'mV',
downloadUnit: 'mV',
unit: {
mV: 1,
V: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale * 5 + 25000)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt((parseFloat(val) - 25000) / 5) / scale
},
},
DPV_pul_width: {
type: 'number',
showName: 'Pulse Width',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 1e6 }),
defaultValue: 50,
defaultUnit: 'ms',
downloadUnit: 'ms',
unit: {
ms: 1,
s: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt(parseFloat(val)) / scale
},
},
DPV_step_time: {
type: 'number',
showName: 'Period',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 1e6 }),
defaultValue: 500,
defaultUnit: 'ms',
downloadUnit: 'ms',
unit: {
ms: 1,
s: 1e3,
},
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt(parseFloat(val)) / scale
},
},
DPV_pulse_option: {
type: 'boolean',
showName: 'Pulse Option',
componentType: 'input-option',
description: 'Invert pulses during E1 to E2',
defaultValue: false,
},
DPV_curr_rec: {
type: 'array',
showName: 'Pre- / Post-Pulse Width',
componentType: 'input-double-range',
range: Object.freeze({ min: 0, max: 100 }),
defaultValue: [25, 100],
outputRawData: (val, scale = 1) => {
return parseInt(parseFloat(val) * scale)
},
outputReadabilityData: (val, scale = 1) => {
return parseInt(parseFloat(val)) / scale
},
},
DPV_notify_rate: {
type: 'number',
showName: 'Sample Rate',
componentType: 'input-field',
range: Object.freeze({ min: 0, max: 1000 }),
defaultValue: 1000,
defaultUnit: 'sps',
downloadUnit: 'sps',
unit: {
sps: 1,
},
outputRawData: (val, scale = 1) => {
return parseFloat(val) * 10
},
outputReadabilityData: (val, scale = 1) => {
return parseFloat(val) / 10
},
},
DPV_engineering_enable: {
type: 'boolean',
showName: '',
componentType: 'input-toggle',
defaultValue: false,
},
MODE_OPTIONS: [
{
id: 17,
description: 'Idle',
img_src: 'IV-Wire',
highz: 1,
},
{
id: 0,
description: 'I-V Curve',
img_src: 'IV-Wire',
highz: 1,
},
{
id: 1,
description: 'Cycle I-V',
img_src: 'CIV-Wire',
highz: 1,
},
{
id: 2,
description: 'Function Generator',
img_src: 'FG-Wire',
highz: 1,
},
{
id: 3,
description: 'R-T Graph',
img_src: 'RT-Wire',
highz: 1,
},
{
id: 4,
description: 'V-T Graph',
img_src: 'VT-Wire',
highz: 0,
},
{
id: 5,
description: 'I-T Graph',
img_src: 'IT-Wire',
highz: 1,
},
{
id: 6,
description: 'Constant Current',
img_src: 'CC-Wire',
highz: 1,
},
{
id: 13,
description: 'Open Circuit Potential',
img_src: 'OCP-Wire',
highz: 0,
},
{
id: 7,
description: 'Cyclic Voltammetry',
img_src: 'CV-Wire',
highz: 1,
},
{
id: 8,
description: 'Linear Sweep Voltammetry',
img_src: 'LSV-Wire',
highz: 1,
},
{
id: 9,
description: 'Chronoamperometry',
img_src: 'CG-Wire',
highz: 1,
},
{
id: 16,
description: 'Chronopotentiometry',
img_src: 'CC-Wire',
highz: 1,
},
{
id: 14,
description: 'Pulse Sensing',
img_src: 'PS-Wire',
highz: 1,
},
{
id: 15,
description: 'Differential Pulse Voltammetry (DPV)',
img_src: 'DPV-Wire',
highz: 1,
},
{
id: 12,
description: 'Dev Mode',
img_src: 'DevM-Wire',
},
{
id: 10,
description: 'Cali DAC - test',
img_src: 'CDAC-Wire',
},
{
id: 11,
description: 'Cali Mode - test',
img_src: 'CADC-Wire',
},
],
MODE: {
0: IV,
1: CycleIV,
2: FunctionGenerator,
3: RT,
4: VT,
5: IT,
6: ConstantCurrent,
7: CyclicVoltammetry,
8: LinearSweep,
9: Chronoamperometry,
10: CaliDAC,
11: CaliADC,
12: DevMode,
13: OCP,
14: PulseSensing,
15: DPV,
16: Chronopotentiometry,
17: Idle,
},
}
export default EliteZM15