Compare commits

...

26 Commits

Author SHA1 Message Date
Roy 9b1ed3cd79 update instruction of setting adc gain 2023-01-12 16:04:25 +08:00
Roy 0d0427ed14 [update] receive hsrtia & lprtia gain level 2022-11-09 17:19:48 +08:00
Roy d434509c5b [update] new hsrtia function 2022-11-09 16:03:45 +08:00
Roy 787d76d48c [update] update eis instruction 2022-11-08 17:55:20 +08:00
Roy 50f2432088 [update] update number of mode 2022-11-08 17:28:03 +08:00
Roy 1cff19ac58 [update] update GENERAL_HS_RTIA parameter 2022-11-08 16:13:20 +08:00
Roy baef447c0e [update] update EIS_AVERAGE_NUM parameter 2022-11-08 15:57:52 +08:00
Roy ee9c13d4c5 [update] update EIS_DELAY parameter 2022-11-08 15:44:57 +08:00
Roy 9076f2f10b [update] update EIS_SCALE parameter 2022-11-08 15:36:22 +08:00
Roy 9b2e2964b0 [update] update EIS_PPD parameter 2022-11-08 14:49:07 +08:00
Roy 2622109c89 [update] update EIS_FREQ parameter 2022-11-08 14:35:32 +08:00
Roy a3fe6b87af [update] update EIS_AC_AMP parameter 2022-11-08 14:24:07 +08:00
Roy 64419ca1c5 [update] update EIS_DC_BIAS parameter 2022-11-08 14:17:31 +08:00
Roy 7d77c44741 [update] update EIS_FREQ parameter 2022-11-08 12:09:42 +08:00
Roy 29b4dd5cc7 [update] update EIS_FREQ parameter 2022-11-08 12:07:49 +08:00
Roy f151ae6fce [update] delete FREQ_START & FREQ_STOP parameter 2022-11-08 11:08:01 +08:00
peterlu14 e535e3d2b1 Merge remote-tracking branch 'origin/EIS_10test' into release/v1.7.0/fix_EIS_freq-RT 2022-11-08 09:38:19 +08:00
10 06c36aa737 Merge remote-tracking branch 'origin/dev/RT_mode' into EIS_10test 2022-11-07 16:54:28 +08:00
10 402022c451 cutoff freq 2022-11-07 16:44:54 +08:00
Roy 4daff72d39 [update] update RT mode 2022-10-27 17:43:16 +08:00
Roy f99719832a [update] short instruction for RT mode 2022-10-27 17:13:38 +08:00
Roy 58e09bfcda [update] hide mem board message 2022-10-26 10:23:50 +08:00
Roy 55780514b9 [update] new RT mode 2022-10-26 10:23:12 +08:00
peterlu14 936514871f [update] timeout 3 -> 5 2022-10-18 11:23:53 +08:00
10 fcc39dbfed Merge branch 'release/v1.6.9/fix_phase_90ToN90' into EIS_10test 2022-10-13 15:28:39 +08:00
10 1174d54bc0 fix phase in PEIS mode 2022-10-13 15:13:00 +08:00
9 changed files with 459 additions and 381 deletions
+16 -18
View File
@@ -1346,8 +1346,8 @@ class EISZeroOneDataDecoder(RecDataDecoder):
__slots__ = ('_message', '_cycle_number', '_start_return_data', '_time_stamp',
'_total_time_stamp', '_mode', '_cycle_start_time',
'_mode_stop', '_last_time_stamp', '_last_delta', '_cali_coeff',
'cali_coeff', '_ac_amp', '_mode', '_freq_start', '_freq_stop',
'_freq_direction', '_last_phase', '_first_phase_flag', '_show_data')
'cali_coeff', '_ac_amp', '_mode',
'_last_phase', '_first_phase_flag', '_show_data')
def __init__(self, cali_coeff: bytes = None):
super().__init__()
@@ -1362,9 +1362,6 @@ class EISZeroOneDataDecoder(RecDataDecoder):
self._cycle_start_time = []
self._ac_amp: int = 0
self._mode: int = 0
self._freq_start: int = 0
self._freq_stop: int = 0
self._freq_direction = 0
self._last_phase = 0
self._first_phase_flag = 1
@@ -1429,25 +1426,25 @@ class EISZeroOneDataDecoder(RecDataDecoder):
index = 60
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0]/1e8)
hsrtia_b.append(struct.unpack('>i', cali_coeff[index+5:index+9])[0]/1e8)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0]/1e4)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0])
#Lv[1] 20k
index = 80
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0]/1e8)
hsrtia_b.append(struct.unpack('>i', cali_coeff[index+5:index+9])[0]/1e8)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0]/1e4)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0])
#Lv[2] 5k
index = 100
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0]/1e8)
hsrtia_b.append(struct.unpack('>i', cali_coeff[index+5:index+9])[0]/1e8)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0]/1e4)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0])
#Lv[3] 200R
index = 120
hsrtia_a.append(struct.unpack('>i', cali_coeff[index+1:index+5])[0]/1e8)
hsrtia_b.append(struct.unpack('>i', cali_coeff[index+5:index+9])[0]/1e8)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0]/1e4)
hsrtia_c.append(struct.unpack('>i', cali_coeff[index+9:index+13])[0])
index = 140
g = 1
@@ -1530,7 +1527,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
time_stamp: float = struct.unpack('<I', data[13+3:17+3])[0] # unit: ms
cycle_number = struct.unpack('>H', data[17+3:19+3])[0]
d19 = data[19+3]
gain = (d19 & 0x0F)
gain = data[20+3]
finishMode = (d19 & 0x80) >> 7
if time_stamp == 0:
@@ -1557,10 +1554,6 @@ class EISZeroOneDataDecoder(RecDataDecoder):
cutoff_freq, phase_coeff, phase_offset, hsrtia_a, hsrtia_b, hsrtia_c, hsrtia_d = self.cali_coeff[0]
voltage_amp = round(self._ac_amp * 800 / 2047) # use UI value
if (self._freq_start > self._freq_stop):
self._freq_direction = 0
else:
self._freq_direction = 1
if (self._mode == 0):
img = ch1
@@ -1568,12 +1561,17 @@ class EISZeroOneDataDecoder(RecDataDecoder):
freq = ch3
fre_idx = 0
voltage_mag = math.sqrt(img ** 2 + real ** 2) * (1 + freq ** 2 / cutoff_freq ** 2)
rolloff_cali = cutoff_freq/1e5
voltage_mag = math.sqrt(img ** 2 + real ** 2) * (1 + freq ** 2 / rolloff_cali ** 2 / 1e4)
# if (gain == 3):
# current = hsrtia_a[gain] * math.exp(hsrtia_b[gain] * voltage_mag) + hsrtia_c[gain] * math.exp(hsrtia_d[gain] * voltage_mag)
# else:
current = voltage_mag ** 2 * hsrtia_a[gain] + voltage_mag * hsrtia_b[gain] + hsrtia_c[gain]
current = voltage_mag ** 2 * hsrtia_a[gain] + voltage_mag * hsrtia_b[gain]
# current = voltage_mag ** 2 * hsrtia_a[gain] + voltage_mag * hsrtia_b[gain] + hsrtia_c[gain]
# print(current)
# print(voltage_mag)
# print(hsrtia_a[gain])
@@ -1631,7 +1629,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
'|', '{:5}'.format(round(current, 3)),
'|', '{:1}'.format(gain),
'|', '{:1}'.format(finishMode),
'@', str(self.device), '|')
'@', str(self.device), '|', flush = True)
pass
else:
print('|', '{:10}'.format(time_stamp),
@@ -1642,7 +1640,7 @@ class EISZeroOneDataDecoder(RecDataDecoder):
'|', '{:5}'.format(cycle_number),
'|', '{:1}'.format(gain),
'|', '{:1}'.format(finishMode),
'@', str(self.device), '|')
'@', str(self.device), '|', flush = True)
pass
if finishMode == True:
+2 -2
View File
@@ -227,7 +227,7 @@ class MultiExtMemSpiInterface(LowLevelHardwareInterface):
def recv_memory(self, device: int) -> Optional[bytes]:
# self.pin_busy.output(False)
print('mem_req==ram_sel,[', self._pin_mem_req_value[device], ',', self._pin_ram_sel_value[device], ']')
# print('mem_req==ram_sel,[', self._pin_mem_req_value[device], ',', self._pin_ram_sel_value[device], ']')
rx = []
@@ -312,7 +312,7 @@ class MultiExtMemSpiInterface(LowLevelHardwareInterface):
return None
# print('data=', list(data))
print('Ram:', data[62])
# print('Ram:', data[62])
if (length >= 4000):
flag_print = True
+2
View File
@@ -227,8 +227,10 @@ class Project(threading.Thread):
if action.type == 'start':
self._count += 1
for instruction in instruction_set:
print('instruction 1', device, instruction, datetime.now())
args = list(map(lambda arg: task_info[arg], instruction['arguments']))
target=getattr(device, instruction['method'])(*args)
print('instruction 2', device, instruction, datetime.now())
delay_time += (time() - now)
+1 -1
View File
@@ -656,7 +656,7 @@ class DataServer(SocketServer, DataAPI):
sync = self.get_spi_obj()
busy = sync.get_pin_busy()
print('pin_busy=', busy, device, datetime.now())
# print('pin_busy=', busy, device, datetime.now())
if sync.get_pin_mem_req() == sync.get_pin_ram_sel():
spi_data = sync.recv_memory(device)
+1 -3
View File
@@ -155,9 +155,7 @@ class RecordingProcess(Process):
elif isinstance(decoder, EISZeroOneDataDecoder):
# get amp_gain from meta file
decoder._mode = self._meta_file.configuration.get_parameter('MODE')
decoder._ac_amp = self._meta_file.configuration.get_parameter('AC_AMP')
decoder._freq_start = self._meta_file.configuration.get_parameter('FREQ_START')
decoder._freq_stop = self._meta_file.configuration.get_parameter('FREQ_STOP')
decoder._ac_amp = self._meta_file.configuration.get_parameter('EIS_AC_AMP')
return decoder
+1 -1
View File
@@ -93,7 +93,7 @@ class SocketClient(metaclass=abc.ABCMeta):
if self._socket is None:
try:
self._socket = Socket(AF_UNIX, SOCK_STREAM)
self._socket.settimeout(3)
self._socket.settimeout(5)
self._socket.connect(self._socket_file)
except Exception as e:
print('open_socket error:', e)
+166 -118
View File
@@ -9,7 +9,7 @@
"minor_version_number": 0
},
"constant": {
"FREQ_MAX": 4294967296,
"FREQ_MAX": 13333334,
"VOLT_MAX": 65536,
"BLE_WRITE_MAX": 255,
"TIME_MAX": 100000
@@ -32,12 +32,6 @@
"domain": "property",
"value": "[0, 1, 2]"
},
"CHANNEL_LABEL": {
"description": "channel label",
"record_meta": true,
"domain": "property",
"value": "['current', 'voltage', 'impedance']"
},
"SAMPLE_RATE": {
"description": "data sampling rate",
"record_meta": true,
@@ -63,11 +57,45 @@
"EIS CURVE",
"Cyclic Voltammetry",
"Chronoamperometric",
"V-T Graph",
"R-T Graph",
"Dev Mode"
]
},
"FREQ": {
"description": "DPV current recording period start",
"GENERAL_HS_RTIA": {
"description": "High speed rtia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
],
"on_change": "set_general_hs_rtia"
},
"EIS_DC_BIAS": {
"description": "DC voltage bias",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"EIS_AC_AMP": {
"description": "AC Amplitude",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"EIS_FREQ": {
"description": "[start, stop] of frequency scan",
"record_meta": true,
"initial": [
13333333,
@@ -80,29 +108,24 @@
},
"value": "VALUE"
},
"FREQ_START": {
"description": "Start of Freq Scan",
"EIS_PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 13422819,
"initial": 10,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
11
]
},
"FREQ_STOP": {
"description": "End of Freq Scan",
"EIS_SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 7,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
"initial": 0,
"value": [
0,
1
]
},
"DELAY": {
"EIS_DELAY": {
"description": "Wait x peroid before start taking measurements",
"record_meta": true,
"initial": 0,
@@ -113,65 +136,18 @@
"expression": "VALUE"
}
},
"AVERAGE_NUM": {
"EIS_AVERAGE_NUM": {
"description": "Number of sample used for average funciton",
"record_meta": true,
"initial": 8,
"value": [
2,
4,
8,
16
]
},
"DC_BIAS": {
"description": "DC voltage bias in mV",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"AC_AMP": {
"description": "AC Amplitude in mV",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 0,
"value": [
0,
1
]
},
"PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 10,
"domain": [
11
]
},
"RTIA": {
"description": "High speed tia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
6,
8
]
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -219,8 +195,7 @@
"1",
"2",
"auto"
],
"on_change": "set_adc_gain_Vin"
]
},
"VOLT_INITIAL": {
"description": "Initial Voltage of Scan",
@@ -277,6 +252,29 @@
"expression": "VALUE"
}
},
"MEASURE_VIN_RANGE": {
"description": "measure range of Vin",
"record_meta": true,
"initial": 0,
"value": [
"0",
"1",
"2",
"auto"
]
},
"RT_VOLT_SET": {
"description": "DAC output Voltage",
"record_meta": true,
"initial": 37500,
"domain": [
65536
],
"value": {
"expression": "VALUE"
},
"on_change": "set_para_RT_VOLT_SET"
},
"BLE_WRITE": {
"description": "send msg to elite",
"domain": {
@@ -307,15 +305,11 @@
{
"expression": "MODE",
"when": {
"0": "set_general_hs_rtia",
"1": "set_adc_gain_I",
"2": "set_adc_gain_I"
}
},
{
"expression": "MODE",
"when": {
"1": "set_adc_gain_Vin",
"2": "set_adc_gain_Vin"
"2": "set_adc_gain_I",
"3": "set_adc_gain_I",
"4": "set_adc_gain_I"
}
},
{
@@ -323,7 +317,9 @@
"when": {
"0": "curve_eis",
"1": "curve_cv3",
"2": "curve_const_vscan"
"2": "curve_const_vscan",
"3": "curve_vt",
"4": "curve_rt"
}
},
{
@@ -333,6 +329,12 @@
"1": "curve_cv3_para2"
}
},
{
"expression": "MODE",
"when": {
"0": "curve_eis_mode"
}
},
"_sync(True)",
"VIS_STI"
],
@@ -350,6 +352,12 @@
"data_format_cali": [
"_data_format_cali('EISZeroOne')"
],
"set_general_hs_rtia": {
"type": "RIS",
"data": [
"1XFF;1X70;1B>GENERAL_HS_RTIA"
]
},
"set_sample_rate": {
"type": "RIS",
"parameter": {
@@ -365,12 +373,6 @@
"XE1;X05;B>ADC_LEVEL_I_15"
]
},
"set_adc_gain_Vin": {
"type": "RIS",
"data": [
"XE1;X06;B>ADC_LEVEL_V_IN_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -380,35 +382,41 @@
"curve_eis": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X01;4B>fa;4B>fb;2B>dp"
"1X12;1X01;4B>fa;4B>fb;2B>dp"
]
},
"curve_eis_para2": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
"1X12;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
]
},
"curve_eis_mode": {
"type": "RIS",
"data": [
"1X12;1XFF"
]
},
"curve_cv3": {
@@ -422,7 +430,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X01;2B>va;2B>vb;2B>vc;"
"1X09;1X01;2B>va;2B>vb;2B>vc;"
]
},
"curve_cv3_para2": {
@@ -436,7 +444,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
"1X09;1X02;4B>ve;2B>vf;2B>cn"
]
},
"curve_const_vscan": {
@@ -449,13 +457,53 @@
"pe": "SAMPLE_RATE"
},
"data": [
"1XD3;",
"1X0B;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe"
]
},
"curve_rt": {
"type": "RIS",
"parameter": {
"va": "RT_VOLT_SET",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pd": "CTRL_HIGH_Z_15",
"pe": "SAMPLE_RATE"
},
"data": [
"X04;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe"
]
},
"curve_vt": {
"type": "RIS",
"parameter": {
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pd": "CTRL_HIGH_Z_15",
"pe": "SAMPLE_RATE",
"va": "MEASURE_VIN_RANGE"
},
"data": [
"X05;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe;",
"1B>va"
]
},
"set_para_RT_VOLT_SET": {
"type": "RIS",
"data": [
"XE2;X01;2B>RT_VOLT_SET"
]
},
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
+135 -119
View File
@@ -9,7 +9,7 @@
"minor_version_number": 1
},
"constant": {
"FREQ_MAX": 4294967296,
"FREQ_MAX": 13333334,
"VOLT_MAX": 65536,
"BLE_WRITE_MAX": 255,
"TIME_MAX": 100000
@@ -32,12 +32,6 @@
"domain": "property",
"value": "[0, 1, 2]"
},
"CHANNEL_LABEL": {
"description": "channel label",
"record_meta": true,
"domain": "property",
"value": "['current', 'voltage', 'impedance']"
},
"SAMPLE_RATE": {
"description": "data sampling rate",
"record_meta": true,
@@ -64,11 +58,44 @@
"Cyclic Voltammetry",
"Chronoamperometric",
"V-T Graph",
"R-T Graph",
"Dev Mode"
]
},
"FREQ": {
"description": "DPV current recording period start",
"GENERAL_HS_RTIA": {
"description": "High speed rtia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
],
"on_change": "set_general_hs_rtia"
},
"EIS_DC_BIAS": {
"description": "DC voltage bias",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"EIS_AC_AMP": {
"description": "AC Amplitude",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"EIS_FREQ": {
"description": "[start, stop] of frequency scan",
"record_meta": true,
"initial": [
13333333,
@@ -81,29 +108,24 @@
},
"value": "VALUE"
},
"FREQ_START": {
"description": "Start of Freq Scan",
"EIS_PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 13422819,
"initial": 10,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
11
]
},
"FREQ_STOP": {
"description": "End of Freq Scan",
"EIS_SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 7,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
"initial": 0,
"value": [
0,
1
]
},
"DELAY": {
"EIS_DELAY": {
"description": "Wait x peroid before start taking measurements",
"record_meta": true,
"initial": 0,
@@ -114,65 +136,18 @@
"expression": "VALUE"
}
},
"AVERAGE_NUM": {
"EIS_AVERAGE_NUM": {
"description": "Number of sample used for average funciton",
"record_meta": true,
"initial": 8,
"value": [
2,
4,
8,
16
]
},
"DC_BIAS": {
"description": "DC voltage bias in mV",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"AC_AMP": {
"description": "AC Amplitude in mV",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 0,
"value": [
0,
1
]
},
"PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 10,
"domain": [
11
]
},
"RTIA": {
"description": "High speed tia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
6,
8
]
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -220,8 +195,7 @@
"1",
"2",
"auto"
],
"on_change": "set_adc_gain_Vin"
]
},
"VOLT_INITIAL": {
"description": "Initial Voltage of Scan",
@@ -289,6 +263,18 @@
"auto"
]
},
"RT_VOLT_SET": {
"description": "DAC output Voltage",
"record_meta": true,
"initial": 37500,
"domain": [
65536
],
"value": {
"expression": "VALUE"
},
"on_change": "set_para_RT_VOLT_SET"
},
"BLE_WRITE": {
"description": "send msg to elite",
"domain": {
@@ -319,17 +305,11 @@
{
"expression": "MODE",
"when": {
"0": "set_general_hs_rtia",
"1": "set_adc_gain_I",
"2": "set_adc_gain_I",
"3": "set_adc_gain_I"
}
},
{
"expression": "MODE",
"when": {
"1": "set_adc_gain_Vin",
"2": "set_adc_gain_Vin",
"3": "set_adc_gain_Vin"
"3": "set_adc_gain_I",
"4": "set_adc_gain_I"
}
},
{
@@ -338,7 +318,8 @@
"0": "curve_eis",
"1": "curve_cv3",
"2": "curve_const_vscan",
"3": "curve_vt"
"3": "curve_vt",
"4": "curve_rt"
}
},
{
@@ -348,6 +329,12 @@
"1": "curve_cv3_para2"
}
},
{
"expression": "MODE",
"when": {
"0": "curve_eis_mode"
}
},
"_sync(True)",
"VIS_STI"
],
@@ -365,6 +352,12 @@
"data_format_cali": [
"_data_format_cali('EISZeroOne')"
],
"set_general_hs_rtia": {
"type": "RIS",
"data": [
"1XFF;1X70;1B>GENERAL_HS_RTIA"
]
},
"set_sample_rate": {
"type": "RIS",
"parameter": {
@@ -380,12 +373,6 @@
"XE1;X05;B>ADC_LEVEL_I_15"
]
},
"set_adc_gain_Vin": {
"type": "RIS",
"data": [
"XE1;X06;B>ADC_LEVEL_V_IN_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -395,35 +382,41 @@
"curve_eis": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X01;4B>fa;4B>fb;2B>dp"
"1X12;1X01;4B>fa;4B>fb;2B>dp"
]
},
"curve_eis_para2": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
"1X12;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
]
},
"curve_eis_mode": {
"type": "RIS",
"data": [
"1X12;1XFF"
]
},
"curve_cv3": {
@@ -437,7 +430,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X01;2B>va;2B>vb;2B>vc;"
"1X09;1X01;2B>va;2B>vb;2B>vc;"
]
},
"curve_cv3_para2": {
@@ -451,7 +444,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
"1X09;1X02;4B>ve;2B>vf;2B>cn"
]
},
"curve_const_vscan": {
@@ -464,7 +457,24 @@
"pe": "SAMPLE_RATE"
},
"data": [
"1XD3;",
"1X0B;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe"
]
},
"curve_rt": {
"type": "RIS",
"parameter": {
"va": "RT_VOLT_SET",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pd": "CTRL_HIGH_Z_15",
"pe": "SAMPLE_RATE"
},
"data": [
"X04;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
@@ -488,6 +498,12 @@
"1B>va"
]
},
"set_para_RT_VOLT_SET": {
"type": "RIS",
"data": [
"XE2;X01;2B>RT_VOLT_SET"
]
},
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -9,7 +9,7 @@
"minor_version_number": 2
},
"constant": {
"FREQ_MAX": 4294967296,
"FREQ_MAX": 13333334,
"VOLT_MAX": 65536,
"BLE_WRITE_MAX": 255,
"TIME_MAX": 100000
@@ -32,12 +32,6 @@
"domain": "property",
"value": "[0, 1, 2]"
},
"CHANNEL_LABEL": {
"description": "channel label",
"record_meta": true,
"domain": "property",
"value": "['current', 'voltage', 'impedance']"
},
"SAMPLE_RATE": {
"description": "data sampling rate",
"record_meta": true,
@@ -64,11 +58,44 @@
"Cyclic Voltammetry",
"Chronoamperometric",
"V-T Graph",
"R-T Graph",
"Dev Mode"
]
},
"FREQ": {
"description": "DPV current recording period start",
"GENERAL_HS_RTIA": {
"description": "High speed rtia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
],
"on_change": "set_general_hs_rtia"
},
"EIS_DC_BIAS": {
"description": "DC voltage bias",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"EIS_AC_AMP": {
"description": "AC Amplitude",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"EIS_FREQ": {
"description": "[start, stop] of frequency scan",
"record_meta": true,
"initial": [
13333333,
@@ -81,29 +108,24 @@
},
"value": "VALUE"
},
"FREQ_START": {
"description": "Start of Freq Scan",
"EIS_PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 13422819,
"initial": 10,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
11
]
},
"FREQ_STOP": {
"description": "End of Freq Scan",
"EIS_SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 7,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
"initial": 0,
"value": [
0,
1
]
},
"DELAY": {
"EIS_DELAY": {
"description": "Wait x peroid before start taking measurements",
"record_meta": true,
"initial": 0,
@@ -114,65 +136,18 @@
"expression": "VALUE"
}
},
"AVERAGE_NUM": {
"EIS_AVERAGE_NUM": {
"description": "Number of sample used for average funciton",
"record_meta": true,
"initial": 8,
"value": [
2,
4,
8,
16
]
},
"DC_BIAS": {
"description": "DC voltage bias in mV",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"AC_AMP": {
"description": "AC Amplitude in mV",
"record_meta": true,
"initial": 25,
"domain": [
2048
]
},
"SCALE": {
"description": "Point spacing pattern",
"record_meta": true,
"initial": 0,
"value": [
0,
1
]
},
"PPD": {
"description": "Point per decades",
"record_meta": true,
"initial": 10,
"domain": [
11
]
},
"RTIA": {
"description": "High speed tia gain",
"record_meta": true,
"initial": 4,
"value": [
0,
1,
2,
3,
4
6,
8
]
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -220,8 +195,7 @@
"1",
"2",
"auto"
],
"on_change": "set_adc_gain_Vin"
]
},
"VOLT_INITIAL": {
"description": "Initial Voltage of Scan",
@@ -289,6 +263,18 @@
"auto"
]
},
"RT_VOLT_SET": {
"description": "DAC output Voltage",
"record_meta": true,
"initial": 37500,
"domain": [
65536
],
"value": {
"expression": "VALUE"
},
"on_change": "set_para_RT_VOLT_SET"
},
"BLE_WRITE": {
"description": "send msg to elite",
"domain": {
@@ -319,17 +305,11 @@
{
"expression": "MODE",
"when": {
"0": "set_general_hs_rtia",
"1": "set_adc_gain_I",
"2": "set_adc_gain_I",
"3": "set_adc_gain_I"
}
},
{
"expression": "MODE",
"when": {
"1": "set_adc_gain_Vin",
"2": "set_adc_gain_Vin",
"3": "set_adc_gain_Vin"
"3": "set_adc_gain_I",
"4": "set_adc_gain_I"
}
},
{
@@ -338,7 +318,8 @@
"0": "curve_eis",
"1": "curve_cv3",
"2": "curve_const_vscan",
"3": "curve_vt"
"3": "curve_vt",
"4": "curve_rt"
}
},
{
@@ -348,6 +329,12 @@
"1": "curve_cv3_para2"
}
},
{
"expression": "MODE",
"when": {
"0": "curve_eis_mode"
}
},
"_sync(True)",
"VIS_STI"
],
@@ -365,6 +352,12 @@
"data_format_cali": [
"_data_format_cali('EISZeroOne')"
],
"set_general_hs_rtia": {
"type": "RIS",
"data": [
"1XFF;1X70;1B>GENERAL_HS_RTIA"
]
},
"set_sample_rate": {
"type": "RIS",
"parameter": {
@@ -380,12 +373,6 @@
"XE1;X05;B>ADC_LEVEL_I_15"
]
},
"set_adc_gain_Vin": {
"type": "RIS",
"data": [
"XE1;X06;B>ADC_LEVEL_V_IN_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -395,35 +382,41 @@
"curve_eis": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X01;4B>fa;4B>fb;2B>dp"
"1X12;1X01;4B>fa;4B>fb;2B>dp"
]
},
"curve_eis_para2": {
"type": "RIS",
"parameter": {
"fa": "FREQ[0]",
"fb": "FREQ[1]",
"dp": "DELAY",
"dc": "DC_BIAS",
"am": "AC_AMP",
"an": "AVERAGE_NUM",
"rt": "RTIA",
"pp": "PPD",
"sp": "SCALE"
"fa": "EIS_FREQ[0]",
"fb": "EIS_FREQ[1]",
"dp": "EIS_DELAY",
"dc": "EIS_DC_BIAS",
"am": "EIS_AC_AMP",
"an": "EIS_AVERAGE_NUM",
"rt": "GENERAL_HS_RTIA",
"pp": "EIS_PPD",
"sp": "EIS_SCALE"
},
"data": [
"1XD1;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
"1X12;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
]
},
"curve_eis_mode": {
"type": "RIS",
"data": [
"1X12;1XFF"
]
},
"curve_cv3": {
@@ -437,7 +430,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X01;2B>va;2B>vb;2B>vc;"
"1X09;1X01;2B>va;2B>vb;2B>vc;"
]
},
"curve_cv3_para2": {
@@ -451,7 +444,7 @@
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
"1X09;1X02;4B>ve;2B>vf;2B>cn"
]
},
"curve_const_vscan": {
@@ -464,7 +457,24 @@
"pe": "SAMPLE_RATE"
},
"data": [
"1XD3;",
"1X0B;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
"2B>pe"
]
},
"curve_rt": {
"type": "RIS",
"parameter": {
"va": "RT_VOLT_SET",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pd": "CTRL_HIGH_Z_15",
"pe": "SAMPLE_RATE"
},
"data": [
"X04;",
"2B>va;",
"4b>pa;4b>pb;",
"4b>0;4b>pd;",
@@ -488,6 +498,12 @@
"1B>va"
]
},
"set_para_RT_VOLT_SET": {
"type": "RIS",
"data": [
"XE2;X01;2B>RT_VOLT_SET"
]
},
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"