Index: CN0_Python_Scripts/EVAL_CN0359_REV_B.py =================================================================== diff -u -r509657069dd7ee800560a5c0b790077ce4cbd31a -r685d8eb11e2a49f2c8f7a270e379186415594601 --- CN0_Python_Scripts/EVAL_CN0359_REV_B.py (.../EVAL_CN0359_REV_B.py) (revision 509657069dd7ee800560a5c0b790077ce4cbd31a) +++ CN0_Python_Scripts/EVAL_CN0359_REV_B.py (.../EVAL_CN0359_REV_B.py) (revision 685d8eb11e2a49f2c8f7a270e379186415594601) @@ -17,43 +17,138 @@ cond1.create_connection('COM6', '30') print("connected") -# commands.cmd_poll(cond1) -# commands.cmd_poll_bin(cond1) +sleep_time = 1 # sleep time after executing a command (in seconds) -# commands.cmd_voltage(cond1, 0.2) -# commands.cmd_frequency_bin(cond1,10.1) -# commands.cmd_cellconstant(cond1,0.06) -# commands.cmd_coefficient_bin(cond1,5.0) -# commands.cmd_setuptime_bin(cond1,0.1) -# commands.cmd_holdtime_bin(cond1,0.2) -# commands.cmd_poll(cond1) +# At startup the auto publish is one, so read the auto published data +commands.read_autopoll(cond1, 30) +time.sleep(sleep_time) -# commands.cmd_poll(cond1) -# print('\n') -# commands.cmd_cellconstant(cond1,0.06) -# print('\n') -# commands.cmd_poll(cond1) +# Stop auto publishing +commands.cmd_stop_poll_bin(cond1) +time.sleep(sleep_time) -# commands.cmd_getCalData_bin(cond1) -# print('\n') -# commands.cmd_setcal(cond1, 1, 100.1) -# commands.cmd_setcal(cond1, 2, 100.2) -# commands.cmd_setcal(cond1, 3, 100.3) -# commands.cmd_setcal(cond1, 4, 100.4) -# commands.cmd_setcal(cond1, 5, 100.5) -# commands.cmd_setcal(cond1, 6, 100.6) -# commands.cmd_setcal(cond1, 7, 100.7) -# commands.cmd_setcal(cond1, 8, 100.8) -# commands.cmd_setcal(cond1, 9, 100.9) -# commands.cmd_setcal(cond1, 10, 100.10) -# commands.cmd_setcal(cond1, 11, 100.11) -# commands.cmd_setcal(cond1, 12, 100.12) -# print('\n') -# commands.cmd_getCalData_bin(cond1) +# Start auto publishing +commands.cmd_start_poll_bin(cond1) +time.sleep(sleep_time) -commands.cmd_getSerial_bin(cond1) -# commands.cmd_setSerial_bin(cond1) -# commands.cmd_getSerial_bin(cond1) +# Read auto published data in binary format +commands.read_autopoll(cond1, 30) +time.sleep(sleep_time) -# commands.cmd_poll(cond1) -# commands.cmd_poll_bin(cond1) \ No newline at end of file +# Stop auto publishing +commands.cmd_stop_poll_bin(cond1) +time.sleep(sleep_time) + +# Read raw data in ASCII format +commands.cmd_tx_raw_poll(cond1) +time.sleep(sleep_time) + +# Read Configuration settings in ASCII format +commands.cmd_poll(cond1) +time.sleep(sleep_time) + +# Update excitation voltage and read response in ASCII format +commands.cmd_voltage(cond1, 0.4) +time.sleep(sleep_time) + +# Update excitation frequency and read response in ASCII format +commands.cmd_frequency(cond1,10.3) +time.sleep(sleep_time) + +# Update setup time and read response in ASCII format +commands.cmd_setuptime(cond1,0.3) +time.sleep(sleep_time) + +# Update hold time and read response in ASCII format +commands.cmd_holdtime(cond1,0.4) +time.sleep(sleep_time) + +# Update temperature coefficient and read response in ASCII format +commands.cmd_coefficient(cond1,5.2) +time.sleep(sleep_time) + +# Update cell constant and read response in ASCII format +commands.cmd_cellconstant(cond1,0.08) +time.sleep(sleep_time) + +# Read Configuration settings in ASCII format to confirm the changes were made +commands.cmd_poll(cond1) +time.sleep(sleep_time) + +# Read Calibration data in ASCII format +commands.cmd_get_cal_data(cond1) +time.sleep(sleep_time) + +# Update Coefficient 1 and read response in ASCII format +commands.cmd_setcal(cond1, 1, 3.1) +time.sleep(sleep_time) + +# Update Coefficient 2 and read response in ASCII format +commands.cmd_setcal(cond1, 2, 0.006) +time.sleep(sleep_time) + +# Update Coefficient 3 and read response in ASCII format +commands.cmd_setcal(cond1, 3, 0.6) +time.sleep(sleep_time) + +# Update Coefficient 4 and read response in ASCII format +commands.cmd_setcal(cond1, 4, -1.0) +time.sleep(sleep_time) + +# Update Coefficient 5 and read response in ASCII format +commands.cmd_setcal(cond1, 5, 3.1) +time.sleep(sleep_time) + +# Update Coefficient 6 and read response in ASCII format +commands.cmd_setcal(cond1, 6, 0.03) +time.sleep(sleep_time) + +# Update Coefficient 7 and read response in ASCII format +commands.cmd_setcal(cond1, 7, 2.0) +time.sleep(sleep_time) + +# Update Coefficient 8 and read response in ASCII format +commands.cmd_setcal(cond1, 8, 999.0) +time.sleep(sleep_time) + +# Update Coefficient 9 and read response in ASCII format +commands.cmd_setcal(cond1, 9, 1.5) +time.sleep(sleep_time) + +# Update Coefficient 10 and read response in ASCII format +commands.cmd_setcal(cond1, 10, 7.1) +time.sleep(sleep_time) + +# Update Coefficient 11 and read response in ASCII format +commands.cmd_setcal(cond1, 11, 100.11) +time.sleep(sleep_time) + +# Update Coefficient 12 and read response in ASCII format +commands.cmd_setcal(cond1, 12, 100.12) +time.sleep(sleep_time) + +# Read Calibration data in ASCII format to confirm the changes were made +commands.cmd_get_cal_data(cond1) +time.sleep(sleep_time) + +# Read Version information in ASCII format +commands.cmd_get_version(cond1) +time.sleep(sleep_time) + +# Update Hardware Version Number and read response in ASCII format +commands.cmd_set_hardware_ver(cond1) +time.sleep(sleep_time) + +# Update Serial Number and read response in ASCII format +commands.cmd_set_serial_num(cond1) +time.sleep(sleep_time) + +# Read Version information in ASCII format to confirm the changes were made +commands.cmd_get_version(cond1) +time.sleep(sleep_time) + +# Read Calibration and Version information in binary format +commands.cmd_get_cal_ver_bin(cond1) +time.sleep(sleep_time) + +