Compare commits

..

10 Commits

Author SHA1 Message Date
peterlu14 ead98fe8da [debug] fix running_task is None bug 2022-08-10 14:03:04 +08:00
peterlu14 dc4e1bd233 Merge branch 'dev/fix_final_data_loss' into dev/cc_cp_separate 2022-08-05 10:27:33 +08:00
peterlu14 42025d2243 [update] fix cp mode voltage problem 2022-08-05 10:26:13 +08:00
Roy b341dbf073 [update] update instruction of cp mode 2022-08-04 18:12:23 +08:00
Roy 20f6f126b0 [update] fix STEP_TIME para 2022-08-04 16:48:51 +08:00
Roy bf4a00db1a [update] remove CC_ZERO instruction 2022-07-29 11:24:29 +08:00
peterlu14 0b7a650b95 [debug] fix final data loss & flag stop after writer write 2022-07-29 11:11:46 +08:00
Roy 062613c681 [update] fix step time on IV & Cycle-IV mode 2022-07-28 16:36:34 +08:00
Roy bffaff310b [update] update file name of elite library 2022-07-26 13:14:37 +08:00
Roy 06bf262d59 [update] new device library for elite eis1.1 mini 2022-07-13 10:03:40 +08:00
15 changed files with 526 additions and 253 deletions
+1 -5
View File
@@ -885,12 +885,8 @@ class I4V4Z4T4DataDecoder(RecDataDecoder):
mem_cnt = data[1]
time_stamp: float = struct.unpack('<I', data[4:8])[0] # unit: ms 0x18030000
current = struct.unpack('<i', data[8:12])[0] # unit: nA
ch2 = struct.unpack('<i', data[12:16])[0] # unit: uV
voltage = struct.unpack('<i', data[12:16])[0] # unit: uV
impedance = struct.unpack('<i', data[16:20])[0] # unit: mOm
if self._mode == 16:
voltage = impedance - ch2
else:
voltage = ch2
cycle_number = struct.unpack('<H', data[20:22])[0]
finish_mode_falg = data[22]
-5
View File
@@ -651,8 +651,6 @@ class DeviceInstruction:
VIS_DEVICE_DONE = 0x20
"""identify device done"""
VIS_CC_ZERO = 0x40
VIS_STI = 0xC0
"""stimulation on virtual instruction"""
@@ -726,7 +724,6 @@ class DeviceCommonInstruction:
STOP_STIMULATE = "stop_stimulate"
VIS_DEVICE_DETECT = 'VIS_DEVICE_DETECT'
VIS_DEVICE_DONE = 'VIS_DEVICE_DONE'
VIS_CC_ZERO = 'VIS_CC_ZERO'
CIS_VOLT = 'CIS_VOLT'
CIS_VERSION = 'CIS_VERSION'
@@ -750,8 +747,6 @@ class DeviceCommonInstruction:
return 'VIS_DEVICE_DETECT',
elif instruction == cls.VIS_DEVICE_DONE:
return 'VIS_DEVICE_DONE',
elif instruction == cls.VIS_CC_ZERO:
return 'VIS_CC_ZERO',
elif instruction == cls.RECORD:
return 'VIS_STARTR',
elif instruction == cls.RECORD_ALL:
+4 -1
View File
@@ -211,6 +211,9 @@ class Project(threading.Thread):
return True
def as_json(self):
running_task = None
if self._task_manager.running_task is not None:
running_task = self._task_manager.running_task.as_json()
data = {
'id': self._id,
'name': self._name,
@@ -219,6 +222,6 @@ class Project(threading.Thread):
'status': self._status,
'device': self._device,
'task': self.task_list,
'running_task': self._task_manager.running_task.as_json()
'running_task': running_task
}
return data
+8 -5
View File
@@ -1131,14 +1131,17 @@ class RecordingFileWriter:
self._splitting_size = 0
return None
def close(self):
# if self._recording_file is not None:
# self._recording_file.close()
# self._recording_file = None
print('close1')
def close(self, mqtt_thread):
self._close = True
if len(self._recording_file_dict) > 0:
for ch in self._data_db.keys():
if len(self._data_rl[ch]) > 0:
self._data_rl[ch].append(str(int(self._time_now)))
mes = ' '.join(self._data_rl[ch])
mqtt_thread[ch].on_message(mes)
self._data_rl[ch].clear()
self._send_data[ch] = False
if self._recording_file_dict[ch]._status:
_data = ' '.join(self._data_db[ch])
self._raw_save['data'][ch] = _data
+20 -21
View File
@@ -229,25 +229,6 @@ class RecordingProcess(Process):
# except:
# pass
try:
time_duration = self._meta_file.configuration.get_parameter('TIME_DURATION')
if time_duration and time_duration is not 0 and time() - self._start_time >= time_duration:
self._queue_msg.put(['ds', self._device, 'interrupt'])
return None
if isinstance(self._decoder, I4V4Z4T4DataDecoder) or isinstance(self._decoder, EISZeroOneDataDecoder):
if self._decoder.isFinishMode is not None and self._decoder.isFinishMode() == 1:
self._queue_msg.put(['ds', self._device, 'interrupt'])
return None
# content = {}
# content['header'] = 'device_instruction/0'
# content['device'] = result.device
# content['instruction'] = 'interrupt'
# self._mqtt_thread.publish('device_instruction',json_stringify(content), True)
# self.server.stop_sync(self.device)
except RuntimeError as e:
print(e)
if result is not None:
##
if len(self._mqtt_send_data_ch_level) == 0:
@@ -264,9 +245,27 @@ class RecordingProcess(Process):
self._writer.channels_update(ret[0].channels())
self._writer.write(ret, self._mqtt_send_data_ch_level)
# print('write time: ', time() - ctime1)
# print(ret)
try:
time_duration = self._meta_file.configuration.get_parameter('TIME_DURATION')
if time_duration and time_duration is not 0 and time() - self._start_time >= time_duration:
self._queue_msg.put(['ds', self._device, 'interrupt'])
return None
if isinstance(self._decoder, I4V4Z4T4DataDecoder) or isinstance(self._decoder, EISZeroOneDataDecoder):
if self._decoder.isFinishMode is not None and self._decoder.isFinishMode() == 1:
self._queue_msg.put(['ds', self._device, 'interrupt'])
return None
# content = {}
# content['header'] = 'device_instruction/0'
# content['device'] = result.device
# content['instruction'] = 'interrupt'
# self._mqtt_thread.publish('device_instruction',json_stringify(content), True)
# self.server.stop_sync(self.device)
except RuntimeError as e:
print(e)
del ret
del data
return
@@ -607,7 +606,7 @@ class RecordingProcess(Process):
def final_write(self):
if self._writer is not None:
return self._writer.close()
return self._writer.close(self._mqtt_send_data_ch_level)
else:
return False
@@ -1,5 +1,5 @@
{
"name": "EliteZM15",
"name": "Elite_BAT_1.0",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -1633,16 +1633,6 @@
"dpv_engineering_mode_advanced": [
"dpv_advanced_mode"
],
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -1,5 +1,5 @@
{
"name": "Elite_EDC1",
"name": "Elite_EDC_1.4",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -492,14 +492,6 @@
"1XC0;1X02;4B>ve;2B>vf;4B>vg;B>cn"
]
},
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"curve_cv3_high_cycle": {
"type": "RIS",
"parameter": {
@@ -1,5 +1,5 @@
{
"name": "EliteZM15",
"name": "Elite_EDC_1.5",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -671,17 +671,6 @@
},
"on_change": "set_para_DAC_VOLT"
},
"DAC_VOLT_SCROLL": {
"description": "DAC scroll output Voltage",
"record_meta": true,
"initial": 25000,
"domain": [
65536
],
"value": {
"expression": "VALUE"
}
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -847,17 +836,6 @@
],
"on_change": "set_dac_gain_Vout"
},
"DAC_VOLT_BUTTON": {
"description": "DAC volt",
"record_meta": true,
"initial": 1,
"value": [
"10000",
"25000",
"50000",
"60000"
]
},
"CTRL_HIGH_Z_15": {
"description": "ctrl highZ level",
"record_meta": true,
@@ -873,8 +851,7 @@
"initial": 0,
"value": [
"Iin",
"Vin",
"Vout"
"Vin"
]
},
"BLE_WRITE": {
@@ -935,13 +912,11 @@
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"set_dac_gain_Vout",
{
"expression": "ADC_DAC_CHANNEL_15",
"when": {
"0": "cali_Iin",
"1": "cali_Vin",
"2": "cali_Vout"
"1": "cali_Vin"
}
},
"_sync(True)",
@@ -1032,6 +1007,12 @@
"XE0;2B>va"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_adc_gain_I": {
"type": "RIS",
"data": [
@@ -1044,12 +1025,6 @@
"XE1;X01;B>ADC_LEVEL_V_IN_15"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -1077,22 +1052,13 @@
"XF1;B>ADC_DAC_CHANNEL_15;B>ADC_LEVEL_V_IN_15"
]
},
"cali_Vout": {
"type": "RIS",
"parameter": {
"v": "DAC_VOLT_BUTTON"
},
"data": [
"XF1;B>ADC_DAC_CHANNEL_15;B>v"
]
},
"curve_iv": {
"type": "RIS",
"parameter": {
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pc": "DAC_LEVEL_V_OUT_15",
@@ -1113,7 +1079,7 @@
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"ve": "CYCLE_NUMBER",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
@@ -1667,16 +1633,6 @@
"dpv_engineering_mode_advanced": [
"dpv_advanced_mode"
],
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -1,12 +1,12 @@
{
"name": "EliteZM15",
"name": "Elite_EDC_1.5r2",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
"major_product_number": 0,
"minor_product_number": 2,
"major_version_number": 1,
"minor_version_number": 6
"minor_version_number": 8
},
"constant": {
"TIME_MAX": 100000,
@@ -671,17 +671,6 @@
},
"on_change": "set_para_DAC_VOLT"
},
"DAC_VOLT_SCROLL": {
"description": "DAC scroll output Voltage",
"record_meta": true,
"initial": 25000,
"domain": [
65536
],
"value": {
"expression": "VALUE"
}
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -847,17 +836,6 @@
],
"on_change": "set_dac_gain_Vout"
},
"DAC_VOLT_BUTTON": {
"description": "DAC volt",
"record_meta": true,
"initial": 1,
"value": [
"10000",
"25000",
"50000",
"60000"
]
},
"CTRL_HIGH_Z_15": {
"description": "ctrl highZ level",
"record_meta": true,
@@ -873,8 +851,7 @@
"initial": 0,
"value": [
"Iin",
"Vin",
"Vout"
"Vin"
]
},
"BLE_WRITE": {
@@ -935,13 +912,11 @@
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"set_dac_gain_Vout",
{
"expression": "ADC_DAC_CHANNEL_15",
"when": {
"0": "cali_Iin",
"1": "cali_Vin",
"2": "cali_Vout"
"1": "cali_Vin"
}
},
"_sync(True)",
@@ -1032,6 +1007,12 @@
"XE0;2B>va"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_adc_gain_I": {
"type": "RIS",
"data": [
@@ -1044,12 +1025,6 @@
"XE1;X01;B>ADC_LEVEL_V_IN_15"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -1077,22 +1052,13 @@
"XF1;B>ADC_DAC_CHANNEL_15;B>ADC_LEVEL_V_IN_15"
]
},
"cali_Vout": {
"type": "RIS",
"parameter": {
"v": "DAC_VOLT_BUTTON"
},
"data": [
"XF1;B>ADC_DAC_CHANNEL_15;B>v"
]
},
"curve_iv": {
"type": "RIS",
"parameter": {
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pc": "DAC_LEVEL_V_OUT_15",
@@ -1113,7 +1079,7 @@
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"ve": "CYCLE_NUMBER",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
@@ -1667,16 +1633,6 @@
"dpv_engineering_mode_advanced": [
"dpv_advanced_mode"
],
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -1,12 +1,12 @@
{
"name": "EliteZM15",
"name": "Elite_EDC_1.5re",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
"major_product_number": 0,
"minor_product_number": 2,
"major_version_number": 1,
"minor_version_number": 6
"minor_version_number": 7
},
"constant": {
"TIME_MAX": 100000,
@@ -671,17 +671,6 @@
},
"on_change": "set_para_DAC_VOLT"
},
"DAC_VOLT_SCROLL": {
"description": "DAC scroll output Voltage",
"record_meta": true,
"initial": 25000,
"domain": [
65536
],
"value": {
"expression": "VALUE"
}
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
@@ -847,17 +836,6 @@
],
"on_change": "set_dac_gain_Vout"
},
"DAC_VOLT_BUTTON": {
"description": "DAC volt",
"record_meta": true,
"initial": 1,
"value": [
"10000",
"25000",
"50000",
"60000"
]
},
"CTRL_HIGH_Z_15": {
"description": "ctrl highZ level",
"record_meta": true,
@@ -873,8 +851,7 @@
"initial": 0,
"value": [
"Iin",
"Vin",
"Vout"
"Vin"
]
},
"BLE_WRITE": {
@@ -935,13 +912,11 @@
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"set_dac_gain_Vout",
{
"expression": "ADC_DAC_CHANNEL_15",
"when": {
"0": "cali_Iin",
"1": "cali_Vin",
"2": "cali_Vout"
"1": "cali_Vin"
}
},
"_sync(True)",
@@ -1032,6 +1007,12 @@
"XE0;2B>va"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_adc_gain_I": {
"type": "RIS",
"data": [
@@ -1044,12 +1025,6 @@
"XE1;X01;B>ADC_LEVEL_V_IN_15"
]
},
"set_dac_gain_Vout": {
"type": "RIS",
"data": [
"XE1;X02;B>DAC_LEVEL_V_OUT_15"
]
},
"set_ctrl_highZ": {
"type": "RIS",
"data": [
@@ -1077,22 +1052,13 @@
"XF1;B>ADC_DAC_CHANNEL_15;B>ADC_LEVEL_V_IN_15"
]
},
"cali_Vout": {
"type": "RIS",
"parameter": {
"v": "DAC_VOLT_BUTTON"
},
"data": [
"XF1;B>ADC_DAC_CHANNEL_15;B>v"
]
},
"curve_iv": {
"type": "RIS",
"parameter": {
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
"pc": "DAC_LEVEL_V_OUT_15",
@@ -1113,7 +1079,7 @@
"va": "VOLT_ORIGIN",
"vb": "VOLT_FINAL",
"vc": "VOLT_STEP",
"vd": "STEP_TIME * 0x12",
"vd": "STEP_TIME",
"ve": "CYCLE_NUMBER",
"pa": "ADC_LEVEL_I_15",
"pb": "ADC_LEVEL_V_IN_15",
@@ -1237,7 +1203,7 @@
"pe": "SAMPLE_RATE"
},
"data": [
"X07;",
"X0C;",
"B>va;4B>vb;2B>vc;2B>vd;",
"4b>pa;4b>pb;",
"4b>pc;4b>pd;",
@@ -1667,16 +1633,6 @@
"dpv_engineering_mode_advanced": [
"dpv_advanced_mode"
],
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"set_adc_gain_I",
"set_adc_gain_Vin",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -1,5 +1,5 @@
{
"name": "EliteEIS",
"name": "Elite_EIS_1.0",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -424,14 +424,6 @@
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
]
},
"VIS_CC_ZERO": [
"_data_format('EISZeroOne')",
"_disable_cache(False)",
"_notify(True)",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -1,5 +1,5 @@
{
"name": "EliteEIS",
"name": "Elite_EIS_1.1",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -424,14 +424,6 @@
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
]
},
"VIS_CC_ZERO": [
"_data_format('EISZeroOne')",
"_disable_cache(False)",
"_notify(True)",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
@@ -0,0 +1,451 @@
{
"name": "Elite_EIS_MINI_1.0",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
"major_product_number": 0,
"minor_product_number": 4,
"major_version_number": 1,
"minor_version_number": 2
},
"constant": {
"FREQ_MAX": 4294967296,
"VOLT_MAX": 65536,
"BLE_WRITE_MAX": 255,
"TIME_MAX": 100000
},
"parameters": {
"TIME_DURATION": {
"description": "Run duration",
"record_meta": true,
"initial": 0,
"domain": [
"TIME_MAX"
],
"value": {
"expression": "VALUE"
}
},
"CHANNEL": {
"derzteription": "record channels",
"record_meta": true,
"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,
"initial": 1000,
"domain": [
1001
],
"value": {
"expression": "VALUE"
},
"on_change": "set_sample_rate"
},
"AMP_GAIN": {
"description": "amp gain",
"record_meta": true,
"domain": "constant",
"value": 1
},
"MODE": {
"description": "working mode",
"record_meta": true,
"value": [
"EIS CURVE",
"Cyclic Voltammetry",
"Dev Mode"
]
},
"FREQ": {
"description": "DPV current recording period start",
"record_meta": true,
"initial": [
13422819,
7
],
"domain": {
"list": [
"FREQ_MAX"
]
},
"value": "VALUE"
},
"FREQ_START": {
"description": "Start of Freq Scan",
"record_meta": true,
"initial": 13422819,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
},
"FREQ_STOP": {
"description": "End of Freq Scan",
"record_meta": true,
"initial": 7,
"domain": [
"FREQ_MAX"
],
"value": {
"expression": "VALUE"
}
},
"DELAY": {
"description": "Wait x peroid before start taking measurements",
"record_meta": true,
"initial": 0,
"domain": [
101
],
"value": {
"expression": "VALUE"
}
},
"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
]
},
"ADC_VALUE_I": {
"description": "ADC value current value",
"domain": "int"
},
"Scan_Rate": {
"description": "Voltage Scan Rate",
"record_meta": true,
"initial": 10000,
"domain": [
100001
],
"value": {
"expression": "VALUE"
}
},
"CTRL_HIGH_Z_15": {
"description": "ctrl highZ level",
"record_meta": true,
"initial": 1,
"value": [
"On",
"Off"
],
"on_change": "set_ctrl_highZ"
},
"ADC_LEVEL_I_15": {
"description": "ADC level",
"record_meta": true,
"initial": 4,
"value": [
"0",
"1",
"2",
"3",
"auto"
],
"on_change": "set_adc_gain_I"
},
"ADC_LEVEL_V_IN_15": {
"description": "ADC level",
"record_meta": true,
"initial": 3,
"value": [
"0",
"1",
"2",
"auto"
],
"on_change": "set_adc_gain_Vin"
},
"VOLT_INITIAL": {
"description": "Initial Voltage of Scan",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"VOLT_MAX": {
"description": "Max Voltage of Scan",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"VOLT_MIN": {
"description": "Min Voltage of Scan",
"record_meta": true,
"initial": 25000,
"domain": [
"VOLT_MAX"
],
"value": {
"expression": "VALUE"
}
},
"CYCLE_NUMBER": {
"description": "CV cycle number",
"record_meta": true,
"initial": 1,
"domain": [
65536
],
"value": {
"expression": "VALUE"
}
},
"BLE_WRITE": {
"description": "send msg to elite",
"domain": {
"list": [
"BLE_WRITE_MAX"
]
},
"initial": "[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]",
"value": "VALUE"
},
"BLE_READ": {
"description": "receive msg from elite",
"domain": "int"
}
},
"instruction": {
"start": [
{
"expression": "MODE",
"when": {
"*": "start_data"
}
}
],
"start_data": [
"data_format_cali",
"_notify(True)",
{
"expression": "MODE",
"when": {
"1": "set_adc_gain_I"
}
},
{
"expression": "MODE",
"when": {
"1": "set_adc_gain_Vin"
}
},
{
"expression": "MODE",
"when": {
"0": "curve_eis",
"1": "curve_cv3"
}
},
{
"expression": "MODE",
"when": {
"0": "curve_eis_para2",
"1": "curve_cv3_para2"
}
},
"_sync(True)",
"VIS_STI"
],
"data_format": [
"_data_format('EISZeroOne')",
{
"expression": "MODE",
"when": {
"0": "_disable_cache(True)",
"1": "_disable_cache(True)",
"*": "_disable_cache(False)"
}
}
],
"data_format_cali": [
"_data_format_cali('EISZeroOne')"
],
"set_sample_rate": {
"type": "RIS",
"parameter": {
"va": "SAMPLE_RATE"
},
"data": [
"XE0;2B>va"
]
},
"set_adc_gain_I": {
"type": "RIS",
"data": [
"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": [
"XE1;X03;B>CTRL_HIGH_Z_15"
]
},
"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"
},
"data": [
"1XD1;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"
},
"data": [
"1XD1;1X02;2B>dc;2B>am;B>an;B>rt;2B>pp;B>sp"
]
},
"curve_cv3": {
"type": "RIS",
"parameter": {
"va": "VOLT_INITIAL",
"vb": "VOLT_MAX",
"vc": "VOLT_MIN",
"ve": "Scan_Rate",
"vf": "SAMPLE_RATE",
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X01;2B>va;2B>vb;2B>vc;"
]
},
"curve_cv3_para2": {
"type": "RIS",
"parameter": {
"va": "VOLT_INITIAL",
"vb": "VOLT_MAX",
"vc": "VOLT_MIN",
"ve": "Scan_Rate",
"vf": "SAMPLE_RATE",
"cn": "CYCLE_NUMBER"
},
"data": [
"1XD2;1X02;4B>ve;2B>vf;2B>cn"
]
},
"ble_instru_send": [
"ble_write",
"_cdr('20X>ADC_VALUE_I')"
],
"ble_write": {
"type": "RIS",
"data": [
"XFF;",
"1B>BLE_WRITE[0];1B>BLE_WRITE[1];1B>BLE_WRITE[2];1B>BLE_WRITE[3];",
"1B>BLE_WRITE[4];1B>BLE_WRITE[5];1B>BLE_WRITE[6];1B>BLE_WRITE[7];",
"1B>BLE_WRITE[8];1B>BLE_WRITE[9];1B>BLE_WRITE[10];1B>BLE_WRITE[11];",
"1B>BLE_WRITE[12];1B>BLE_WRITE[13];1B>BLE_WRITE[14];1B>BLE_WRITE[15];",
"1B>BLE_WRITE[16];"
]
},
"dev_version": [
"CIS_VERSION",
"_cdr('20X>ADC_VALUE_I')"
],
"dev_battery": [
"CIS_VOLT",
"_cdr('20X>ADC_VALUE_I')"
]
}
}
@@ -1,5 +1,5 @@
{
"name": "Elite_MEGAFLY1",
"name": "Elite_MEGAFLY_0.1",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Elite.*",
@@ -1426,14 +1426,6 @@
"X80;X03;B>CTRL_HIGH_Z_15"
]
},
"VIS_CC_ZERO": [
"_data_format('I4V4Z4T4')",
"_disable_cache(False)",
"_notify(True)",
"VIS_CC_ZERO",
"_sync(True)",
"VIS_STI"
],
"pulse_fly": [
"sti_mode",
"gas1_mode",
@@ -1,5 +1,5 @@
{
"name": "Elite_TRIG1",
"name": "Elite_TRIG_0.1",
"version": "1.2.30",
"match_rule": {
"local_name_pattern": "Trigger.*",