diff --git a/.gitignore b/.gitignore index 1ee431d..ccbb266 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,20 @@ mcu2/.vs/mcu2/v14/.atsuo mcu2/.vs/mcu2/v14/.atsuo mcu2/.vs/mcu2/v14/.atsuo mcu2/.vs/mcu2/v14/.atsuo +*.lst +mcu1/Debug/memory_watch.txt.txt +mcu1/EEPROM/New Text Document.txt +*.mk +mcu1/Debug/Makefile +mcu2/Debug/Makefile +*.sip_sym +*.sip_xab +*.sip_xad +*.sip_xc +*.sip_xf +*.sip_xm +*.sip_xr +*.sip_xsb +*.sip_xsd +*.xml +*.sisc diff --git a/.vs/Ventilator/v14/.atsuo b/.vs/Ventilator/v14/.atsuo new file mode 100644 index 0000000..f5b05de Binary files /dev/null and b/.vs/Ventilator/v14/.atsuo differ diff --git a/Debug-logs/mcu1_dbg_logs b/Debug-logs/mcu1_dbg_logs new file mode 100644 index 0000000..a8eb6b2 --- /dev/null +++ b/Debug-logs/mcu1_dbg_logs @@ -0,0 +1,1139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[2021-10-07 14:37:34.516] Signum Techniks +[2021-10-07 14:37:36.547] Power On Home Cycle : +[2021-10-07 14:37:36.547] Homing attempt count before start : 1 +[2021-10-07 14:37:36.547] travel in 'mm' back to home on power up : 200.00 +[2021-10-07 14:37:36.547] Pulses required to travel back to home on power up : 8000.00 +[2021-10-07 14:37:36.547] Home Cycle Complete... +[2021-10-07 14:37:38.066] $VMF20000& +[2021-10-07 14:37:38.066] Pressure flag == false +[2021-10-07 14:37:38.167] $VMF30000& +[2021-10-07 14:37:38.167] Milli volt flag == false +[2021-10-07 14:37:38.283] $VMP10550& +[2021-10-07 14:37:38.283] TV : 550.00 +[2021-10-07 14:37:38.283] index1 : 1 index2 : 0 index3 : 7 SL_new : 89.20 +[2021-10-07 14:37:38.377] $VMP20010& +[2021-10-07 14:37:38.377] BPM : 10.00 +[2021-10-07 14:37:38.377] cycle time : 6.00 +[2021-10-07 14:37:38.377] Compression hold in mS: 600.00 +[2021-10-07 14:37:38.377] index1 : 1 index2 : 0 index3 : 7 SL_new : 89.20 +[2021-10-07 14:37:38.488] $VMP50001& +[2021-10-07 14:37:38.488] IER : 1.00 +[2021-10-07 14:37:38.488] index1 : 0 index2 : 0 index3 : 7 SL_new : 79.90 +[2021-10-07 14:37:38.573] $VMP60091& +[2021-10-07 14:37:38.573] peak_prsur_new : 91.00 +[2021-10-07 14:37:38.678] $VMP700054538& +[2021-10-07 14:37:38.678] CAL_GP0 : 0.55 +[2021-10-07 14:37:38.789] $VMP800068886& +[2021-10-07 14:37:38.789] CAL_GP1 : 0.69 +[2021-10-07 14:37:38.789] IER: 1:2.00 BPM: 10.00 TV: 350.00 Stroke: 75.00 +[2021-10-07 14:37:38.789] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:40:59.642] $VMIN0000& +[2021-10-07 14:40:59.642] Speed curve calculations : +[2021-10-07 14:40:59.642] Calculated Exhale Time: 3.00 +[2021-10-07 14:40:59.651] O2Cyl_VLV Opened... +[2021-10-07 14:40:59.651] Skipping Home Cycle : +[2021-10-07 14:41:00.258] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:00.258] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:00.258] comp : 0.00/3.00 ExpTime : 209.09/3.00 Cycle : 209.09/6.00 +[2021-10-07 14:41:00.258] Inhale-hold : 0.60 MotorRet. : 0.00 +[2021-10-07 14:41:00.258] +[2021-10-07 14:41:00.258] $VS0100000000& +[2021-10-07 14:41:00.258] PEEP: 0.10 +[2021-10-07 14:41:00.258] PLAT: 0.00 +[2021-10-07 14:41:03.566] $VS0302640000& +[2021-10-07 14:41:03.566] PIP : 26.43 +[2021-10-07 14:41:06.596] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:06.596] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:06.596] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:06.596] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:06.596] +[2021-10-07 14:41:06.596] $VS0100460190& +[2021-10-07 14:41:06.596] PEEP: 4.64 +[2021-10-07 14:41:06.596] PLAT: 19.08 +[2021-10-07 14:41:09.905] $VS0302800000& +[2021-10-07 14:41:09.905] PIP : 28.07 +[2021-10-07 14:41:12.935] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:12.935] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:12.935] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:12.935] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:12.935] +[2021-10-07 14:41:12.935] $VS0100450218& +[2021-10-07 14:41:12.935] PEEP: 4.52 +[2021-10-07 14:41:12.935] PLAT: 21.83 +[2021-10-07 14:41:16.243] $VS0302800000& +[2021-10-07 14:41:16.243] PIP : 28.07 +[2021-10-07 14:41:19.268] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:19.268] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:19.268] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:19.268] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:19.268] +[2021-10-07 14:41:19.268] $VS0100440220& +[2021-10-07 14:41:19.268] PEEP: 4.43 +[2021-10-07 14:41:19.268] PLAT: 22.04 +[2021-10-07 14:41:22.589] $VS0302780000& +[2021-10-07 14:41:22.589] PIP : 27.89 +[2021-10-07 14:41:25.607] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:25.607] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:25.607] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:25.607] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:25.607] +[2021-10-07 14:41:25.607] $VS0100450219& +[2021-10-07 14:41:25.607] PEEP: 4.52 +[2021-10-07 14:41:25.607] PLAT: 21.98 +[2021-10-07 14:41:28.921] $VS0302790000& +[2021-10-07 14:41:28.921] PIP : 27.95 +[2021-10-07 14:41:31.943] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:31.943] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:31.943] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:31.943] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:31.943] +[2021-10-07 14:41:31.943] $VS0100440220& +[2021-10-07 14:41:31.943] PEEP: 4.40 +[2021-10-07 14:41:31.943] PLAT: 22.10 +[2021-10-07 14:41:35.277] $VS0302800000& +[2021-10-07 14:41:35.277] PIP : 28.04 +[2021-10-07 14:41:38.280] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:38.280] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:38.280] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:38.280] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:38.280] +[2021-10-07 14:41:38.280] $VS0100440219& +[2021-10-07 14:41:38.280] PEEP: 4.49 +[2021-10-07 14:41:38.280] PLAT: 21.98 +[2021-10-07 14:41:41.593] $VS0302790000& +[2021-10-07 14:41:41.593] PIP : 27.98 +[2021-10-07 14:41:44.618] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:44.618] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:44.618] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:44.618] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:44.618] +[2021-10-07 14:41:44.618] $VS0100440220& +[2021-10-07 14:41:44.618] PEEP: 4.43 +[2021-10-07 14:41:44.618] PLAT: 22.10 +[2021-10-07 14:41:47.937] $VS0302810000& +[2021-10-07 14:41:47.937] PIP : 28.10 +[2021-10-07 14:41:50.960] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:50.960] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:50.960] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:50.960] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:50.960] +[2021-10-07 14:41:50.960] $VS0100440220& +[2021-10-07 14:41:50.960] PEEP: 4.40 +[2021-10-07 14:41:50.960] PLAT: 22.07 +[2021-10-07 14:41:54.266] $VS0302820000& +[2021-10-07 14:41:54.266] PIP : 28.28 +[2021-10-07 14:41:57.297] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:41:57.297] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:41:57.297] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:41:57.297] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:41:57.297] +[2021-10-07 14:41:57.297] $VS0100440223& +[2021-10-07 14:41:57.297] PEEP: 4.40 +[2021-10-07 14:41:57.297] PLAT: 22.40 +[2021-10-07 14:42:00.607] $VS0302800000& +[2021-10-07 14:42:00.607] PIP : 28.07 +[2021-10-07 14:42:03.628] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:03.628] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:03.628] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:03.628] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:03.628] +[2021-10-07 14:42:03.628] $VS0100440221& +[2021-10-07 14:42:03.628] PEEP: 4.40 +[2021-10-07 14:42:03.628] PLAT: 22.19 +[2021-10-07 14:42:06.943] $VS0302870000& +[2021-10-07 14:42:06.943] PIP : 28.79 +[2021-10-07 14:42:09.967] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:09.967] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:09.967] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:09.967] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:09.967] +[2021-10-07 14:42:09.967] $VS0100430229& +[2021-10-07 14:42:09.967] PEEP: 4.37 +[2021-10-07 14:42:09.967] PLAT: 23.00 +[2021-10-07 14:42:13.283] $VS0302880000& +[2021-10-07 14:42:13.283] PIP : 28.82 +[2021-10-07 14:42:16.312] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:16.312] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:16.312] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:16.312] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:16.312] +[2021-10-07 14:42:16.312] $VS0100440230& +[2021-10-07 14:42:16.312] PEEP: 4.40 +[2021-10-07 14:42:16.312] PLAT: 23.06 +[2021-10-07 14:42:19.619] $VS0302870000& +[2021-10-07 14:42:19.619] PIP : 28.79 +[2021-10-07 14:42:22.642] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:22.642] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:22.642] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:22.642] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:22.642] +[2021-10-07 14:42:22.642] $VS0100440231& +[2021-10-07 14:42:22.642] PEEP: 4.40 +[2021-10-07 14:42:22.642] PLAT: 23.18 +[2021-10-07 14:42:25.956] $VS0302880000& +[2021-10-07 14:42:25.956] PIP : 28.82 +[2021-10-07 14:42:28.983] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:28.983] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:28.983] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:28.983] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:28.983] +[2021-10-07 14:42:28.983] $VS0100450232& +[2021-10-07 14:42:28.983] PEEP: 4.52 +[2021-10-07 14:42:28.983] PLAT: 23.29 +[2021-10-07 14:42:32.293] $VS0302890000& +[2021-10-07 14:42:32.293] PIP : 28.94 +[2021-10-07 14:42:35.315] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:35.315] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:35.315] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:35.315] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:35.315] +[2021-10-07 14:42:35.315] $VS0100430234& +[2021-10-07 14:42:35.315] PEEP: 4.37 +[2021-10-07 14:42:35.315] PLAT: 23.41 +[2021-10-07 14:42:38.627] $VS0302890000& +[2021-10-07 14:42:38.627] PIP : 28.91 +[2021-10-07 14:42:43.357] IER: 1:1.00 BPM: 10.00 TV: 550.00 Stroke: 79.90 +[2021-10-07 14:42:43.357] Peak Pressure: 91.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +[2021-10-07 14:42:43.357] comp : 3.01/3.00 ExpTime : 3.01/3.00 Cycle : 6.32/6.00 +[2021-10-07 14:42:43.357] Inhale-hold : 0.30 MotorRet. : 0.72 +[2021-10-07 14:42:43.359] +[2021-10-07 14:42:43.359] $VS0100440234& +[2021-10-07 14:42:43.359] PEEP: 4.46 +[2021-10-07 14:42:43.359] PLAT: 23.41 +Signum Techniks +Power On Home Cycle : +Homing attempt count before start : 1 +travel in 'mm' back to home on power up : 200.00 +Pulses required to travel back to home on power up : 8000.00 +StrideHlength table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 77.70 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 77.70 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 77.70, 77.70 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 77.70 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 77.70 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 77.70 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 77.70 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 77.70 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 77.70 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40, 88.60, 94.40 }, // 10 + { 45.40, 50.50, 58.40, 63.00, 67.70, 71.70, 75.50, 80.10, 84.70, 89.48, 94.82 }, // 11 + { 45.70, 50.90, 58.90, 63.40, 68.00, 72.00, 75.80, 80.30, 85.00, 90.36, 95.24 }, // 12 + { 46.00, 51.30, 59.40, 63.80, 68.30, 72.30, 76.10, 80.50, 85.30, 91.25, 95.66 }, // 13 + { 46.20, 51.70, 59.90, 64.20, 68.60, 72.50, 76.40, 80.70, 85.60, 92.12, 96.08 }, // 14 + { 46.50, 51.80, 60.20, 64.50, 68.90, 72.80, 76.70, 80.90, 85.90, 93.00, 96.50 }, // 15 + { 46.50, 51.70, 59.80, 65.00, 69.20, 73.80, 77.60, 82.80, 88.20, 95.00, 101.00 }, // 16 + { 46.50, 51.60, 59.80, 65.00, 69.20, 74.00, 77.90, 83.20, 88.70, 95.40, 101.40 }, // 17 + { 46.40, 51.50, 59.80, 65.00, 69.20, 74.20, 78.20, 83.60, 89.20, 95.80, 101.80 }, // 18 + { 46.40, 51.40, 59.80, 65.00, 69.20, 74.40, 78.50, 84.00, 89.70, 96.20, 77.70 }, // 19 + { 46.40, 51.40, 56.60, 61.50, 66.30, 70.90, 75.30, 80.60, 85.60, 92.00, 98.10 }, // 20 + { 46.40, 51.50, 56.70, 61.80, 66.50, 71.10, 75.60, 80.80, 85.90, 94.00, 77.70 }, // 21 + { 46.40, 51.60, 56.80, 62.10, 66.70, 71.30, 75.90, 81.00, 86.20, 77.70, 77.70 }, // 22 + { 46.40, 51.70, 56.80, 62.10, 66.80, 71.50, 76.20, 81.20, 86.50, 77.70, 77.70 }, // 23 + { 46.40, 51.80, 56.80, 62.20, 66.80, 71.70, 76.40, 81.40, 86.90, 77.70, 77.70 }, // 24 + { 46.40, 51.90, 56.90, 62.20, 66.90, 71.90, 76.80, 81.50, 87.40, 77.70, 77.70 }, // 25 + { 46.40, 52.00, 56.90, 62.50, 67.10, 76.10, 77.10, 81.70, 77.70, 77.70, 77.70 }, // 26 + { 46.40, 52.10, 56.90, 62.80, 67.30, 76.30, 77.40, 81.90, 77.70, 77.70, 77.70 }, // 27 + { 46.30, 52.20, 57.00, 62.80, 67.50, 76.50, 77.70, 77.70, 77.70, 77.70, 77.70 }, // 28 + { 46.30, 52.30, 57.00, 62.90, 67.70, 76.70, 78.10, 77.70, 77.70, 77.70, 77.70 }, // 29 + { 46.20, 52.30, 57.10, 62.90, 68.20, 73.00, 78.60, 77.70, 77.70, 77.70, 77.70 }, // 30 + }, + +Stride length table.. from eeprom + + // IER 1:1 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + +Signum Techniks +Signum Techniks +Power On Home Cycle : +Homing attempt count before start : 1 +travel in 'mm' back to home on power up : 200.00 +Pulses required to travel back to home on power up : 8000.00 +StrideHlength table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 77.70 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 77.70 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 77.70, 77.70 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 77.70 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 77.70 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 77.70 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 77.70 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 77.70 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 77.70 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40, 88.60, 94.40 }, // 10 + { 45.40, 50.50, 58.40, 63.00, 67.70, 71.70, 75.50, 80.10, 84.70, 89.48, 94.82 }, // 11 + { 45.70, 50.90, 58.90, 63.40, 68.00, 72.00, 75.80, 80.30, 85.00, 90.36, 95.24 }, // 12 + { 46.00, 51.30, 59.40, 63.80, 68.30, 72.30, 76.10, 80.50, 85.30, 91.25, 95.66 }, // 13 + { 46.20, 51.70, 59.90, 64.20, 68.60, 72.50, 76.40, 80.70, 85.60, 92.12, 96.08 }, // 14 + { 46.50, 51.80, 60.20, 64.50, 68.90, 72.80, 76.70, 80.90, 85.90, 93.00, 96.50 }, // 15 + { 46.50, 51.70, 59.80, 65.00, 69.20, 73.80, 77.60, 82.80, 88.20, 95.00, 101.00 }, // 16 + { 46.50, 51.60, 59.80, 65.00, 69.20, 74.00, 77.90, 83.20, 88.70, 95.40, 101.40 }, // 17 + { 46.40, 51.50, 59.80, 65.00, 69.20, 74.20, 78.20, 83.60, 89.20, 95.80, 101.80 }, // 18 + { 46.40, 51.40, 59.80, 65.00, 69.20, 74.40, 78.50, 84.00, 89.70, 96.20, 77.70 }, // 19 + { 46.40, 51.40, 56.60, 61.50, 66.30, 70.90, 75.30, 80.60, 85.60, 92.00, 98.10 }, // 20 + { 46.40, 51.50, 56.70, 61.80, 66.50, 71.10, 75.60, 80.80, 85.90, 94.00, 77.70 }, // 21 + { 46.40, 51.60, 56.80, 62.10, 66.70, 71.30, 75.90, 81.00, 86.20, 77.70, 77.70 }, // 22 + { 46.40, 51.70, 56.80, 62.10, 66.80, 71.50, 76.20, 81.20, 86.50, 77.70, 77.70 }, // 23 + { 46.40, 51.80, 56.80, 62.20, 66.80, 71.70, 76.40, 81.40, 86.90, 77.70, 77.70 }, // 24 + { 46.40, 51.90, 56.90, 62.20, 66.90, 71.90, 76.80, 81.50, 87.40, 77.70, 77.70 }, // 25 + { 46.40, 52.00, 56.90, 62.50, 67.10, 76.10, 77.10, 81.70, 77.70, 77.70, 77.70 }, // 26 + { 46.40, 52.10, 56.90, 62.80, 67.30, 76.30, 77.40, 81.90, 77.70, 77.70, 77.70 }, // 27 + { 46.30, 52.20, 57.00, 62.80, 67.50, 76.50, 77.70, 77.70, 77.70, 77.70, 77.70 }, // 28 + { 46.30, 52.30, 57.00, 62.90, 67.70, 76.70, 78.10, 77.70, 77.70, 77.70, 77.70 }, // 29 + { 46.20, 52.30, 57.10, 62.90, 68.20, 73.00, 78.60, 77.70, 77.70, 77.70, 77.70 }, // 30 + }, + +Stride length table.. from eeprom + + // IER 1:1 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + +Signum Techniks +Power On Home Cycle : +Homing attempt count before start : 1 +travel in 'mm' back to home on power up : 200.00 +Pulses required to travel back to home on power up : 8000.00 +StrideHlength table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 77.70 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 77.70 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 77.70, 77.70 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 77.70 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 77.70 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 77.70 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 77.70 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 77.70 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 77.70 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40, 88.60, 94.40 }, // 10 + { 45.40, 50.50, 58.40, 63.00, 67.70, 71.70, 75.50, 80.10, 84.70, 89.48, 94.82 }, // 11 + { 45.70, 50.90, 58.90, 63.40, 68.00, 72.00, 75.80, 80.30, 85.00, 90.36, 95.24 }, // 12 + { 46.00, 51.30, 59.40, 63.80, 68.30, 72.30, 76.10, 80.50, 85.30, 91.25, 95.66 }, // 13 + { 46.20, 51.70, 59.90, 64.20, 68.60, 72.50, 76.40, 80.70, 85.60, 92.12, 96.08 }, // 14 + { 46.50, 51.80, 60.20, 64.50, 68.90, 72.80, 76.70, 80.90, 85.90, 93.00, 96.50 }, // 15 + { 46.50, 51.70, 59.80, 65.00, 69.20, 73.80, 77.60, 82.80, 88.20, 95.00, 101.00 }, // 16 + { 46.50, 51.60, 59.80, 65.00, 69.20, 74.00, 77.90, 83.20, 88.70, 95.40, 101.40 }, // 17 + { 46.40, 51.50, 59.80, 65.00, 69.20, 74.20, 78.20, 83.60, 89.20, 95.80, 101.80 }, // 18 + { 46.40, 51.40, 59.80, 65.00, 69.20, 74.40, 78.50, 84.00, 89.70, 96.20, 77.70 }, // 19 + { 46.40, 51.40, 56.60, 61.50, 66.30, 70.90, 75.30, 80.60, 85.60, 92.00, 98.10 }, // 20 + { 46.40, 51.50, 56.70, 61.80, 66.50, 71.10, 75.60, 80.80, 85.90, 94.00, 77.70 }, // 21 + { 46.40, 51.60, 56.80, 62.10, 66.70, 71.30, 75.90, 81.00, 86.20, 77.70, 77.70 }, // 22 + { 46.40, 51.70, 56.80, 62.10, 66.80, 71.50, 76.20, 81.20, 86.50, 77.70, 77.70 }, // 23 + { 46.40, 51.80, 56.80, 62.20, 66.80, 71.70, 76.40, 81.40, 86.90, 77.70, 77.70 }, // 24 + { 46.40, 51.90, 56.90, 62.20, 66.90, 71.90, 76.80, 81.50, 87.40, 77.70, 77.70 }, // 25 + { 46.40, 52.00, 56.90, 62.50, 67.10, 76.10, 77.10, 81.70, 77.70, 77.70, 77.70 }, // 26 + { 46.40, 52.10, 56.90, 62.80, 67.30, 76.30, 77.40, 81.90, 77.70, 77.70, 77.70 }, // 27 + { 46.30, 52.20, 57.00, 62.80, 67.50, 76.50, 77.70, 77.70, 77.70, 77.70, 77.70 }, // 28 + { 46.30, 52.30, 57.00, 62.90, 67.70, 76.70, 78.10, 77.70, 77.70, 77.70, 77.70 }, // 29 + { 46.20, 52.30, 57.10, 62.90, 68.20, 73.00, 78.60, 77.70, 77.70, 77.70, 77.70 }, // 30 + }, + +Stride length table.. from eeprom + + // IER 1:1 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + +$VMF20000& +Pressure flag == false +$VMF30000& +Milli volt flag == false +$VMP10350& +TV : 350.00 +index1 : 1 index2 : 0 index3 : 3 SL_new : 66.30 +$VMP20015& +BPM : 15.00 +cycle time : 4.00 +Compression hold in mS: 400.00 +index1 : 1 index2 : 5 index3 : 3 SL_new : 66.50 +$VMP50002& +IER : 2.00 +index1 : 1 index2 : 5 index3 : 3 SL_new : 66.50 +$VMP60100& +peak_prsur_new : 100.00 +$VMP700054538& +CAL_GP0 : 0.55 +$VMP800068886& +CAL_GP1 : 0.69 +IER: 1:2.00 BPM: 10.00 TV: 350.00 Stroke: 75.00 +Peak Pressure: 100.00 Cali. GP0: 0.55 Cali. GP1: 0.69 +Signum Techniks +Power On Home Cycle : +Homing attempt count before start : 1 +travel in 'mm' back to home on power up : 200.00 +Pulses required to travel back to home on power up : 8000.00 +StrideHlength table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 77.70 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 77.70 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 77.70, 77.70 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 77.70 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 77.70 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 77.70 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 77.70 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 77.70 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 77.70 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40üSignum Techniks +Power On Home Cycle : +Homing attempt count before start : 1 +travel in 'mm' back to home on power up : 200.00 +Pulses required to travel back to home on power up : 8000.00 + +StriHe length table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 101.77 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 101.77 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 101.77, 101.77 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 101.77 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 101.77 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 101.77 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 101.77 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 101.77 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 101.77 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40, 88.60, 94.40 }, // 10 + { 45.40, 50.50, 58.40, 63.00, 67.70, 71.70, 75.50, 80.10, 84.70, 89.48, 94.82 }, // 11 + { 45.70, 50.90, 58.90, 63.40, 68.00, 72.00, 75.80, 80.30, 85.00, 90.36, 95.24 }, // 12 + { 46.00, 51.30, 59.40, 63.80, 68.30, 72.30, 76.10, 80.50, 85.30, 91.25, 95.66 }, // 13 + { 46.20, 51.70, 59.90, 64.20, 68.60, 72.50, 76.40, 80.70, 85.60, 92.12, 96.08 }, // 14 + { 46.50, 51.80, 60.20, 64.50, 68.90, 72.80, 76.70, 80.90, 85.90, 93.00, 96.50 }, // 15 + { 46.50, 51.70, 59.80, 65.00, 69.20, 73.80, 77.60, 82.80, 88.20, 95.00, 101.00 }, // 16 + { 46.50, 51.60, 59.80, 65.00, 69.20, 74.00, 77.90, 83.20, 88.70, 95.40, 101.40 }, // 17 + { 46.40, 51.50, 59.80, 65.00, 69.20, 74.20, 78.20, 83.60, 89.20, 95.80, 101.80 }, // 18 + { 46.40, 51.40, 59.80, 65.00, 69.20, 74.40, 78.50, 84.00, 89.70, 96.20, 101.77 }, // 19 + { 46.40, 51.40, 56.60, 61.50, 66.30, 70.90, 75.30, 80.60, 85.60, 92.00, 98.10 }, // 20 + { 46.40, 51.50, 56.70, 61.80, 66.50, 71.10, 75.60, 80.80, 85.90, 94.00, 101.77 }, // 21 + { 46.40, 51.60, 56.80, 62.10, 66.70, 71.30, 75.90, 81.00, 86.20, 101.77, 101.77 }, // 22 + { 46.40, 51.70, 56.80, 62.10, 66.80, 71.50, 76.20, 81.20, 86.50, 101.77, 101.77 }, // 23 + { 46.40, 51.80, 56.80, 62.20, 66.80, 71.70, 76.40, 81.40, 86.90, 101.77, 101.77 }, // 24 + { 46.40, 51.90, 56.90, 62.20, 66.90, 71.90, 76.80, 81.50, 87.40, 101.77, 101.77 }, // 25 + { 46.40, 52.00, 56.90, 62.50, 67.10, 76.10, 77.10, 81.70, 101.77, 101.77, 101.77 }, // 26 + { 46.40, 52.10, 56.90, 62.80, 67.30, 76.30, 77.40, 81.90, 101.77, 101.77, 101.77 }, // 27 + { 46.30, 52.20, 57.00, 62.80, 67.50, 76.50, 77.70, 101.77, 101.77, 101.77, 101.77 }, // 28 + { 46.30, 52.30, 57.00, 62.90, 67.70, 76.70, 78.10, 101.77, 101.77, 101.77, 101.77 }, // 29 + { 46.20, 52.30, 57.10, 62.90, 68.20, 73.00, 78.60, 101.77, 101.77, 101.77, 101.77 }, // 30 + }, + + +Stride length table.. from eeprom + + // IER 1:1 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 10 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 11 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 12 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 13 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 14 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 15 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 16 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 17 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 18 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 19 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 20 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 21 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 22 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 23 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 24 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 25 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 26 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 27 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 28 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 29 + { nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan }, // 30 + }, + +extracting changes from eeprom and updating stride length table.. + + +updating.. from eeprom + + // IER 1:1 + { // 200 300 400 500 600 700 + { , , , , , , , , , , }, // 10 + { , , , , , , , , , , }, // 11 + { , , , , , , , , , , }, // 12 + { , , , , , , , , , , }, // 13 + { , , , , , , , , , , }, // 14 + { , , , , , , , , , , }, // 15 + { , , , , , , , , , , }, // 16 + { , , , , , , , , , , }, // 17 + { , , , , , , , , , , }, // 18 + { , , , , , , , , , , }, // 19 + { , , , , , , , , , , }, // 20 + { , , , , , , , , , , }, // 21 + { , , , , , , , , , , }, // 22 + { , , , , , , , , , , }, // 23 + { , , , , , , , , , , }, // 24 + { , , , , , , , , , , }, // 25 + { , , , , , , , , , , }, // 26 + { , , , , , , , , , , }, // 27 + { , , , , , , , , , , }, // 28 + { , , , , , , , , , , }, // 29 + { , , , , , , , , , , }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { , , , , , , , , , , }, // 10 + { , , , , , , , , , , }, // 11 + { , , , , , , , , , , }, // 12 + { , , , , , , , , , , }, // 13 + { , , , , , , , , , , }, // 14 + { , , , , , , , , , , }, // 15 + { , , , , , , , , , , }, // 16 + { , , , , , , , , , , }, // 17 + { , , , , , , , , , , }, // 18 + { , , , , , , , , , , }, // 19 + { , , , , , , , , , , }, // 20 + { , , , , , , , , , , }, // 21 + { , , , , , , , , , , }, // 22 + { , , , , , , , , , , }, // 23 + { , , , , , , , , , , }, // 24 + { , , , , , , , , , , }, // 25 + { , , , , , , , , , , }, // 26 + { , , , , , , , , , , }, // 27 + { , , , , , , , , , , }, // 28 + { , , , , , , , , , , }, // 29 + { , , , , , , , , , , }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { , , , , , , , , , , }, // 10 + { , , , , , , , , , , }, // 11 + { , , , , , , , , , , }, // 12 + { , , , , , , , , , , }, // 13 + { , , , , , , , , , , }, // 14 + { , , , , , , , , , , }, // 15 + { , , , , , , , , , , }, // 16 + { , , , , , , , , , , }, // 17 + { , , , , , , , , , , }, // 18 + { , , , , , , , , , , }, // 19 + { , , , , , , , , , , }, // 20 + { , , , , , , , , , , }, // 21 + { , , , , , , , , , , }, // 22 + { , , , , , , , , , , }, // 23 + { , , , , , , , , , , }, // 24 + { , , , , , , , , , , }, // 25 + { , , , , , , , , , , }, // 26 + { , , , , , , , , , , }, // 27 + { , , , , , , , , , , }, // 28 + { , , , , , , , , , , }, // 29 + { , , , , , , , , , , }, // 30 + }, + +Updated table.. + + +Stride length table.. + + // IER 1:1 + { // 200 300 400 500 600 700 + { 47.30, 51.90, 56.50, 61.40, 65.90, 70.10, 74.30, 79.90, 85.60, 93.00, 99.90 }, // 10 + { 47.00, 51.00, 56.00, 61.00, 65.70, 70.00, 74.00, 79.60, 85.80, 92.70, 99.90 }, // 11 + { 47.50, 51.20, 56.00, 61.50, 65.00, 70.50, 74.50, 79.20, 85.30, 93.00, 99.90 }, // 12 + { 46.50, 50.00, 55.10, 60.50, 65.40, 70.00, 74.00, 79.80, 85.50, 93.20, 100.00 }, // 13 + { 46.50, 50.50, 55.40, 60.80, 65.80, 70.50, 74.50, 79.40, 85.00, 93.10, 100.00 }, // 14 + { 45.30, 50.40, 55.70, 60.50, 65.30, 69.50, 74.30, 79.90, 85.50, 93.00, 100.00 }, // 15 + { 45.00, 50.00, 55.60, 60.20, 65.20, 69.80, 74.80, 79.80, 85.00, 93.10, 100.30 }, // 16 + { 45.00, 50.50, 55.20, 60.80, 65.80, 69.60, 74.60, 79.60, 85.60, 93.10, 100.20 }, // 17 + { 44.70, 50.20, 55.80, 60.50, 65.20, 69.40, 74.40, 79.40, 85.30, 93.00, 100.20 }, // 18 + { 44.50, 50.90, 55.40, 60.20, 65.10, 69.20, 74.20, 79.20, 85.50, 93.50, 100.00 }, // 19 + { 44.30, 50.30, 55.30, 60.80, 65.50, 69.90, 74.50, 79.60, 86.50, 93.30, 100.70 }, // 20 + { 44.10, 50.30, 55.90, 60.00, 65.60, 69.80, 74.10, 79.80, 86.70, 93.70, 100.00 }, // 21 + { 44.90, 50.00, 55.80, 60.90, 65.60, 69.60, 74.20, 79.60, 86.90, 93.90, 100.00 }, // 22 + { 44.70, 50.70, 55.70, 60.90, 65.20, 69.40, 74.30, 79.40, 86.10, 93.10, 100.00 }, // 23 + { 44.50, 50.40, 55.60, 60.90, 65.00, 69.40, 74.40, 79.20, 86.30, 93.30, 100.00 }, // 24 + { 44.20, 50.20, 55.20, 60.80, 65.50, 69.90, 74.50, 81.00, 89.00, 95.50, 104.00 }, // 25 + { 44.30, 50.10, 55.40, 60.50, 65.80, 70.10, 75.80, 82.40, 90.50, 95.90, 102.00 }, // 26 + { 44.50, 50.10, 55.30, 60.50, 65.70, 70.30, 76.10, 83.80, 92.00, 96.30, 102.00 }, // 27 + { 44.60, 50.10, 56.20, 60.40, 65.70, 70.50, 77.40, 84.20, 93.50, 96.70, 101.77 }, // 28 + { 44.70, 50.10, 56.10, 61.20, 65.70, 71.10, 78.70, 85.60, 94.00, 97.10, 101.77 }, // 29 + { 44.70, 50.60, 56.10, 61.20, 65.80, 71.30, 79.90, 87.60, 95.10, 101.77, 101.77 }, // 30 + }, + + // IER 1:2 + { // 200 300 400 500 600 700 + { 49.90, 55.50, 62.00, 66.30, 71.40, 76.60, 82.90, 89.20, 96.50, 103.70, 99.90 }, // 10 + { 49.80, 55.50, 62.50, 66.80, 71.90, 76.00, 82.50, 89.70, 96.60, 103.00, 101.00 }, // 11 + { 49.70, 55.60, 62.20, 66.40, 71.10, 76.50, 82.30, 89.60, 95.50, 102.10, 102.10 }, // 12 + { 49.60, 55.50, 61.90, 66.20, 71.20, 76.20, 82.10, 88.50, 95.40, 102.10, 103.10 }, // 13 + { 49.50, 55.20, 61.00, 66.80, 71.30, 75.80, 81.90, 88.50, 85.40, 102.90, 104.30 }, // 14 + { 49.30, 55.70, 61.30, 66.50, 71.10, 75.70, 81.30, 87.50, 94.40, 101.10, 108.10 }, // 15 + { 49.00, 55.60, 61.40, 66.20, 71.60, 75.60, 81.60, 86.20, 94.30, 101.70, 108.60 }, // 16 + { 49.80, 55.30, 61.20, 66.10, 71.60, 75.40, 81.60, 85.00, 94.50, 101.90, 108.80 }, // 17 + { 49.50, 55.10, 61.20, 65.00, 70.20, 75.30, 81.60, 86.00, 94.70, 101.10, 108.00 }, // 18 + { 49.50, 55.00, 60.80, 65.90, 70.00, 75.60, 80.60, 86.00, 94.90, 101.30, 108.20 }, // 19 + { 49.30, 55.00, 60.80, 65.50, 70.10, 75.30, 80.00, 86.90, 94.00, 101.30, 108.30 }, // 20 + { 49.00, 55.80, 60.80, 65.90, 70.80, 75.30, 80.90, 86.30, 94.30, 101.70, 101.90 }, // 21 + { 49.80, 55.70, 60.80, 65.80, 70.80, 75.50, 80.20, 86.60, 94.50, 101.90, 102.40 }, // 22 + { 49.80, 55.60, 60.80, 65.50, 70.80, 75.70, 80.50, 86.90, 94.70, 101.10, 102.90 }, // 23 + { 49.80, 55.50, 60.80, 66.50, 70.80, 75.90, 80.80, 86.20, 94.90, 101.30, 103.40 }, // 24 + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.70, 94.40, 101.60, 101.77 }, // 25 + { 49.00, 55.50, 60.80, 66.50, 70.00, 75.30, 80.40, 86.90, 94.90, 101.60, 101.77 }, // 26 + { 49.80, 55.50, 60.60, 66.50, 70.30, 75.50, 80.70, 87.30, 94.40, 101.60, 101.77 }, // 27 + { 48.80, 55.50, 61.60, 65.50, 70.60, 75.70, 80.00, 88.70, 95.90, 101.60, 101.77 }, // 28 + { 48.80, 55.60, 61.80, 65.70, 70.90, 75.90, 80.30, 88.10, 95.40, 101.60, 101.77 }, // 29 + { 48.90, 55.10, 61.20, 65.60, 70.80, 76.10, 81.90, 89.10, 95.50, 101.60, 101.77 }, // 30 + }, + + // IER 1:3 + { // 200 300 400 500 600 700 + { 45.10, 50.10, 57.90, 62.60, 67.40, 71.40, 75.30, 79.90, 84.40, 88.60, 94.40 }, // 10 + { 45.40, 50.50, 58.40, 63.00, 67.70, 71.70, 75.50, 80.10, 84.70, 89.48, 94.82 }, // 11 + { 45.70, 50.90, 58.90, 63.40, 68.00, 72.00, 75.80, 80.30, 85.00, 90.36, 95.24 }, // 12 + { 46.00, 51.30, 59.40, 63.80, 68.30, 72.30, 76.10, 80.50, 85.30, 91.25, 95.66 }, // 13 + { 46.20, 51.70, 59.90, 64.20, 68.60, 72.50, 76.40, 80.70, 85.60, 92.12, 96.08 }, // 14 + { 46.50, 51.80, 60.20, 64.50, 68.90, 72.80, 76.70, 80.90, 85.90, 93.00, 96.50 }, // 15 + { 46.50, 51.70, 59.80, 65.00, 69.20, 73.80, 77.60, 82.80, 88.20, 95.00, 101.00 }, // 16 + { 46.50, 51.60, 59.80, 65.00, 69.20, 74.00, 77.90, 83.20, 88.70, 95.40, 101.40 }, // 17 + { 46.40, 51.50, 59.80, 65.00, 69.20, 74.20, 78.20, 83.60, 89.20, 95.80, 101.80 }, // 18 + { 46.40, 51.40, 59.80, 65.00, 69.20, 74.40, 78.50, 84.00, 89.70, 96.20, 101.77 }, // 19 + { 46.40, 51.40, 56.60, 61.50, 66.30, 70.90, 75.30, 80.60, 85.60, 92.00, 98.10 }, // 20 + { 46.40, 51.50, 56.70, 61.80, 66.50, 71.10, 75.60, 80.80, 85.90, 94.00, 101.77 }, // 21 + { 46.40, 51.60, 56.80, 62.10, 66.70, 71.30, 75.90, 81.00, 86.20, 101.77, 101.77 }, // 22 + { 46.40, 51.70, 56.80, 62.10, 66.80, 71.50, 76.20, 81.20, 86.50, 101.77, 101.77 }, // 23 + { 46.40, 51.80, 56.80, 62.20, 66.80, 71.70, 76.40, 81.40, 86.90, 101.77, 101.77 }, // 24 + { 46.40, 51.90, 56.90, 62.20, 66.90, 71.90, 76.80, 81.50, 87.40, 101.77, 101.77 }, // 25 + { 46.40, 52.00, 56.90, 62.50, 67.10, 76.10, 77.10, 81.70, 101.77, 101.77, 101.77 }, // 26 + { 46.40, 52.10, 56.90, 62.80, 67.30, 76.30, 77.40, 81.90, 101.77, 101.77, 101.77 }, // 27 + { 46.30, 52.20, 57.00, 62.80, 67.50, 76.50, 77.70, 101.77, 101.77, 101.77, 101.77 }, // 28 + { 46.30, 52.30, 57.00, 62.90, 67.70, 76.70, 78.10, 101.77, 101.77, 101.77, 101.77 }, // 29 + { 46.20, 52.30, 57.10, 62.90, 68.20, 73.00, 78.60, 101.77, 101.77, 101.77, 101.77 }, // 30 + }, + diff --git a/Debug-logs/mcu2_dbg_logs b/Debug-logs/mcu2_dbg_logs new file mode 100644 index 0000000..c05968c --- /dev/null +++ b/Debug-logs/mcu2_dbg_logs @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[2021-10-07 14:36:35.680] setup: Initialization Started0 +[2021-10-07 14:36:35.706] setup: LCD Module Init Done0 +[2021-10-07 14:36:35.706] setup: Wire Init Done0 +[2021-10-07 14:36:35.706] setup: Ext EEPROM Init Done0 +[2021-10-07 14:36:35.706] setup: Serial3 Init Done0 +[2021-10-07 14:36:35.713] setup: Parameter read from EEPROM Done0 +[2021-10-07 14:36:35.759] setup: Sensors Init Done0 +[2021-10-07 14:36:35.759] setup: Sensors Init *Failed*0 +[2021-10-07 14:36:36.762] setup: Enable Rotator Button Interrupts Done0 +[2021-10-07 14:37:30.542] setup: Initialization Started0 +[2021-10-07 14:37:30.571] setup: LCD Module Init Done0 +[2021-10-07 14:37:30.571] setup: Wire Init Done0 +[2021-10-07 14:37:30.571] setup: Ext EEPROM Init Done0 +[2021-10-07 14:37:30.571] setup: Serial3 Init Done0 +[2021-10-07 14:37:30.571] setup: Parameter read from EEPROM Done0 +[2021-10-07 14:37:30.624] setup: Sensors Init Done0 +[2021-10-07 14:37:30.624] setup: Sensors Init *Failed*0 +[2021-10-07 14:37:31.620] setup: Enable Rotator Button Interrupts Done0 +[2021-10-07 14:37:38.067] setup: Initial Screen Setup Done 0 +[2021-10-07 14:37:38.067] setup: Check Power Done 0 +[2021-10-07 14:37:38.266] Sending Packet:$VMP10550& +[2021-10-07 14:37:38.367] Sending Packet:$VMP20010& +[2021-10-07 14:37:38.487] Sending Packet:$VMP50001& +[2021-10-07 14:37:38.573] Sending Packet:$VMP60091& +[2021-10-07 14:37:38.689] Retrived Value :54538.00 +[2021-10-07 14:37:38.689] init :sensorType 0 +[2021-10-07 14:37:38.689] 222 +[2021-10-07 14:37:38.689] ovf +[2021-10-07 14:37:38.689] Sending Packet:$VMP700054538& +[2021-10-07 14:37:38.779] Retrived Value :68886.00 +[2021-10-07 14:37:38.779] init :sensorType 1 +[2021-10-07 14:37:38.779] 226 +[2021-10-07 14:37:38.779] ovf +[2021-10-07 14:37:38.779] Sending Packet:$VMP800068886& +[2021-10-07 14:37:38.879] setup: Param Set Default - Done 0 +[2021-10-07 14:37:38.879] setup: Initialization Complete 0 +[2021-10-07 14:37:38.950] tidalVolumeStatusScreen: TV Value Error1 +[2021-10-07 14:40:59.629] $VMIN0000& +[2021-10-07 14:43:32.340] $VS0100440237&$VS0302910000&$VS0100430237&$VS0302920000&$VS0100440239&$VS0302910000&$VS0100430238&$VS0100430241&$VS0302930000&$VS0100440241&$VS0302930000& \ No newline at end of file diff --git a/SI_V2Codebase.si4project/SI_V2Codebase.siproj b/SI_V2Codebase.si4project/SI_V2Codebase.siproj new file mode 100644 index 0000000..90c4e7c Binary files /dev/null and b/SI_V2Codebase.si4project/SI_V2Codebase.siproj differ diff --git a/mcu1/README.md b/mcu1/README.md index 777ed30..f4d1cb4 100644 --- a/mcu1/README.md +++ b/mcu1/README.md @@ -1 +1,31 @@ For initiating, use an ATMEga2560 only + + +6 - Sep - 2021 + +- 3.33pm: +- code size before starting with "Stroke length optimizing" + + Sketch uses 105626 bytes (41%) of program storage space. Maximum is 253952 bytes. + Global variables use 2546 bytes (31%) of dynamic memory, leaving 5646 bytes for local variables. Maximum is 8192 bytes. + +- 3.41pm: + added heart beat LED code. + +- 3.45pm + - pick_stroke_length() function body commented + Sketch uses 27532 bytes (10%) of program storage space. Maximum is 253952 bytes. + Global variables use 2548 bytes (31%) of dynamic memory, leaving 5644 bytes for local variables. Maximum is 8192 bytes. + +- 4.40pm + - coding for optimized LUT done.. + Sketch uses 30524 bytes (12%) of program storage space. Maximum is 253952 bytes. + Global variables use 5308 bytes (64%) of dynamic memory, leaving 2884 bytes for local variables. Maximum is 8192 bytes. + + +- 4.51pm + - filling LUT with values + Sketch uses 30524 bytes (12%) of program storage space. Maximum is 253952 bytes. + Global variables use 5308 bytes (64%) of dynamic memory, leaving 2884 bytes for local variables. Maximum is 8192 bytes. + + diff --git a/mcu1/__vm/Upload.vmps.xml b/mcu1/__vm/Upload.vmps.xml new file mode 100644 index 0000000..3207dc4 --- /dev/null +++ b/mcu1/__vm/Upload.vmps.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + 194 +195 float data_sensors[MAX_SENSORS] = {0}; +196 +197 static unsigned long endtime = 0; +198 +199 /* Project Main loop */ +200 +-->201 void loop() +202 { +203 int index = 2; +204 int err = 0; +205 #if PRINT_PROCESSING_TIME +206 unsigned long starttime = millis(); +207 DebugPort.print("L:strt_ts "); +208 DebugPort.println(starttime); +209 #endif +210 checkAlarms(); + + + + + + + + \ No newline at end of file diff --git a/mcu1/relayModule_v2.h b/mcu1/control_board.h similarity index 57% rename from mcu1/relayModule_v2.h rename to mcu1/control_board.h index e893e52..c840a21 100644 --- a/mcu1/relayModule_v2.h +++ b/mcu1/control_board.h @@ -14,75 +14,112 @@ /**************************************************************************/ #ifndef _relayModule_H #define _relayModule_H + + #include "BoardDefines.h" -#define COMP_DIR LOW /*!< Defines the signal at Direction pin of motor driver for CCW rotation */ -#define EXP_DIR HIGH /*!< Defines the signal at Direction pin of motor driver for CW rotation */ -//8mm for 3d printing lead screw -//10mm for mtr screws -#define LEAD_SCREW_PITCH 10 /*!< Lead screw pitch is 12.0 mm, i.e when we rotate it by 360 degree then the linear travel will be 8.0 mm in a direction */ -#define HOME_SENSE_VALUE LOW //1 for PNP(LED glows when sensed, alway high) //0 for NPN (LED off when sensed, alway low) -#define extra_exhale_travel 20.0 -#define power_on_home_travel 200.0 -#define Start_home_travel 200.0 -volatile int Home_attempt_count = 0; -volatile int stop_n_return_pulse_count = 0; - -#define MIN_RPM_NO_ACCEL 250.0 /*!< This setting removes accel/decel in motion profile below mentioned RPM */ -#define CURVE_COMP_STEPS 21 /*!< During inhale motor forward motion is broken in 21 pieces to achieve trapozoidal motion profile */ -#define CURVE_EXP_STEPS 21 /*!< During exhale motor return motion is broken in 21 pieces to achieve trapozoidal motion profile */ - -//A0-A15 D54 to D69 -#define MOTOR_STEP_PIN 48 /*!< A14 Ouput for motor steps to control position & velocity */ //pulse_motor -#define MOTOR_DIR_PIN 49 /*!< A15 Ouput for motor direction control CW/CCW */ -#define HOME_SENSOR_PIN 27 /*!< A3 Input for detecting home position for Moving assembly */ -#define INHALE_RELEASE_VLV_PIN 34 /*!< Ouput for inhale high pressure release line solenoid On/Off */ //Connector for j6 -#define INHALE_VLV_PIN 32 /*! + // 200 300 400 500 600 700 + { 47.30, 57.20, 62.50, 67.40, 71.30, 76.60, 81.50, 87.60, 93.90, 102.20, 110.20 }, /* | */ /* 10 */ // tested + { 47.00, 56.72, 62.40, 67.10, 71.20, 76.50, 81.40, 87.40, 93.90, 102.10, 109.90 }, /* | */ /* 11 */ + { 47.50, 56.24, 61.80, 66.80, 71.20, 76.40, 81.30, 87.20, 93.90, 101.90, 109.20 }, /* | */ /* 12 */ + { 46.50, 55.76, 61.40, 66.50, 71.20, 76.30, 81.10, 87.10, 94.00, 101.70, 109.00 }, /* V */ /* 13 */ + { 46.50, 55.28, 61.00, 66.20, 71.10, 76.20, 80.90, 87.00, 94.20, 101.60, 108.90 }, /* */ /* 14 */ + { 45.30, 54.80, 60.30, 65.90, 71.10, 76.10, 80.70, 86.90, 94.40, 101.60, 108.70 }, /* B */ /* 15 */ // tested + { 45.00, 54.58, 60.30, 65.90, 71.00, 75.80, 80.70, 86.90, 94.00, 101.40, 108.40 }, /* P */ /* 16 */ + { 45.00, 54.36, 60.30, 65.90, 71.00, 75.60, 80.60, 86.90, 93.90, 101.20, 108.30 }, /* M */ /* 17 */ + { 44.70, 54.35, 60.30, 65.80, 71.00, 75.40, 80.40, 86.80, 93.70, 100.90, 108.10 }, /* */ /* 18 */ + { 44.50, 54.28, 60.30, 65.80, 71.00, 75.20, 80.60, 86.80, 93.40, 100.50, 107.70 }, /* 10 */ /* 19 */ + { 44.30, 54.20, 60.30, 65.80, 71.00, 75.20, 80.50, 86.70, 93.10, 100.60, 107.60 }, /* */ /* 20 */ // tested + { 44.10, 54.30, 60.30, 65.70, 71.00, 75.20, 80.50, 86.70, 86.70, 100.70, 107.90 }, /* to */ /* 21 */ + { 44.90, 54.30, 60.30, 65.60, 70.90, 75.20, 80.50, 86.80, 86.90, 100.90, 108.00 }, /* */ /* 22 */ + { 44.70, 54.30, 60.30, 65.60, 70.80, 75.20, 80.50, 86.80, 86.10, 101.10, 108.30 }, /* 30 */ /* 23 */ + { 44.50, 54.40, 60.30, 65.50, 70.70, 75.20, 80.50, 86.80, 86.30, 101.30, 108.70 }, /* */ /* 24 */ + { 44.20, 54.40, 60.20, 65.50, 70.70, 75.20, 80.50, 86.80, 94.70, 101.30, 109.00 }, /* */ /* 25 */ // tested + { 44.30, 54.50, 60.20, 60.50, 70.60, 75.30, 80.80, 87.40, 94.50, 102.80, 108.70 }, /* */ /* 26 */ + { 44.50, 54.60, 60.30, 65.50, 70.60, 75.30, 81.10, 87.80, 95.00, 103.10, 108.10 }, /* */ /* 27 */ + { 44.60, 54.70, 60.30, 65.50, 70.60, 75.40, 81.40, 88.20, 96.50, 103.60, 107.70 }, /* */ /* 28 */ + { 44.70, 54.80, 60.40, 65.50, 70.50, 75.50, 81.70, 88.90, 97.00, 104.30, 107.00 }, /* */ /* 29 */ + { 44.70, 54.90, 60.40, 65.50, 70.50, 75.60, 81.90, 89.60, 98.50, 104.77, 106.77 }, /* */ /* 30 */ // tested + }, + + + // IER - 1:2 + { // Tidal volume 200 to 700 (11 entries in all) ---> + // 200 300 400 500 600 700 + { 49.90, 54.90, 60.50, 66.10, 70.60, 75.20, 80.50, 86.60, 93.60, 100.80, 109.10 }, /* | */ /* 10 */ // tested + { 49.80, 54.80, 60.50, 66.10, 70.60, 75.20, 80.50, 86.30, 93.60, 100.50, 108.00 }, /* | */ /* 11 */ + { 49.70, 54.80, 60.40, 66.00, 70.60, 75.20, 80.40, 85.90, 92.90, 100.40, 107.10 }, /* | */ /* 12 */ + { 49.60, 54.70, 60.40, 65.80, 70.60, 75.20, 80.40, 85.80, 92.40, 100.10, 106.10 }, /* V */ /* 13 */ + { 49.50, 54.70, 60.40, 65.80, 70.60, 75.20, 80.30, 85.80, 92.40, 99.90, 105.30 }, /* */ /* 14 */ + { 49.30, 54.70, 60.30, 65.50, 70.50, 75.20, 80.30, 85.80, 92.10, 99.10, 105.10 }, /* B */ /* 15 */ // tested + { 49.00, 54.70, 60.50, 65.50, 70.50, 75.30, 81.20, 85.60, 92.10, 99.10, 108.60 }, /* P */ /* 16 */ + { 49.80, 54.70, 60.50, 65.50, 70.50, 75.40, 81.20, 85.40, 92.10, 99.10, 108.80 }, /* M */ /* 17 */ + { 49.50, 54.70, 60.50, 65.50, 70.50, 75.30, 81.10, 85.40, 92.10, 99.10, 108.00 }, /* */ /* 18 */ + { 49.50, 54.70, 60.50, 65.50, 70.50, 75.20, 80.10, 85.20, 92.00, 98.90, 108.20 }, /* 10 */ /* 19 */ + { 49.30, 54.70, 60.50, 65.50, 70.50, 75.10, 80.10, 85.50, 92.00, 98.70, 106.60 }, /* */ /* 20 */ // tested + { 49.00, 54.80, 60.60, 65.50, 70.50, 75.10, 80.10, 85.80, 92.30, 98.70, 101.90 }, /* to */ /* 21 */ + { 49.80, 54.80, 60.70, 65.50, 70.40, 75.10, 80.10, 85.60, 92.50, 98.90, 102.40 }, /* */ /* 22 */ + { 49.80, 54.90, 60.70, 65.70, 70.50, 75.10, 80.10, 86.00, 92.70, 99.10, 102.90 }, /* 30 */ /* 23 */ + { 49.80, 55.00, 60.70, 65.90, 70.40, 75.10, 80.20, 86.00, 92.90, 99.30, 103.40 }, /* */ /* 24 */ + { 49.00, 55.00, 60.70, 66.10, 70.50, 75.10, 80.20, 86.10, 93.00, 101.00, 105.77 }, /* */ /* 25 */ // tested + { 49.00, 55.00, 60.80, 66.50, 70.50, 75.30, 80.40, 86.90, 94.00, 101.60, 101.77 }, /* */ /* 26 */ + { 49.80, 55.00, 60.80, 66.50, 70.50, 75.50, 80.70, 87.30, 94.40, 101.60, 101.77 }, /* */ /* 27 */ + { 48.80, 55.00, 60.80, 65.50, 70.50, 75.70, 81.00, 88.70, 95.40, 101.60, 101.77 }, /* */ /* 28 */ + { 48.80, 55.10, 60.80, 65.70, 70.50, 75.90, 81.30, 88.10, 95.60, 101.60, 101.77 }, /* */ /* 29 */ + { 48.90, 55.10, 60.90, 65.60, 70.50, 76.10, 81.90, 88.90, 95.60, 101.60, 101.77 }, /* */ /* 30 */ // tested + }, + + + // IER - 1:3 + { // Tidal volume 200 to 700 (11 entries in all) ---> + // 200 300 400 500 600 700 + { 45.10, 54.70, 60.90, 65.60, 70.70, 75.40, 80.90, 86.90, 93.40, 99.80, 107.00 }, /* | */ /* 10 */ + { 45.40, 54.70, 60.70, 65.50, 67.70, 75.40, 80.90, 86.80, 93.70, 99.48, 106.82 }, /* | */ /* 11 */ + { 45.70, 54.70, 60.50, 65.50, 68.00, 75.30, 80.70, 86.60, 92.00, 99.36, 106.24 }, /* | */ /* 12 */ + { 46.00, 54.70, 60.40, 65.50, 68.30, 75.30, 80.50, 86.40, 92.30, 99.25, 106.00 }, /* V */ /* 13 */ + { 46.20, 54.70, 60.30, 65.50, 68.60, 75.20, 80.30, 86.20, 92.60, 99.12, 106.08 }, /* */ /* 14 */ + { 46.50, 54.80, 60.20, 65.50, 70.60, 75.10, 80.10, 85.90, 91.90, 99.00, 106.80 }, /* B */ /* 15 */ + { 46.50, 54.80, 60.20, 65.60, 69.20, 75.10, 80.10, 86.10, 91.20, 99.00, 101.00 }, /* P */ /* 16 */ + { 46.50, 54.80, 60.40, 65.60, 69.20, 75.20, 80.20, 86.30, 92.70, 99.40, 101.40 }, /* M */ /* 17 */ + { 46.40, 54.80, 60.50, 65.70, 69.20, 75.30, 80.30, 86.50, 92.20, 99.80, 101.80 }, /* */ /* 18 */ + { 46.40, 54.80, 60.60, 65.80, 69.20, 75.20, 80.30, 86.60, 93.70, 100.20, 101.77 }, /* 10 */ /* 19 */ + { 46.40, 54.80, 60.60, 65.90, 70.40, 75.20, 80.30, 86.60, 93.90, 100.50, 104.10 }, /* */ /* 20 */ + { 46.40, 54.90, 60.70, 66.00, 66.50, 75.80, 80.60, 86.80, 93.90, 101.00, 101.77 }, /* to */ /* 21 */ + { 46.40, 54.90, 60.80, 62.10, 66.70, 76.10, 81.20, 87.00, 93.90, 101.77, 101.77 }, /* */ /* 22 */ + { 46.40, 55.00, 60.80, 66.00, 66.80, 76.50, 81.90, 87.50, 94.50, 101.77, 101.77 }, /* 30 */ /* 23 */ + { 46.40, 55.10, 60.80, 66.10, 66.80, 76.90, 82.60, 88.40, 94.90, 101.77, 101.77 }, /* */ /* 24 */ + { 46.40, 55.20, 60.90, 66.20, 71.40, 77.30, 83.20, 89.80, 95.40, 101.77, 101.77 }, /* */ /* 25 */ + { 46.40, 55.10, 61.00, 66.50, 67.10, 77.70, 83.20, 93.70, 101.77, 101.77, 101.77 }, /* */ /* 26 */ + { 46.40, 55.10, 61.00, 66.80, 67.30, 77.90, 83.60, 97.90, 101.77, 101.77, 101.77 }, /* */ /* 27 */ + { 46.30, 55.20, 61.10, 66.80, 67.50, 78.30, 84.40, 101.77, 101.77, 101.77, 101.77 }, /* */ /* 28 */ + { 46.30, 55.30, 61.20, 67.00, 67.70, 78.80, 84.80, 101.77, 101.77, 101.77, 101.77 }, /* */ /* 29 */ + { 46.20, 55.10, 61.30, 67.20, 73.20, 79.00, 85.50, 101.77, 101.77, 101.77, 101.77 }, /* */ /* 30 */ + }, + +}; + + +// exported variables... +extern volatile float Stroke_length_new; /*!< Auto calculated Stroke length based on Tidal Volume lookup table created based on our calibration.*/ +extern volatile float tidal_volume_new; /*!< User settable Tidal Volume setting to calculate equivalent Stroke length to compress */ +extern volatile float BPM_new; /*!< User settable BPM setting to calculate cycle time */ +extern volatile float IER_new; /*!< User settable inhale:exhale ratio */ + + + +#define RR_LOWEST_VALUE (10) +#define RR_HIGHEST_VALUE (30) +#define RR_STEP_VALUE (1) +#define TV_LOWEST_VLAUE (200) +#define TV_HIGHEST_VLAUE (700) +#define TV_STEP_VLAUE (50) + +int get_index_from_RR (int rr) { + + if (rr < RR_LOWEST_VALUE) { + return 0; + } + else if (rr > RR_HIGHEST_VALUE) { + return (RR_HIGHEST_VALUE - RR_LOWEST_VALUE); + } + else { + return (rr - RR_LOWEST_VALUE); + } + +} + +int get_index_from_TV (int tv) { + + int index = 0; + + switch (tv) + { + case 200: index = 0; break; + case 250: index = 1; break; + case 300: index = 2; break; + case 350: index = 3; break; + case 400: index = 4; break; + case 450: index = 5; break; + case 500: index = 6; break; + case 550: index = 7; break; + case 600: index = 8; break; + case 650: index = 9; break; + case 700: index = 10; break; + default: index = 0; break; + } + + if (tv < TV_LOWEST_VLAUE) { + return 0; + } + else if (tv > TV_HIGHEST_VLAUE) { + return 10; + } + else { + return index; + } + +} + +int get_index_from_IER (int ier) { + + int ier_index = 0; + + switch (ier) + { + default: + case 1: // IER = 1:1 + ier_index = 0; + break; + case 2: // IER = 1:2 + ier_index = 1; + break; + case 3: // IER = 1:3 + ier_index = 2; + break; + + } + + return ier_index; + +} + + +void pick_stroke_length (void) { + + int index1, index2, index3; + + index1 = get_index_from_IER (IER_new); + index2 = get_index_from_RR (BPM_new); + index3 = get_index_from_TV (tidal_volume_new); + +// Stroke_length_new = ier_bpm_tv_2_strk_len[index1][index2][index3]; + Stroke_length_new = ier_bpm_tv_2_strk_len[index1][index2][index3].strk_len; + + // ------------------------------------------------------------- + + DebugPort.print("index1 : "); + DebugPort.print(index1); + DebugPort.print(" index2 : "); + DebugPort.print(index2); + DebugPort.print(" index3 : "); + DebugPort.print(index3); + DebugPort.print(" SL_new : "); + DebugPort.println(Stroke_length_new); + +} + + +void update_stroke_length_in_eeprom (float length) { + + int index1, index2, index3; + int eepAddress; + STRK_LEN_U save_element; + + index1 = get_index_from_IER (IER_new); + index2 = get_index_from_RR (BPM_new); + index3 = get_index_from_TV (tidal_volume_new); + + // update in system variable + ier_bpm_tv_2_strk_len[index1][index2][index3].strk_len = length; + // update in eeprom as well.. + eepAddress = index1 * IER_TABLE_SIZE + index2 * BPM_ROW_SIZE + index3 * ELEMENT_SIZE; + save_element.strk_len = length; + + char *c_ptr = (char*)&save_element.word; + for (int i = 0; i < (sizeof(float)); i++) + { + EEPROM.update(eepAddress, *c_ptr); + eepAddress++; + c_ptr++; + + } + + // ------------------------------------------------------------- + + DebugPort.print("index1 : "); + DebugPort.print(index1); + DebugPort.print(", IER_TABLE_SIZE : "); + DebugPort.print(IER_TABLE_SIZE); + DebugPort.print(", index1 * IER_TABLE_SIZE : "); + DebugPort.println(index1 * IER_TABLE_SIZE); + + DebugPort.print("index2 : "); + DebugPort.print(index2); + DebugPort.print(", BPM_ROW_SIZE : "); + DebugPort.print(BPM_ROW_SIZE); + DebugPort.print(", index2 * BPM_ROW_SIZE : "); + DebugPort.println(index2 * BPM_ROW_SIZE); + + DebugPort.print("index3 : "); + DebugPort.print(index3); + DebugPort.print(", ELEMENT_SIZE : "); + DebugPort.print(ELEMENT_SIZE); + DebugPort.print(", index3 * ELEMENT_SIZE : "); + DebugPort.println(index3 * ELEMENT_SIZE); + + DebugPort.print("eepAddress : "); + DebugPort.println(eepAddress); + + DebugPort.print(" index2 : "); + DebugPort.print(index2); + DebugPort.print(" index3 : "); + DebugPort.print(index3); + DebugPort.print(" SL_new : "); + DebugPort.println(Stroke_length_new); + DebugPort.print(" eepAddress : "); + DebugPort.println(eepAddress); + + + DebugPort.print("index1 : "); + DebugPort.print(index1); + DebugPort.print(" index2 : "); + DebugPort.print(index2); + DebugPort.print(" index3 : "); + DebugPort.print(index3); + DebugPort.print(" SL_new : "); + DebugPort.println(Stroke_length_new); + DebugPort.print(" eepAddress : "); + DebugPort.println(eepAddress); + +} + +void print_stride_lenght_tables (void) { + + +// float f = 0.00f; //Variable to store data read from EEPROM. +// int eeAddress = 0; //EEPROM address to start reading from +// +// //Get the float data from the EEPROM at position 'eeAddress' +// EEPROM.get(eeAddress, f); +// Serial.println(f, 3); //This may print 'ovf, nan' if the data inside the EEPROM is not a valid float. + + DebugPort.println ("\r\nStride length table..\r\n"); + for (int i = 0; i = 100 + #include "arduino.h" +#else + #include "WProgram.h" +#endif + + +#define IER_TABLE_COUNT (3) +#define BPM_ROWS_COUNT (21) // 10BPM to 30BPM (inclusive limits) +#define TIDAL_VOLUMES_COUNT (11) // 200 to 700 in steps of 50 (inclusive limits) + +#define ELEMENT_SIZE (sizeof(float)) +#define BPM_ROW_SIZE (ELEMENT_SIZE * TIDAL_VOLUMES_COUNT) +#define IER_TABLE_SIZE (BPM_ROW_SIZE * BPM_ROWS_COUNT) + +// structure declarations +typedef union strk_len_u { + + float strk_len; + uint32_t word; // just to access 4 bytes at ones for blank check + +} STRK_LEN_U; + + + +//extern STRK_LEN_U ier_bpm_tv_2_strk_len[3][21][11]; +extern STRK_LEN_U ier_bpm_tv_2_strk_len[IER_TABLE_COUNT][BPM_ROWS_COUNT][TIDAL_VOLUMES_COUNT]; + + + + + +// variable declarations +//const volatile float ier_bpm_tv_2_strk_len[3][21][11]; + + +// function prototypes.. +void pick_stroke_length (void); +void update_stroke_length_in_eeprom (float length); +void print_stride_lenght_tables (void); +void print_stride_lenght_tables_from_eeprom (void); +void update_stride_length (void); + + + +#endif + diff --git a/mcu1/mcu1.ino b/mcu1/mcu1.ino index dcea3b9..8419e83 100644 --- a/mcu1/mcu1.ino +++ b/mcu1/mcu1.ino @@ -1,419 +1,505 @@ #include "Arduino.h" #include "BoardDefines.h" -#include "relayModule_v2.h" -#include "./libraries/MsTimer2/MsTimer2.cpp" -//***************** - -//#include "Ventcomm.cpp" +#include "control_board.h" #include "gauge_pressure.h" -//#include "relayModule.h" - -void setup() -{ +#include "dataBase.h" - DebugPort.begin(115200); // The Serial port of Arduino baud rate. - DebugPort.println(F("Signum Techniks")); // say hello to check serial line - Serial3.begin(115200); - - //pinMode(INDICATOR_LED, OUTPUT); - pinMode(LED_1_PIN, OUTPUT); - pinMode(LED_2_PIN, OUTPUT); - pinMode(LED_3_PIN, OUTPUT); - pinMode(LED_4_PIN, OUTPUT); - pinMode(LED_5_PIN, OUTPUT); - - digitalWrite(LED_1_PIN, HIGH); - - //Stepper Motor step and direction - pinMode(MOTOR_STEP_PIN, OUTPUT); - digitalWrite(MOTOR_STEP_PIN, HIGH); - pinMode(MOTOR_DIR_PIN, OUTPUT); - digitalWrite(MOTOR_DIR_PIN, LOW); - - //motor controls & Home pins - //pinMode(MOTOR_RUN_PIN, INPUT_PULLUP); - pinMode(HOME_SENSOR_PIN, INPUT_PULLUP); - //digitalWrite(MOTOR_RUN_PIN, HIGH); - digitalWrite(HOME_SENSOR_PIN, HIGH); - - //Valves - pinMode(EXHALE_VLV_PIN, OUTPUT); - pinMode(INHALE_VLV_PIN, OUTPUT); - pinMode(O2Cyl_VLV_PIN, OUTPUT); - pinMode(INHALE_RELEASE_VLV_PIN, OUTPUT); - //Valves Pin Initialize - digitalWrite(EXHALE_VLV_PIN, LOW); - digitalWrite(INHALE_VLV_PIN, LOW); - digitalWrite(O2Cyl_VLV_PIN, LOW); - digitalWrite(INHALE_RELEASE_VLV_PIN, LOW); +#include "./libraries/MsTimer2/MsTimer2.cpp" - inti_all_Valves(); - //stop_timer(); - digitalWrite(LED_2_PIN, HIGH); +void booting_up (void) { - //home cycle on power up - home_cycle = true; - motion_profile_count_temp = 0; - DebugPort.println("Power On Home Cycle : "); - Home_attempt_count++; - DebugPort.print("Homing attempt count before start : "); DebugPort.println(Home_attempt_count); - run_pulse_count_temp = 0.0; - run_pulse_count = ((micro_stepping * (power_on_home_travel / LEAD_SCREW_PITCH * 1.0)) / 2.0); - DebugPort.print("travel in 'mm' back to home on power up : "); DebugPort.println(power_on_home_travel); - DebugPort.print("Pulses required to travel back to home on power up : "); DebugPort.println(run_pulse_count); - digitalWrite(MOTOR_DIR_PIN, EXP_DIR); - //This is mandatory to initate the Timer block properly - initialize_timer1_for_set_RPM(home_speed_value * 10.0); - run_motor = true; + int i; - digitalWrite(LED_3_PIN, HIGH); - //delay(5000); - flag_Serial_requested = false ; - // DebugPort.println("Requesting paramemters : "); - // Serial3.print("$VSP10001&"); + for (i = 1; i < 5; i++) + { + digitalWrite(LED_1_PIN, i & 1); + delay(100); + digitalWrite(LED_2_PIN, i & 1); + delay(100); + digitalWrite(LED_3_PIN, i & 1); + delay(100); + digitalWrite(LED_4_PIN, i & 1); + delay(100); + digitalWrite(LED_5_PIN, i & 1); + delay(100); + } + } -void loop() -{ - if (send_pressure_data == true) - { - Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); - Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); - Serial3.print(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); - DebugPort.println(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); - delay(100); - // DebugPort.println(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); - } +void led_running (uint8_t inhale) { // inhale = 1 => EXP_DIR, inhale = 0 => COMP_DIR. - if (send_millivolts_data == true) - { - // Ctrl_CreateCommand(PARAMGP_RAW, int value1, int value2) - Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); - Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); - Serial3.print(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); - DebugPort.println(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); - delay(100); - //DebugPort.print(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); - } + static uint8_t mask = 7; + static uint8_t local_delay; - //Expansion completed & Compression start - if ((cycle_start == true) && (exp_start == true) && (exp_end == true) && (exp_timer_end == true)) - { - digitalWrite(LED_4_PIN, HIGH); - digitalWrite(LED_5_PIN, LOW); - EXHALE_VLV_CLOSE(); - Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); - PEEP = Epressure; + local_delay++; + if (local_delay) + return; - INHALE_VLV_OPEN(); - DebugPort.print("IER: 1:"); - DebugPort.print(IER); - DebugPort.print(" BPM: "); - DebugPort.print(BPM); - DebugPort.print(" TV: "); - DebugPort.print(tidal_volume); - DebugPort.print(" Stroke: "); - DebugPort.println(Stroke_length); - - DebugPort.print("Peak Pressure: "); - DebugPort.print(peak_prsur); - DebugPort.print(" Cali. GP0: "); - DebugPort.print(CAL_GP0); - DebugPort.print(" Cali. GP1: "); - DebugPort.println(CAL_GP1); - - DebugPort.print("comp : "); - DebugPort.print((c_end_millis - c_start_millis) / 1000.0); - DebugPort.print("/"); - DebugPort.print(inhale_time); - DebugPort.print(" ExpTime : "); - DebugPort.print((e_timer_end_millis - e_start_millis) / 1000.0); - DebugPort.print("/"); - DebugPort.print(exhale_time); - DebugPort.print(" Cycle : "); - DebugPort.print((e_timer_end_millis - c_start_millis) / 1000.0); - DebugPort.print("/"); - DebugPort.println(cycle_time); - DebugPort.print("Inhale-hold : "); - DebugPort.print(inhale_hold_time / 1000.0); - DebugPort.print(" MotorRet. : "); - DebugPort.println((e_end_millis - e_start_millis) / 1000.0); - DebugPort.println(); - if ((BPM_new != BPM) || (tidal_volume_new != tidal_volume) || (IER_new != IER)) - { - convert_all_set_params_2_machine_values(); + if (inhale) { + mask = mask << 1; + } + else { + mask = mask >> 1; } - Start_inhale_cycle(); - PIP = 0.0; // To catch max value we have t0 make it zero. - } - //compression started & is in progress - if ((cycle_start == true) && (comp_start == true) && (comp_end == false)) - { - Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); - if (Ipressure > PIP) - { - PIP = Ipressure; -// DebugPort.print("PIP:"); -// DebugPort.println(Ipressure); + if (mask && ((mask & 0x1F) == 0)) { + mask = 7; } - if (Ipressure > peak_prsur) - { - INHALE_VLV_CLOSE(); - //Stop motor - Emergency_motor_stop = true; - DebugPort.print("\npeak detected for PIP:"); DebugPort.println(Ipressure); + else { + if (mask == 0) { + mask = (0x07 << 2); // 0x1C; + } } - } + - //Compression completed & start Expansion - if ((cycle_start == true) && (comp_start == true) && (comp_end == true)) - { - digitalWrite(LED_4_PIN, LOW ); - digitalWrite(LED_5_PIN, HIGH ); + digitalWrite(LED_1_PIN, mask & 0x01); + digitalWrite(LED_2_PIN, mask & 0x02); + digitalWrite(LED_3_PIN, mask & 0x04); + digitalWrite(LED_4_PIN, mask & 0x08); + digitalWrite(LED_5_PIN, mask & 0x10); -// Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); -// PIP = Epressure; - inhale_hold_time = (inhale_time * (inhale_hold_percentage / 100)) * 1000; - delay(inhale_hold_time); //expansion delay +} - Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); - PLAT = Epressure; +void setup (void) { + // i. UART Ports initializations + DebugPort.begin(115200); // The Serial port of Arduino baud rate. + DebugPort.println(F("Signum Techniks")); // say hello to check serial line + Serial3.begin(115200); + // ii. LEDs initializations + pinMode(LED_1_PIN, OUTPUT); + pinMode(LED_2_PIN, OUTPUT); + pinMode(LED_3_PIN, OUTPUT); + pinMode(LED_4_PIN, OUTPUT); + pinMode(LED_5_PIN, OUTPUT); + booting_up (); + + // iii. Stepper Motor step and direction + pinMode(MOTOR_STEP_PIN, OUTPUT); + digitalWrite(MOTOR_STEP_PIN, HIGH); + pinMode(MOTOR_DIR_PIN, OUTPUT); + digitalWrite(MOTOR_DIR_PIN, LOW); + + // iv. Home pin + pinMode(HOME_SENSOR_PIN, INPUT_PULLUP); + digitalWrite(HOME_SENSOR_PIN, HIGH); + + // v. Valves mode & pin Initialize + pinMode(EXHALE_VLV_PIN, OUTPUT); + pinMode(INHALE_VLV_PIN, OUTPUT); + pinMode(O2Cyl_VLV_PIN, OUTPUT); + pinMode(INHALE_RELEASE_VLV_PIN, OUTPUT); + + digitalWrite(EXHALE_VLV_PIN, LOW); + digitalWrite(INHALE_VLV_PIN, LOW); + digitalWrite(O2Cyl_VLV_PIN, LOW); + digitalWrite(INHALE_RELEASE_VLV_PIN, LOW); - Start_exhale_cycle(); - EXHALE_VLV_OPEN(); - //Start_exhale_cycle(); - } + inti_all_Valves(); + // stop_timer(); - //Expansion started & is in progress - if ((cycle_start == true) && (exp_start == true) && (exp_end == false)) - { - Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); - } + + // vi. home cycle on power up + home_cycle = true; + motion_profile_count_temp = 0; + + DebugPort.println("Power On Home Cycle : "); + Home_attempt_count++; + DebugPort.print("Homing attempt count before start : "); + DebugPort.println(Home_attempt_count); + run_pulse_count_temp = 0.0; + run_pulse_count = ((micro_stepping * (power_on_home_travel / LEAD_SCREW_PITCH * 1.0)) / 2.0); + DebugPort.print("travel in 'mm' back to home on power up : "); + DebugPort.println(power_on_home_travel); + DebugPort.print("Pulses required to travel back to home on power up : "); + DebugPort.println(run_pulse_count); + digitalWrite(MOTOR_DIR_PIN, EXP_DIR); + + // This is mandatory to initate the Timer block properly + initialize_timer1_for_set_RPM (home_speed_value * 10.0); + run_motor = true; + + + flag_Serial_requested = false ; + // DebugPort.println("Requesting paramemters : "); + // Serial3.print("$VSP10001&"); + + print_stride_lenght_tables (); + print_stride_lenght_tables_from_eeprom (); + + DebugPort.println ("extracting changes from eeprom and updating stride length table..\r\n"); + update_stride_length (); + + DebugPort.println ("Updated table..\r\n"); + print_stride_lenght_tables (); + + + } -ISR(TIMER1_COMPA_vect) -{ //timer1 interrupt 1Hz toggles pin 13 (LED) - //generates pulse wave of frequency 1Hz/2 = 0.5kHz (takes two cycles for full wave- toggle high then toggle low) - if (run_motor == true) - { - if ((motion_profile_count_temp == 0) && (run_pulse_count_temp == 0.0)) - { - //compression cycle start only once - if ((comp_start == true) & (comp_end == false)) - { - //DebugPort.print("comp: "); DebugPort.println(motion_profile_count_temp); - c_start_millis = millis(); - run_pulse_count = compression_step_array[motion_profile_count_temp]; - digitalWrite(MOTOR_DIR_PIN, COMP_DIR); - OCR1A = OCR1A_comp_array[motion_profile_count_temp]; - load_TCCR1B_var(TCCR1B_comp_array[motion_profile_count_temp]); - Emergency_motor_stop = false; - INHALE_RELEASE_VLV_CLOSE(); + +int toggle = 0; +int f_test_data_updated; + +void loop (void) { + + // for heart beat.. + toggle = ~toggle; +// digitalWrite(LED_1_PIN, toggle); + + + if (send_pressure_data == true) { + Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); + Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + Serial3.print(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); + DebugPort.println(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); + delay(100); + // DebugPort.println(Ctrl_CreateCommand(PARAMGP_PRS, Ipressure * 100, Epressure * 100)); + } + + if (send_millivolts_data == true) { + // Ctrl_CreateCommand(PARAMGP_RAW, int value1, int value2) + Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); + Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + Serial3.print(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); + DebugPort.println(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); + delay(100); + //DebugPort.print(Ctrl_CreateCommand(PARAMGP_RAW, IRaw, ERaw)); + } + + // 1. Expansion completed & Compression start + if ((cycle_start == true) && (exp_start == true) && (exp_end == true) && (exp_timer_end == true)) { + // digitalWrite(LED_4_PIN, HIGH); + // digitalWrite(LED_5_PIN, LOW); + EXHALE_VLV_CLOSE(); + Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + PEEP = Epressure; + INHALE_VLV_OPEN(); - } - - //after inhale-hold time --> Expansion cycle start only once - if ((exp_start == true) & (exp_end == false)) - { - //DebugPort.print("exp: "); DebugPort.println(motion_profile_count_temp); - e_start_millis = millis(); - run_pulse_count = expansion_step_array[motion_profile_count_temp]; - digitalWrite(MOTOR_DIR_PIN, EXP_DIR); - OCR1A = OCR1A_exp_array[motion_profile_count_temp]; - load_TCCR1B_var(TCCR1B_exp_array[motion_profile_count_temp]); - Emergency_motor_stop = false; - INHALE_RELEASE_VLV_CLOSE(); - INHALE_VLV_CLOSE(); - //Commented to check if i can open the Valve after hold time.. so hold time and motor retraction will have overlap. - //EXHALE_VLV_OPEN(); - } + + DebugPort.print("Peak Pressure: "); + DebugPort.print(peak_prsur); + DebugPort.print(" Cali. GP0: "); + DebugPort.print(CAL_GP0); + DebugPort.print(" Cali. GP1: "); + DebugPort.println(CAL_GP1); + + DebugPort.print("comp : "); + DebugPort.print((c_end_millis - c_start_millis) / 1000.0); + DebugPort.print("/"); + DebugPort.print(inhale_time); + DebugPort.print(" ExpTime : "); + DebugPort.print((e_timer_end_millis - e_start_millis) / 1000.0); + DebugPort.print("/"); + DebugPort.print(exhale_time); + DebugPort.print(" Cycle : "); + DebugPort.print((e_timer_end_millis - c_start_millis) / 1000.0); + DebugPort.print("/"); + DebugPort.println(cycle_time); + DebugPort.print("Inhale-hold : "); + DebugPort.print(inhale_hold_time / 1000.0); + DebugPort.print(" MotorRet. : "); + DebugPort.println((e_end_millis - e_start_millis) / 1000.0); + DebugPort.println(); + + DebugPort.print("IER: 1:"); + DebugPort.print(IER); + DebugPort.print(" BPM: "); + DebugPort.print(BPM); + DebugPort.print(" TV: "); + DebugPort.print(tidal_volume); + DebugPort.print(" Stroke: "); + DebugPort.println(Stroke_length); + DebugPort.println(); + + // if ((BPM_new != BPM) || (tidal_volume_new != tidal_volume) || (IER_new != IER)) + if (f_test_data_updated || (BPM_new != BPM) || (tidal_volume_new != tidal_volume) || (IER_new != IER)) { + f_test_data_updated = 0; + convert_all_set_params_2_machine_values(); + } + Start_inhale_cycle(); + PIP = 0.0; // To catch max value we have t0 make it zero. } - //Actual motor pulse generation block - if (run_pulse_count_temp < run_pulse_count) - { - if (Emergency_motor_stop == false) - digitalWrite(MOTOR_STEP_PIN, digitalRead(MOTOR_STEP_PIN) ^ 1); - run_pulse_count_temp = run_pulse_count_temp + 0.5; - if (home_cycle == true) - { - if (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE) - { - run_motor = false; - run_pulse_count_temp = 0.0; - home_cycle = false; - motion_profile_count_temp = 0; - DebugPort.println("Home Cycle Complete..."); - Home_attempt_count = 0; - if (cycle_start == true) - inti_Start(); + + // 2. compression started & is in progress + if ((cycle_start == true) && (comp_start == true) && (comp_end == false)) { + Ipressure = get_calibrated_pressure_MPX5010((sensor_e)INHALE_GAUGE_PRESSURE, &IRaw); + if (Ipressure > PIP) { + PIP = Ipressure; + // DebugPort.print("PIP:"); + // DebugPort.println(Ipressure); } - } - if ((cycle_start == true) && (digitalRead(MOTOR_DIR_PIN) == EXP_DIR)) - { - if (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE) - { - run_pulse_count_temp = run_pulse_count; - motion_profile_count_temp = CURVE_EXP_STEPS; - Emergency_motor_stop = true; - //motion_profile_count_temp = 0; - //run_pulse_count_temp = 0.0; + if (Ipressure > peak_prsur) { + INHALE_VLV_CLOSE(); + //Stop motor + Emergency_motor_stop = true; + DebugPort.print("\npeak detected for PIP:"); DebugPort.println(Ipressure); } - } + + led_running (COMP_DIR); } - else - { - noInterrupts(); - run_motor = false; - run_pulse_count_temp = 0.0; - motion_profile_count_temp = motion_profile_count_temp + 1; - //Compression end check - if ((comp_start == true) & (comp_end == false)) - { - if (motion_profile_count_temp < CURVE_COMP_STEPS) - { - //DebugPort.print("comp: "); DebugPort.println(motion_profile_count_temp); - run_pulse_count = compression_step_array[motion_profile_count_temp]; - digitalWrite(MOTOR_DIR_PIN, COMP_DIR); - OCR1A = OCR1A_comp_array[motion_profile_count_temp]; - load_TCCR1B_var(TCCR1B_comp_array[motion_profile_count_temp]); - run_motor = true; - } - else - { - c_end_millis = millis(); - motion_profile_count_temp = 0; - run_pulse_count_temp = 0.0; - Emergency_motor_stop = false; - //DebugPort.print("\nPIP:"); - //DebugPort.println(PIP); - INHALE_RELEASE_VLV_CLOSE(); - INHALE_VLV_CLOSE(); - //commented as this will be Opened after Inhale-Hold Delay. - //EXHALE_VLV_OPEN(); - comp_end = true; + + // 3. Compression completed & start Expansion + if ((cycle_start == true) && (comp_start == true) && (comp_end == true)) { + // digitalWrite(LED_4_PIN, LOW ); + // digitalWrite(LED_5_PIN, HIGH ); + // Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + // PIP = Epressure; + inhale_hold_time = (inhale_time * (inhale_hold_percentage / 100)) * 1000; + delay(inhale_hold_time); //expansion delay + Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + PLAT = Epressure; + Start_exhale_cycle(); + EXHALE_VLV_OPEN(); + // Start_exhale_cycle(); + } + + // 4. Expansion started & is in progress + if ((cycle_start == true) && (exp_start == true) && (exp_end == false)) { + Epressure = get_calibrated_pressure_MPX5010((sensor_e)EXHALE_GUAGE_PRESSURE, &ERaw); + led_running (EXP_DIR); + } + +} + + + + +ISR (TIMER1_COMPA_vect) { + + // timer1 interrupt 1Hz toggles pin 13 (LED) + // generates pulse wave of frequency 1Hz/2 = 0.5kHz (takes two cycles for full wave- toggle high then toggle low) + + // for heart beat.. + static uint8_t blink; + + blink = ~blink; + // digitalWrite(LED_3_PIN, blink); + + + if (run_motor == true) { + + if ((motion_profile_count_temp == 0) && (run_pulse_count_temp == 0.0)) { + // compression cycle start only once + if ((comp_start == true) & (comp_end == false)) { + //DebugPort.print("comp: "); DebugPort.println(motion_profile_count_temp); + c_start_millis = millis(); + run_pulse_count = compression_step_array[motion_profile_count_temp]; + digitalWrite(MOTOR_DIR_PIN, COMP_DIR); + OCR1A = OCR1A_comp_array[motion_profile_count_temp]; + load_TCCR1B_var(TCCR1B_comp_array[motion_profile_count_temp]); + Emergency_motor_stop = false; + INHALE_RELEASE_VLV_CLOSE(); + EXHALE_VLV_CLOSE(); + INHALE_VLV_OPEN(); + } + + // after inhale-hold time --> Expansion cycle start only once + if ((exp_start == true) & (exp_end == false)) { + // DebugPort.print("exp: "); DebugPort.println(motion_profile_count_temp); + e_start_millis = millis(); + run_pulse_count = expansion_step_array[motion_profile_count_temp]; + digitalWrite(MOTOR_DIR_PIN, EXP_DIR); + OCR1A = OCR1A_exp_array[motion_profile_count_temp]; + load_TCCR1B_var(TCCR1B_exp_array[motion_profile_count_temp]); + Emergency_motor_stop = false; + INHALE_RELEASE_VLV_CLOSE(); + INHALE_VLV_CLOSE(); + //Commented to check if i can open the Valve after hold time.. so hold time and motor retraction will have overlap. + //EXHALE_VLV_OPEN(); + } } - } - //expansion end check - if ((exp_start == true) & (exp_end == false)) - { - if (motion_profile_count_temp < CURVE_EXP_STEPS) - { - //DebugPort.print("exp: "); DebugPort.println(motion_profile_count_temp); - run_pulse_count = expansion_step_array[motion_profile_count_temp]; - digitalWrite(MOTOR_DIR_PIN, EXP_DIR); - OCR1A = OCR1A_exp_array[motion_profile_count_temp]; - load_TCCR1B_var(TCCR1B_exp_array[motion_profile_count_temp]); - run_motor = true; + + // Actual motor pulse generation block + if (run_pulse_count_temp < run_pulse_count) { + if (Emergency_motor_stop == false) + digitalWrite(MOTOR_STEP_PIN, digitalRead(MOTOR_STEP_PIN) ^ 1); + + run_pulse_count_temp = run_pulse_count_temp + 0.5; + if (home_cycle == true) { + if (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE) { + run_motor = false; + run_pulse_count_temp = 0.0; + home_cycle = false; + motion_profile_count_temp = 0; + DebugPort.println("Home Cycle Complete..."); + Home_attempt_count = 0; + if (cycle_start == true) + inti_Start(); + } + } + if ((cycle_start == true) && (digitalRead(MOTOR_DIR_PIN) == EXP_DIR)) { + if (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE) { + run_pulse_count_temp = run_pulse_count; + motion_profile_count_temp = CURVE_EXP_STEPS; + Emergency_motor_stop = true; + // motion_profile_count_temp = 0; + // run_pulse_count_temp = 0.0; + } + } } - else - { - e_end_millis = millis(); - motion_profile_count_temp = 0; - run_pulse_count_temp = 0.0; - Emergency_motor_stop = false; - INHALE_RELEASE_VLV_CLOSE(); - //these are skipped to enable motor fast retract and wait for timer to close the exhale valve - // EXHALE_VLV_CLOSE(); - // INHALE_VLV_OPEN(); - exp_end = true; + + else { + noInterrupts(); + run_motor = false; + run_pulse_count_temp = 0.0; + motion_profile_count_temp = motion_profile_count_temp + 1; + //Compression end check + if ((comp_start == true) & (comp_end == false)) { + if (motion_profile_count_temp < CURVE_COMP_STEPS) { + //DebugPort.print("comp: "); DebugPort.println(motion_profile_count_temp); + run_pulse_count = compression_step_array[motion_profile_count_temp]; + digitalWrite(MOTOR_DIR_PIN, COMP_DIR); + OCR1A = OCR1A_comp_array[motion_profile_count_temp]; + load_TCCR1B_var(TCCR1B_comp_array[motion_profile_count_temp]); + run_motor = true; + } + else { + c_end_millis = millis(); + motion_profile_count_temp = 0; + run_pulse_count_temp = 0.0; + Emergency_motor_stop = false; + //DebugPort.print("\nPIP:"); + //DebugPort.println(PIP); + INHALE_RELEASE_VLV_CLOSE(); + INHALE_VLV_CLOSE(); + //commented as this will be Opened after Inhale-Hold Delay. + //EXHALE_VLV_OPEN(); + comp_end = true; + } + } + //expansion end check + if ((exp_start == true) & (exp_end == false)) { + if (motion_profile_count_temp < CURVE_EXP_STEPS) { + //DebugPort.print("exp: "); DebugPort.println(motion_profile_count_temp); + run_pulse_count = expansion_step_array[motion_profile_count_temp]; + digitalWrite(MOTOR_DIR_PIN, EXP_DIR); + OCR1A = OCR1A_exp_array[motion_profile_count_temp]; + load_TCCR1B_var(TCCR1B_exp_array[motion_profile_count_temp]); + run_motor = true; + } + else { + e_end_millis = millis(); + motion_profile_count_temp = 0; + run_pulse_count_temp = 0.0; + Emergency_motor_stop = false; + INHALE_RELEASE_VLV_CLOSE(); + //these are skipped to enable motor fast retract and wait for timer to close the exhale valve + // EXHALE_VLV_CLOSE(); + // INHALE_VLV_OPEN(); + exp_end = true; + } + } + interrupts(); } - } - interrupts(); } - } } -bool Start_exhale_cycle() -{ - Serial3.print(Ctrl_CreateCommand(EXPAN, PIP * 10, 0)); //expansion flag - DebugPort.print(Ctrl_CreateCommand(EXPAN, PIP * 10, 0)); //expansion flag - DebugPort.print("\nPIP : "); DebugPort.println(PIP); - //DebugPort.print("CYCLE Exhale Time: " );DebugPort.println(exhale_time); - MsTimer2::set(exhale_time * 1000, (void (*)())Exhale_timer_timout); //period - MsTimer2::start(); - - cycle_start = true; - comp_start = false; - comp_end = false; - exp_start = true; - exp_end = false; - exp_timer_end = false; - run_motor = true; - return true; + + +bool Start_exhale_cycle (void) { + + Serial3.print(Ctrl_CreateCommand(EXPAN, PIP * 10, 0)); //expansion flag + DebugPort.print(Ctrl_CreateCommand(EXPAN, PIP * 10, 0)); //expansion flag + DebugPort.print("\nPIP : "); DebugPort.println(PIP); + + //DebugPort.print("CYCLE Exhale Time: " );DebugPort.println(exhale_time); + MsTimer2::set(exhale_time * 1000, (void (*)())Exhale_timer_timout); //period + MsTimer2::start(); + + cycle_start = true; + comp_start = false; + comp_end = false; + exp_start = true; + exp_end = false; + exp_timer_end = false; + run_motor = true; + + return true; + } -bool Start_inhale_cycle() -{ - Serial3.print(Ctrl_CreateCommand(COMP, PEEP * 10, PLAT * 10)); //comp start flag - DebugPort.print(Ctrl_CreateCommand(COMP, PEEP * 10, PLAT * 10)); //comp start flag - DebugPort.print("\nPEEP: "); DebugPort.println(PEEP); - DebugPort.print("PLAT: "); DebugPort.println(PLAT); - - cycle_start = true; - comp_start = true; - comp_end = false; - exp_start = false; - exp_end = false; - exp_timer_end = false; - run_motor = true; - return true; +bool Start_inhale_cycle (void) { + + Serial3.print(Ctrl_CreateCommand(COMP, PEEP * 10, PLAT * 10)); //comp start flag + DebugPort.print(Ctrl_CreateCommand(COMP, PEEP * 10, PLAT * 10)); //comp start flag + DebugPort.print("\nPEEP: "); DebugPort.println(PEEP); + DebugPort.print("PLAT: "); DebugPort.println(PLAT); + + cycle_start = true; + comp_start = true; + comp_end = false; + exp_start = false; + exp_end = false; + exp_timer_end = false; + run_motor = true; + + return true; + } /* Function to build the command to be sent to Ventilator Master */ -String Ctrl_CreateCommand(String paramName, long value1, int value2) -{ +String Ctrl_CreateCommand (String paramName, long value1, int value2) { + + String command; + char paddedValue1[8]; + char paddedValue2[8]; + + command = START_DELIM; + command += VENT_MAST; + command += paramName; + + if (paramName == GP0_PARAM || paramName == GP1_PARAM) { + + char paddedValue3[15]; + + sprintf(paddedValue3, "%08lu", value1); + command += paddedValue3; + DebugPort.print(paramName); + DebugPort.print(" : cal value sending : "); + DebugPort.print(paramName); + DebugPort.print(" == "); + DebugPort.println(paddedValue3); + } + else { + sprintf(paddedValue1, "%04d", value1); + sprintf(paddedValue2, "%04d", value2); + command += paddedValue1; + command += paddedValue2; + } + + command += END_DELIM; + + return command; + +} - String command; - char paddedValue1[8]; - char paddedValue2[8]; - command = START_DELIM; - command += VENT_MAST; - command += paramName; - if (paramName == GP0_PARAM || paramName == GP1_PARAM) - { - char paddedValue3[15]; - sprintf(paddedValue3, "%08lu", value1); - command += paddedValue3; - DebugPort.print(paramName); - DebugPort.print(" : cal value sending : "); - DebugPort.print(paramName); - DebugPort.print(" == "); - DebugPort.println(paddedValue3); - } - else - { - sprintf(paddedValue1, "%04d", value1); - sprintf(paddedValue2, "%04d", value2); - command += paddedValue1; - command += paddedValue2; - } - command += END_DELIM; - return command; -} -bool Exhale_timer_timout() -{ - MsTimer2::stop(); - //digitalWrite(INDICATOR_LED, digitalRead(INDICATOR_LED) ^ 1); - e_timer_end_millis = millis(); - EXHALE_VLV_CLOSE(); - INHALE_VLV_OPEN(); - exp_timer_end = true; - return true; +bool Exhale_timer_timout (void) { + + MsTimer2::stop(); + //digitalWrite(INDICATOR_LED, digitalRead(INDICATOR_LED) ^ 1); + e_timer_end_millis = millis(); + EXHALE_VLV_CLOSE(); + INHALE_VLV_OPEN(); + exp_timer_end = true; + + return true; + } + + void load_TCCR1B_var(int TCCR1B_var_temp) { if (TCCR1B_var_temp == 1) @@ -777,370 +863,401 @@ void serialEvent3() } -bool Prcs_RxData() -{ - String p1; - String p2; - String p3; - String p4; - String payload; - - p1 = rxdata.substring(1, 3); - p2 = rxdata.substring(3, 5); - p3 = rxdata.substring(5, 7); - p4 = rxdata.substring(7, 9); - payload = p3 + p4; - - if (p1 == "VM") - { - if (p2 == "ST") - { - //stepper motor - if (payload == "0000") - { - if (cycle_start == true) { - run_motor = false; - if (comp_start == true && comp_end == false) { - stop_n_return_pulse_count = 0; - for (int i = 0; i < motion_profile_count_temp; i++) { - stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; - //stop_n_return_pulse_count = run_pulse_count_temp + 0; +bool Prcs_RxData (void) { + + String p1; + String p2; + String p3; + String p4; + String payload; + + p1 = rxdata.substring(1, 3); + p2 = rxdata.substring(3, 5); + p3 = rxdata.substring(5, 7); + p4 = rxdata.substring(7, 9); + payload = p3 + p4; + + + if (p1 == "VM") { + //------------------------------ + if (p2 == STROKE_LENGTH) { + // stroke length + + + float inc_or_dec = payload.toFloat(); + float abs_value = abs(inc_or_dec); + + // DebugPort.print("Stroke Lenght packet received \"P9\" : "); + DebugPort.println(payload); + Stroke_length_forced = payload.toFloat(); + DebugPort.print ("Stroke_length_forced : "); + DebugPort.println(Stroke_length_forced); + + + DebugPort.print("abs_value : "); + DebugPort.println(abs_value); + + // pick_stroke_length (); + if (abs_value <= 5) { + Stroke_length_forced += inc_or_dec; // increment / decrement by 'inc_or_dec' + Stroke_length += inc_or_dec; + Stroke_length_new += inc_or_dec; + DebugPort.print("Previous Stroke_length : "); + DebugPort.println(Stroke_length); + DebugPort.print("Stroke_length_new : "); + DebugPort.println(Stroke_length_new); + Stroke_length = Stroke_length_new; + f_test_data_updated = 1; + + // update into eeprom variables + update_stroke_length_in_eeprom (Stroke_length_new); + DebugPort.println("Updated into EEPROM..!!.........................\n\r"); + } - stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count_temp + 0; - } - if (exp_start == true && exp_end == false) { - stop_n_return_pulse_count = 0; - for (int i = motion_profile_count_temp + 1; i < CURVE_EXP_STEPS; i++) { - stop_n_return_pulse_count = stop_n_return_pulse_count + expansion_step_array[i]; - //stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + + // temp hack, if 'Stroke_length_forced' == 0, ventilator will work normally + else if (Stroke_length_forced != 0.0) { + DebugPort.print("Stroke_length : "); + DebugPort.println(Stroke_length); + DebugPort.print("Stroke_length_new : "); + DebugPort.println(Stroke_length_new); + DebugPort.print("Stroke_length_forced : "); + DebugPort.println(Stroke_length_forced); + Stroke_length_new = Stroke_length_forced; + Stroke_length = Stroke_length_forced; + f_test_data_updated = 1; + + // update into eeprom variables + update_stroke_length_in_eeprom (Stroke_length_forced); + DebugPort.println("Updated into EEPROM..!!.........................\n\r"); + + } - stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count - run_pulse_count_temp + 0; - } - if ((comp_start == true && comp_end == true) || (exp_start == true && exp_end == true)) { - stop_n_return_pulse_count = 0; - for (int i = 0; i < CURVE_EXP_STEPS; i++) { - stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; - //stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + else { + // nop } - } - cycle_start = false; - DebugPort.print("ST: stop and home pulses : "); DebugPort.println(stop_n_return_pulse_count); - inti_Stop_n_Home(); + } - } - } - else if (p2 == "IN") - { - if (payload == "0000") - { - //if (cycle_start == false) - inti_Home_n_Start(); - } - if (payload == "0001") - { - if (cycle_start == true) { - run_motor = false; - if (comp_start == true) { - stop_n_return_pulse_count = 0; - for (int i = 0; i < motion_profile_count_temp; i++) { - stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; - //stop_n_return_pulse_count = run_pulse_count_temp + 0; + //------------------------------ + + if (p2 == "ST") { + // stepper motor + if (payload == "0000") { + if (cycle_start == true) { + run_motor = false; + if (comp_start == true && comp_end == false) { + stop_n_return_pulse_count = 0; + for (int i = 0; i < motion_profile_count_temp; i++) + { + stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; + // stop_n_return_pulse_count = run_pulse_count_temp + 0; + } + stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count_temp + 0; + } + if (exp_start == true && exp_end == false) { + stop_n_return_pulse_count = 0; + for (int i = motion_profile_count_temp + 1; i < CURVE_EXP_STEPS; i++) + { + stop_n_return_pulse_count = stop_n_return_pulse_count + expansion_step_array[i]; + // stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + } + stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count - run_pulse_count_temp + 0; + } + if ((comp_start == true && comp_end == true) || (exp_start == true && exp_end == true)) { + stop_n_return_pulse_count = 0; + for (int i = 0; i < CURVE_EXP_STEPS; i++) + { + stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; + // stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + } + } + cycle_start = false; + DebugPort.print("ST: stop and home pulses : "); + DebugPort.println(stop_n_return_pulse_count); + inti_Stop_n_Home(); + } } - stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count_temp + 0; - } - if (exp_start == true) { - stop_n_return_pulse_count = 0; - for (int i = motion_profile_count_temp + 1; i < CURVE_EXP_STEPS; i++) { - stop_n_return_pulse_count = stop_n_return_pulse_count + expansion_step_array[i]; - //stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + } + + else if (p2 == "IN") { + if (payload == "0000") { + // if (cycle_start == false) + inti_Home_n_Start(); + } + if (payload == "0001") { + if (cycle_start == true) { + run_motor = false; + if (comp_start == true) { + stop_n_return_pulse_count = 0; + for (int i = 0; i < motion_profile_count_temp; i++) + { + stop_n_return_pulse_count = stop_n_return_pulse_count + compression_step_array[i]; + // stop_n_return_pulse_count = run_pulse_count_temp + 0; + } + stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count_temp + 0; + } + if (exp_start == true) { + stop_n_return_pulse_count = 0; + for (int i = motion_profile_count_temp + 1; i < CURVE_EXP_STEPS; i++) + { + stop_n_return_pulse_count = stop_n_return_pulse_count + expansion_step_array[i]; + // stop_n_return_pulse_count = run_pulse_count - run_pulse_count_temp + 0; + } + stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count - run_pulse_count_temp + 0; + } + cycle_start = false; + DebugPort.print("IN : stop and home pulses : "); DebugPort.println(stop_n_return_pulse_count); + inti_Stop_n_Home(); + } + } + + if (payload == "0003") { + if ((cycle_start == true) && (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE)) + breathe_detected_skip_exhale_n_start_inhale(); + } + if (payload == "0002") { + inti_all_Valves(); + } + } + + else if (p2 == "PP") { + if (payload == "0000") { + Par_editstat = 1; + } + if (payload == "1111") { + Par_editstat = 0; + } + } + + else if (p2 == TV_PARAM) { + tidal_volume_new = payload.toInt(); + DebugPort.print("TV : "); + DebugPort.println(tidal_volume_new); + pick_stroke_length(); + // Stroke_length_new=tidal_volume_new / 10; //enable this to do calibration using serial cmd to control strok length with xx.x accuracy + if (flag_Serial_requested == true) { + Serial3.print("$VSP20002&"); + } + } + + else if (p2 == RR_PARAM) { + BPM_new = payload.toInt(); + DebugPort.print("BPM : "); + DebugPort.println(BPM_new); + cycle_time = 60.0 / BPM_new; + DebugPort.print("cycle time : "); + DebugPort.println(cycle_time); + inhale_hold_time = (cycle_time * (inhale_hold_percentage / 100)) * 1000; + DebugPort.print("Compression hold in mS: "); + DebugPort.println(inhale_hold_time); + pick_stroke_length(); + if (flag_Serial_requested == true) { + Serial3.print("$VSP50004&"); } - stop_n_return_pulse_count = stop_n_return_pulse_count + run_pulse_count - run_pulse_count_temp + 0; - } - cycle_start = false; - DebugPort.print("IN : stop and home pulses : "); DebugPort.println(stop_n_return_pulse_count); - inti_Stop_n_Home(); } - } - if (payload == "0003") - { - if ((cycle_start == true) && (digitalRead(HOME_SENSOR_PIN) == HOME_SENSE_VALUE)) - breathe_detected_skip_exhale_n_start_inhale(); - } - if (payload == "0002") - { - inti_all_Valves(); - } - } - else if (p2 == "PP") - { - if (payload == "0000") - { - Par_editstat = 1; - } - if (payload == "1111") - { - Par_editstat = 0; - } - } - else if (p2 == TV_PARAM) - { - tidal_volume_new = payload.toInt(); - DebugPort.print("TV : "); - DebugPort.println(tidal_volume_new); - pick_stroke_length(); - //Stroke_length_new=tidal_volume_new/10; //enable this to do calibration using serial cmd to control strok length with xx.x accuracy - if (flag_Serial_requested == true) - { - Serial3.print("$VSP20002&"); - } - } - else if (p2 == RR_PARAM) - { - BPM_new = payload.toInt(); - DebugPort.print("BPM : "); - DebugPort.println(BPM_new); - cycle_time = 60.0 / BPM_new; - DebugPort.print("cycle time : "); - DebugPort.println(cycle_time); - inhale_hold_time = (cycle_time * (inhale_hold_percentage / 100)) * 1000; - DebugPort.print("Compression hold in mS: "); - DebugPort.println(inhale_hold_time); - pick_stroke_length(); - if (flag_Serial_requested == true) - { - Serial3.print("$VSP50004&"); - } - } - - else if (p2 == "P3") - { - FiO2 = payload.toInt(); - DebugPort.print("FiO2 : "); DebugPort.println(FiO2); - } - else if (p2 == "P4") - { - PEEP_new = payload.toInt(); - DebugPort.print("PEEP_new : "); DebugPort.println(PEEP_new); - } - else if (p2 == IER_PARAM) - { - IER_new = payload.toInt(); - DebugPort.print("IER : "); DebugPort.println(IER_new); - pick_stroke_length(); - // IER = 1020; - // inhale_ratio = 1.0; - // exhale_ratio = 2.0; - if (flag_Serial_requested == true) - { - Serial3.print("$VSP60006&"); - } - } - else if (p2 == PEAK_PARAM) - { - peak_prsur = payload.toInt(); - DebugPort.print("peak_prsur_new : "); DebugPort.println(peak_prsur); - if (flag_Serial_requested == true) - { - Serial3.print("$VSP70011&"); - } - } - else if (p2 == GP0_PARAM) - { - CAL_GP0_new = rxdata.substring(5, 13).toFloat() / 100000; - apply_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1, CAL_GP0_new); - CAL_GP0 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1); - DebugPort.print("CAL_GP0 : "); DebugPort.println(CAL_GP0); - if (flag_Serial_requested == true) - { - Serial3.print("$VSP80012&"); - } - } - else if (p2 == GP1_PARAM) - { - CAL_GP1_new = rxdata.substring(5, 13).toFloat() / 100000; - apply_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0, CAL_GP1_new); - CAL_GP1 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0); - DebugPort.print("CAL_GP1 : "); DebugPort.println(CAL_GP1); - - DebugPort.print("IER: 1:"); - DebugPort.print(IER); - DebugPort.print(" BPM: "); - DebugPort.print(BPM); - DebugPort.print(" TV: "); - DebugPort.print(tidal_volume); - DebugPort.print(" Stroke: "); - DebugPort.println(Stroke_length); - - DebugPort.print("Peak Pressure: "); - DebugPort.print(peak_prsur); - DebugPort.print(" Cali. GP0: "); - DebugPort.print(CAL_GP0); - DebugPort.print(" Cali. GP1: "); - DebugPort.println(CAL_GP1); - - - if (flag_Serial_requested == true) - { - flag_Serial_requested = false; - convert_all_set_params_2_machine_values(); - Serial3.print("$VSO20000&"); - } - } - else if (p2 == "F2") - { - if (1 == payload.toInt()) - { - DebugPort.println("Pressure flag == true Milli volt flag == false"); - send_pressure_data = true; - send_millivolts_data = false; - } - else if (0 == payload.toInt()) - { - DebugPort.println("Pressure flag == false"); - send_pressure_data = false; - } - } - - else if (p2 == "F3") - { - if (1 == payload.toInt()) - { - DebugPort.println("Milli volt flag == true Pressure flag == false"); - send_millivolts_data = true; - send_pressure_data = false; - } - else if (0 == payload.toInt()) - { - DebugPort.println("Milli volt flag == false"); - send_millivolts_data = false; - } - } - else if (p2 == "F1") - { - if (1 == payload.toInt()) - { - send_pressure_data = false; - delay(1000); - perform_calib_gp = true; - calibrate_MPX5010(); - DebugPort.print("sending calibration GP0 : "); - CAL_GP0 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1); - DebugPort.println(CAL_GP0 * 100000); - DebugPort.println(Ctrl_CreateCommand(GP0_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1) * 100000), 0)); - Serial3.print(Ctrl_CreateCommand(GP0_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1) * 100000), 0)); - - delay(5000); - DebugPort.print("sending calibration GP1 : "); - CAL_GP1 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0); - DebugPort.println(CAL_GP1 * 100000); - DebugPort.println(Ctrl_CreateCommand(GP1_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0) * 100000), 0)); - Serial3.print(Ctrl_CreateCommand(GP1_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0) * 100000), 0)); - delay(5000); - perform_calib_gp = false; - // send_pressure_data = true; - } - else if (0 == payload.toInt()) - { - perform_calib_gp = false; - } - } - else if (p2 == "SV") - { - if (p3 == "01") - { - if (p4 == "00") - { - //digitalWrite(INHALE_VLV_PIN, LOW); - INHALE_VLV_CLOSE(); - //Stop motor - if ((cycle_start == true) && (comp_start == true) && (comp_end == false)) - Emergency_motor_stop = true; - //relief valve ON - //INHALE_RELEASE_VLV_OPEN(); + else if (p2 == "P3") { + FiO2 = payload.toInt(); + DebugPort.print("FiO2 : "); DebugPort.println(FiO2); } - else if (p4 == "01") - { - //digitalWrite(INHALE_VLV_PIN, HIGH); - INHALE_VLV_OPEN(); + + else if (p2 == "P4") { + PEEP_new = payload.toInt(); + DebugPort.print("PEEP_new : "); DebugPort.println(PEEP_new); } - } - else if (p3 == "02") - { - if (p4 == "00") - { - //digitalWrite(EXHALE_VLV_PIN, LOW); - EXHALE_VLV_CLOSE(); + + else if (p2 == IER_PARAM) { + IER_new = payload.toInt(); + DebugPort.print("IER : "); DebugPort.println(IER_new); + pick_stroke_length(); + // IER = 1020; + // inhale_ratio = 1.0; + // exhale_ratio = 2.0; + if (flag_Serial_requested == true) { + Serial3.print("$VSP60006&"); + } } - else if (p4 == "01") - { - //digitalWrite(EXHALE_VLV_PIN, HIGH); - EXHALE_VLV_OPEN(); + + else if (p2 == PEAK_PARAM) { + peak_prsur = payload.toInt(); + DebugPort.print("peak_prsur_new : "); + DebugPort.println(peak_prsur); + if (flag_Serial_requested == true) { + Serial3.print("$VSP70011&"); + } } - } - else if (p3 == "03") - { - if (p4 == "00") - { - INHALE_RELEASE_VLV_CLOSE(); + + else if (p2 == GP0_PARAM) { + CAL_GP0_new = rxdata.substring(5, 13).toFloat() / 100000; + apply_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1, CAL_GP0_new); + CAL_GP0 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1); + DebugPort.print("CAL_GP0 : "); DebugPort.println(CAL_GP0); + if (flag_Serial_requested == true) { + Serial3.print("$VSP80012&"); + } } - else if (p4 == "01") - { - INHALE_RELEASE_VLV_OPEN(); + + else if (p2 == GP1_PARAM) { + CAL_GP1_new = rxdata.substring(5, 13).toFloat() / 100000; + apply_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0, CAL_GP1_new); + CAL_GP1 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0); + DebugPort.print("CAL_GP1 : "); DebugPort.println(CAL_GP1); + + DebugPort.print("IER: 1:"); + DebugPort.print(IER); + DebugPort.print(" BPM: "); + DebugPort.print(BPM); + DebugPort.print(" TV: "); + DebugPort.print(tidal_volume); + DebugPort.print(" Stroke: "); + DebugPort.println(Stroke_length); + + DebugPort.print("Peak Pressure: "); + DebugPort.print(peak_prsur); + DebugPort.print(" Cali. GP0: "); + DebugPort.print(CAL_GP0); + DebugPort.print(" Cali. GP1: "); + DebugPort.println(CAL_GP1); + + + if (flag_Serial_requested == true) { + flag_Serial_requested = false; + convert_all_set_params_2_machine_values(); + Serial3.print("$VSO20000&"); + } } - } - } - else if (p2 == "O2") - { //solanoide valve for Oxygen line - if (p3 == "01") - { - if (p4 == "00") - { - //digitalWrite(O2Cyl_VLV_PIN, LOW); - DebugPort.println("2Hln_VLV SELECTED"); - O2_line_option = 1; - if (cycle_start == true) - { - O2Cyl_VLV_CLOSE(); - } + + else if (p2 == "F2") { + if (1 == payload.toInt()) { + DebugPort.println("Pressure flag == true Milli volt flag == false"); + send_pressure_data = true; + send_millivolts_data = false; + } + else if (0 == payload.toInt()) { + DebugPort.println("Pressure flag == false"); + send_pressure_data = false; + } } - else if (p4 == "01") - { - //digitalWrite(O2Cyl_VLV_PIN, HIGH); - DebugPort.println("O2Cyl_VLV SELECTED"); - O2_line_option = 0; - if (cycle_start == true) - { - O2Cyl_VLV_OPEN(); - } + + else if (p2 == "F3") { + if (1 == payload.toInt()) { + DebugPort.println("Milli volt flag == true Pressure flag == false"); + send_millivolts_data = true; + send_pressure_data = false; + } + else if (0 == payload.toInt()) { + DebugPort.println("Milli volt flag == false"); + send_millivolts_data = false; + } } - } - else if (p3 == "02") - { - if (p4 == "00") - { - DebugPort.println("O2Cyl_VLV SELECTED"); - O2_line_option = 0; - if (cycle_start == true) - { - O2Cyl_VLV_OPEN(); - } + + else if (p2 == "F1") { + if (1 == payload.toInt()) { + send_pressure_data = false; + delay(1000); + perform_calib_gp = true; + calibrate_MPX5010(); + DebugPort.print("sending calibration GP0 : "); + CAL_GP0 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1); + DebugPort.println(CAL_GP0 * 100000); + DebugPort.println(Ctrl_CreateCommand(GP0_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1) * 100000), 0)); + Serial3.print(Ctrl_CreateCommand(GP0_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A1) * 100000), 0)); + + delay(5000); + DebugPort.print("sending calibration GP1 : "); + CAL_GP1 = get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0); + DebugPort.println(CAL_GP1 * 100000); + DebugPort.println(Ctrl_CreateCommand(GP1_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0) * 100000), 0)); + Serial3.print(Ctrl_CreateCommand(GP1_PARAM, (long)(get_zerocal_offset_MPX5010(SENSOR_PRESSURE_A0) * 100000), 0)); + delay(5000); + perform_calib_gp = false; + // send_pressure_data = true; + } + else if (0 == payload.toInt()) { + perform_calib_gp = false; + } } - else if (p4 == "01") - { - DebugPort.println("2Hln_VLV SELECTED"); - O2_line_option = 1; - if (cycle_start == true) - { - O2Cyl_VLV_CLOSE(); - } + + else if (p2 == "SV") { + if (p3 == "01") { + if (p4 == "00") { + //digitalWrite(INHALE_VLV_PIN, LOW); + INHALE_VLV_CLOSE(); + //Stop motor + if ((cycle_start == true) && (comp_start == true) && (comp_end == false)) + Emergency_motor_stop = true; + //relief valve ON + //INHALE_RELEASE_VLV_OPEN(); + } + else if (p4 == "01") { + //digitalWrite(INHALE_VLV_PIN, HIGH); + INHALE_VLV_OPEN(); + } + } + else if (p3 == "02") { + if (p4 == "00") { + // digitalWrite(EXHALE_VLV_PIN, LOW); + EXHALE_VLV_CLOSE(); + } + else if (p4 == "01") { + // digitalWrite(EXHALE_VLV_PIN, HIGH); + EXHALE_VLV_OPEN(); + } + } + else if (p3 == "03") { + if (p4 == "00") { + INHALE_RELEASE_VLV_CLOSE(); + } + else if (p4 == "01") { + INHALE_RELEASE_VLV_OPEN(); + } + } + } + + else if (p2 == "O2") { //solanoide valve for Oxygen line + if (p3 == "01") { + if (p4 == "00") { + //digitalWrite(O2Cyl_VLV_PIN, LOW); + DebugPort.println("2Hln_VLV SELECTED"); + O2_line_option = 1; + if (cycle_start == true) { + O2Cyl_VLV_CLOSE(); + } + } + else if (p4 == "01") { + // digitalWrite(O2Cyl_VLV_PIN, HIGH); + DebugPort.println("O2Cyl_VLV SELECTED"); + O2_line_option = 0; + if (cycle_start == true) { + O2Cyl_VLV_OPEN(); + } + } + } + else if (p3 == "02") { + if (p4 == "00") { + DebugPort.println("O2Cyl_VLV SELECTED"); + O2_line_option = 0; + if (cycle_start == true) { + O2Cyl_VLV_OPEN(); + } + } + else if (p4 == "01") { + DebugPort.println("2Hln_VLV SELECTED"); + O2_line_option = 1; + if (cycle_start == true) { + O2Cyl_VLV_CLOSE(); + } + } + } } - } - } } + return true; + } + + bool open_selected_O2_value(void) { if (O2_line_option == 0) @@ -1267,2070 +1384,6 @@ bool inti_Start() return true; } -#define TEMP_FIX1 0 - -void pick_stroke_length() -{ - -#if TEMP_FIX1 /// stroke length for TW0002 - - /// temp fix for demo 28/04/2021 - tidal_volume_new = tidal_volume_new - 50 ; - /// temp fix for demo 28/04/2021 -#endif - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 200) { - Stroke_length_new = 59.5; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 200) { - Stroke_length_new = 58; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 200) { - Stroke_length_new = 56.5; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 200) { - Stroke_length_new = 55.5; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 200) { - Stroke_length_new = 54.5; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 200) { - Stroke_length_new = 53.5; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 200) { - Stroke_length_new = 53; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 200) { - Stroke_length_new = 52.5; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 200) { - Stroke_length_new = 52; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 200) { - Stroke_length_new = 51.5; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 200) { - Stroke_length_new = 51.3; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 200) { - Stroke_length_new = 51.1; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 200) { - Stroke_length_new = 50.9; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 200) { - Stroke_length_new = 50.7; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 200) { - Stroke_length_new = 50.5; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 200) { - Stroke_length_new = 50.3; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 200) { - Stroke_length_new = 50.1; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 200) { - Stroke_length_new = 49.9; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 200) { - Stroke_length_new = 49.7; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 200) { - Stroke_length_new = 49.5; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 200) { - Stroke_length_new = 49.3; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 250) { - Stroke_length_new = 62.5; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 250) { - Stroke_length_new = 62; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 250) { - Stroke_length_new = 61.2; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 250) { - Stroke_length_new = 60; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 250) { - Stroke_length_new = 59.5; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 250) { - Stroke_length_new = 58.5; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 250) { - Stroke_length_new = 58; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 250) { - Stroke_length_new = 57.5; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 250) { - Stroke_length_new = 57.2; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 250) { - Stroke_length_new = 56.9; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 250) { - Stroke_length_new = 56.6; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 250) { - Stroke_length_new = 56.3; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 250) { - Stroke_length_new = 56; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 250) { - Stroke_length_new = 55.7; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 250) { - Stroke_length_new = 55.4; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 300) { - Stroke_length_new = 67; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 300) { - Stroke_length_new = 66; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 300) { - Stroke_length_new = 65; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 300) { - Stroke_length_new = 64.1; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 300) { - Stroke_length_new = 63.4; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 300) { - Stroke_length_new = 62.7; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 300) { - Stroke_length_new = 62.6; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 300) { - Stroke_length_new = 62.2; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 300) { - Stroke_length_new = 61.8; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 300) { - Stroke_length_new = 61.4; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 300) { - Stroke_length_new = 61; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 300) { - Stroke_length_new = 60.9; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 300) { - Stroke_length_new = 60.8; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 300) { - Stroke_length_new = 60.7; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 300) { - Stroke_length_new = 60.6; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 300) { - Stroke_length_new = 60.5; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 300) { - Stroke_length_new = 60.4; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 300) { - Stroke_length_new = 60.3; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 300) { - Stroke_length_new = 60.1; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 300) { - Stroke_length_new = 60; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 350) { - Stroke_length_new = 70.4; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 350) { - Stroke_length_new = 69; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 350) { - Stroke_length_new = 68.5; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 350) { - Stroke_length_new = 67.5; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 350) { - Stroke_length_new = 66.8; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 350) { - Stroke_length_new = 66.4; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 350) { - Stroke_length_new = 66.2; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 350) { - Stroke_length_new = 65.8; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 350) { - Stroke_length_new = 65.5; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 350) { - Stroke_length_new = 65.2; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 350) { - Stroke_length_new = 65.1; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 350) { - Stroke_length_new = 64.8; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 350) { - Stroke_length_new = 64.4; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 350) { - Stroke_length_new = 64.2; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 350) { - Stroke_length_new = 64.2; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 400) { - Stroke_length_new = 74.1; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 400) { - Stroke_length_new = 73.7; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 400) { - Stroke_length_new = 73; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 400) { - Stroke_length_new = 72.4; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 400) { - Stroke_length_new = 71.8; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 400) { - Stroke_length_new = 71.4; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 400) { - Stroke_length_new = 71.2; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 400) { - Stroke_length_new = 70.8; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 400) { - Stroke_length_new = 70.2; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 400) { - Stroke_length_new = 70.1; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 400) { - Stroke_length_new = 69.8; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 400) { - Stroke_length_new = 69; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 400) { - Stroke_length_new = 68.7; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 400) { - Stroke_length_new = 68.7; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 400) { - Stroke_length_new = 68.7; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 400) { - Stroke_length_new = 68.7; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 450) { - Stroke_length_new = 77.5; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 450) { - Stroke_length_new = 77; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 450) { - Stroke_length_new = 76.5; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 450) { - Stroke_length_new = 76; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 450) { - Stroke_length_new = 75.5; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 450) { - Stroke_length_new = 75; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 450) { - Stroke_length_new = 74.8; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 450) { - Stroke_length_new = 74.6; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 450) { - Stroke_length_new = 74.4; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 450) { - Stroke_length_new = 74.2; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 450) { - Stroke_length_new = 74; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 450) { - Stroke_length_new = 73.6; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 500) { - Stroke_length_new = 81.5; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 500) { - Stroke_length_new = 81; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 500) { - Stroke_length_new = 80.5; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 500) { - Stroke_length_new = 80; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 500) { - Stroke_length_new = 79.5; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 500) { - Stroke_length_new = 79; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 500) { - Stroke_length_new = 78.8; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 500) { - Stroke_length_new = 78.6; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 500) { - Stroke_length_new = 78.4; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 500) { - Stroke_length_new = 78.2; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 500) { - Stroke_length_new = 78; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 500) { - Stroke_length_new = 78.1; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 500) { - Stroke_length_new = 78.2; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 500) { - Stroke_length_new = 78.3; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 500) { - Stroke_length_new = 78.4; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 500) { - Stroke_length_new = 78.5; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 500) { - Stroke_length_new = 78.8; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 500) { - Stroke_length_new = 79.1; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 500) { - Stroke_length_new = 79.4; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 500) { - Stroke_length_new = 79.7; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 500) { - Stroke_length_new = 80; - } - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 550) { - Stroke_length_new = 86; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 550) { - Stroke_length_new = 85.6; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 550) { - Stroke_length_new = 85.2; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 550) { - Stroke_length_new = 84.8; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 550) { - Stroke_length_new = 84.4; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 550) { - Stroke_length_new = 84; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 550) { - Stroke_length_new = 83.8; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 550) { - Stroke_length_new = 83.6; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 550) { - Stroke_length_new = 83.4; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 550) { - Stroke_length_new = 83.2; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 550) { - Stroke_length_new = 83; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 550) { - Stroke_length_new = 82.8; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 550) { - Stroke_length_new = 82.6; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 550) { - Stroke_length_new = 82.2; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 550) { - Stroke_length_new = 82; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 550) { - Stroke_length_new = 82.8; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 550) { - Stroke_length_new = 83.2; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 550) { - Stroke_length_new = 83.6; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 550) { - Stroke_length_new = 84; - } - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 600) { - Stroke_length_new = 92.2; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 600) { - Stroke_length_new = 91.8; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 600) { - Stroke_length_new = 91.3; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 600) { - Stroke_length_new = 90.5; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 600) { - Stroke_length_new = 90; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 600) { - Stroke_length_new = 89.4; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 600) { - Stroke_length_new = 89; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 600) { - Stroke_length_new = 88.6; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 600) { - Stroke_length_new = 88.3; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 600) { - Stroke_length_new = 87.5; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 600) { - Stroke_length_new = 87.5; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 600) { - Stroke_length_new = 87.7; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 600) { - Stroke_length_new = 87.9; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 600) { - Stroke_length_new = 88.1; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 600) { - Stroke_length_new = 88.3; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 600) { - Stroke_length_new = 89; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 600) { - Stroke_length_new = 89.5; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 600) { - Stroke_length_new = 90; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 600) { - Stroke_length_new = 90.5; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 600) { - Stroke_length_new = 91; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 600) { - Stroke_length_new = 91.5; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 650) { - Stroke_length_new = 97.1; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 650) { - Stroke_length_new = 97.1; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 650) { - Stroke_length_new = 97; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 650) { - Stroke_length_new = 96.2; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 650) { - Stroke_length_new = 96.1; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 650) { - Stroke_length_new = 95.1; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 650) { - Stroke_length_new = 95.1; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 650) { - Stroke_length_new = 95.1; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 650) { - Stroke_length_new = 95; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 650) { - Stroke_length_new = 94.5; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 650) { - Stroke_length_new = 94.5; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 650) { - Stroke_length_new = 94.7; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 650) { - Stroke_length_new = 94.9; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 650) { - Stroke_length_new = 95.1; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 650) { - Stroke_length_new = 95.3; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 650) { - Stroke_length_new = 95.5; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 650) { - Stroke_length_new = 95.9; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 650) { - Stroke_length_new = 96.3; - } - if (IER_new == 1 && BPM_new == 28 && tidal_volume_new == 650) { - Stroke_length_new = 96.7; - } - if (IER_new == 1 && BPM_new == 29 && tidal_volume_new == 650) { - Stroke_length_new = 97.1; - } - if (IER_new == 1 && BPM_new == 30 && tidal_volume_new == 650) { - Stroke_length_new = 97.5; - } - - if (IER_new == 1 && BPM_new == 10 && tidal_volume_new == 700) { - Stroke_length_new = 106; - } - if (IER_new == 1 && BPM_new == 11 && tidal_volume_new == 700) { - Stroke_length_new = 105; - } - if (IER_new == 1 && BPM_new == 12 && tidal_volume_new == 700) { - Stroke_length_new = 103.5; - } - if (IER_new == 1 && BPM_new == 13 && tidal_volume_new == 700) { - Stroke_length_new = 102.5; - } - if (IER_new == 1 && BPM_new == 14 && tidal_volume_new == 700) { - Stroke_length_new = 102.5; - } - if (IER_new == 1 && BPM_new == 15 && tidal_volume_new == 700) { - Stroke_length_new = 102.4; - } - if (IER_new == 1 && BPM_new == 16 && tidal_volume_new == 700) { - Stroke_length_new = 102.3; - } - if (IER_new == 1 && BPM_new == 17 && tidal_volume_new == 700) { - Stroke_length_new = 101.2; - } - if (IER_new == 1 && BPM_new == 18 && tidal_volume_new == 700) { - Stroke_length_new = 101.2; - } - if (IER_new == 1 && BPM_new == 19 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 20 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 21 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 22 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 23 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 24 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 25 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 1 && BPM_new == 26 && tidal_volume_new == 700) { - Stroke_length_new = 102; - } - if (IER_new == 1 && BPM_new == 27 && tidal_volume_new == 700) { - Stroke_length_new = 102; - } - // if(IER_new == 1 && BPM_new ==28 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 1 && BPM_new ==29 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 1 && BPM_new ==30 && tidal_volume_new ==700){ Stroke_length_new = NA;} - - - - - - - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 200) { - Stroke_length_new = 53.5; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 200) { - Stroke_length_new = 52.5; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 200) { - Stroke_length_new = 51.5; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 200) { - Stroke_length_new = 51; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 200) { - Stroke_length_new = 50.5; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 200) { - Stroke_length_new = 50.2; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 200) { - Stroke_length_new = 50; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 200) { - Stroke_length_new = 49.8; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 200) { - Stroke_length_new = 49.5; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 200) { - Stroke_length_new = 49.5; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 200) { - Stroke_length_new = 49.1; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 200) { - Stroke_length_new = 49; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 200) { - Stroke_length_new = 49; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 250) { - Stroke_length_new = 58; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 250) { - Stroke_length_new = 57.5; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 250) { - Stroke_length_new = 56.6; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 250) { - Stroke_length_new = 56.5; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 250) { - Stroke_length_new = 56.2; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 250) { - Stroke_length_new = 55.9; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 250) { - Stroke_length_new = 55.6; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 250) { - Stroke_length_new = 55.3; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 250) { - Stroke_length_new = 55; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 250) { - Stroke_length_new = 54.9; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 250) { - Stroke_length_new = 54.8; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 250) { - Stroke_length_new = 54.7; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 300) { - Stroke_length_new = 63; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 300) { - Stroke_length_new = 62.5; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 300) { - Stroke_length_new = 62.2; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 300) { - Stroke_length_new = 61.9; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 300) { - Stroke_length_new = 61; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 300) { - Stroke_length_new = 60.7; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 300) { - Stroke_length_new = 60.4; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 300) { - Stroke_length_new = 59.6; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 300) { - Stroke_length_new = 59.6; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 350) { - Stroke_length_new = 67.5; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 350) { - Stroke_length_new = 66.8; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 350) { - Stroke_length_new = 66.4; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 350) { - Stroke_length_new = 66.2; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 350) { - Stroke_length_new = 65.8; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 350) { - Stroke_length_new = 65.5; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 350) { - Stroke_length_new = 65.2; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 350) { - Stroke_length_new = 65.1; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 350) { - Stroke_length_new = 64.9; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 350) { - Stroke_length_new = 64.8; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 350) { - Stroke_length_new = 64.5; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 350) { - Stroke_length_new = 64.7; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 350) { - Stroke_length_new = 64.7; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 400) { - Stroke_length_new = 71.4; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 400) { - Stroke_length_new = 71.2; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 400) { - Stroke_length_new = 70.8; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 400) { - Stroke_length_new = 70.2; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 400) { - Stroke_length_new = 70.1; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 400) { - Stroke_length_new = 69.8; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 400) { - Stroke_length_new = 69; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 400) { - Stroke_length_new = 68.8; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 400) { - Stroke_length_new = 69; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 400) { - Stroke_length_new = 69.3; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 400) { - Stroke_length_new = 69.9; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 400) { - Stroke_length_new = 70.2; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 450) { - Stroke_length_new = 75.2; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 450) { - Stroke_length_new = 75; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 450) { - Stroke_length_new = 74.5; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 450) { - Stroke_length_new = 74.2; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 450) { - Stroke_length_new = 73.6; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 450) { - Stroke_length_new = 73.3; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 450) { - Stroke_length_new = 73.1; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 450) { - Stroke_length_new = 73.1; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 450) { - Stroke_length_new = 73.3; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 450) { - Stroke_length_new = 73.5; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 450) { - Stroke_length_new = 73.7; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 450) { - Stroke_length_new = 73.9; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 450) { - Stroke_length_new = 74.1; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 450) { - Stroke_length_new = 74.3; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 450) { - Stroke_length_new = 74.5; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 450) { - Stroke_length_new = 74.7; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 450) { - Stroke_length_new = 74.9; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 450) { - Stroke_length_new = 75.1; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 500) { - Stroke_length_new = 79.3; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 500) { - Stroke_length_new = 78.9; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 500) { - Stroke_length_new = 78.7; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 500) { - Stroke_length_new = 78.3; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 500) { - Stroke_length_new = 78; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 500) { - Stroke_length_new = 77.7; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 500) { - Stroke_length_new = 77.9; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 500) { - Stroke_length_new = 78.2; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 500) { - Stroke_length_new = 78.5; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 500) { - Stroke_length_new = 78.8; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 500) { - Stroke_length_new = 79.1; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 500) { - Stroke_length_new = 79.4; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 500) { - Stroke_length_new = 79.7; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 500) { - Stroke_length_new = 80; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 500) { - Stroke_length_new = 80.3; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 500) { - Stroke_length_new = 80.6; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 550) { - Stroke_length_new = 83.5; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 550) { - Stroke_length_new = 83.1; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 550) { - Stroke_length_new = 82.8; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 550) { - Stroke_length_new = 82.2; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 550) { - Stroke_length_new = 82.2; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 550) { - Stroke_length_new = 82.2; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 550) { - Stroke_length_new = 82; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 550) { - Stroke_length_new = 82; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 550) { - Stroke_length_new = 82; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 550) { - Stroke_length_new = 82; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 550) { - Stroke_length_new = 82.3; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 550) { - Stroke_length_new = 82.6; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 550) { - Stroke_length_new = 82.9; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 550) { - Stroke_length_new = 83.2; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 550) { - Stroke_length_new = 83.5; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 550) { - Stroke_length_new = 83.9; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 550) { - Stroke_length_new = 84.3; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 550) { - Stroke_length_new = 84.7; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 550) { - Stroke_length_new = 85.1; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 550) { - Stroke_length_new = 85.5; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 600) { - Stroke_length_new = 88.6; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 600) { - Stroke_length_new = 88.3; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 600) { - Stroke_length_new = 88; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 600) { - Stroke_length_new = 87.7; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 600) { - Stroke_length_new = 87.4; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 600) { - Stroke_length_new = 87.1; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 600) { - Stroke_length_new = 87.3; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 600) { - Stroke_length_new = 87.5; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 600) { - Stroke_length_new = 87.7; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 600) { - Stroke_length_new = 87.9; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 600) { - Stroke_length_new = 88.1; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 600) { - Stroke_length_new = 88.3; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 600) { - Stroke_length_new = 88.5; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 600) { - Stroke_length_new = 88.7; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 600) { - Stroke_length_new = 88.9; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 600) { - Stroke_length_new = 89.4; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 600) { - Stroke_length_new = 89.9; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 600) { - Stroke_length_new = 90.4; - } - if (IER_new == 2 && BPM_new == 28 && tidal_volume_new == 600) { - Stroke_length_new = 90.9; - } - if (IER_new == 2 && BPM_new == 29 && tidal_volume_new == 600) { - Stroke_length_new = 91.4; - } - if (IER_new == 2 && BPM_new == 30 && tidal_volume_new == 600) { - Stroke_length_new = 91.9; - } - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 650) { - Stroke_length_new = 94.5; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 650) { - Stroke_length_new = 94.3; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 650) { - Stroke_length_new = 94.1; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 650) { - Stroke_length_new = 93.9; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 650) { - Stroke_length_new = 93.7; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 650) { - Stroke_length_new = 93.5; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 650) { - Stroke_length_new = 93.7; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 650) { - Stroke_length_new = 93.9; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 650) { - Stroke_length_new = 94.1; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 650) { - Stroke_length_new = 94.3; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 650) { - Stroke_length_new = 94.5; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 650) { - Stroke_length_new = 94.7; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 650) { - Stroke_length_new = 94.9; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 650) { - Stroke_length_new = 95.1; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 650) { - Stroke_length_new = 95.3; - } - if (IER_new == 2 && BPM_new == 25 && tidal_volume_new == 650) { - Stroke_length_new = 95.5; - } - if (IER_new == 2 && BPM_new == 26 && tidal_volume_new == 650) { - Stroke_length_new = 96.5; - } - if (IER_new == 2 && BPM_new == 27 && tidal_volume_new == 650) { - Stroke_length_new = 97; - } - // if(IER_new == 2 && BPM_new ==28 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==29 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==30 && tidal_volume_new ==650){ Stroke_length_new = NA;} - - if (IER_new == 2 && BPM_new == 10 && tidal_volume_new == 700) { - Stroke_length_new = 102; - } - if (IER_new == 2 && BPM_new == 11 && tidal_volume_new == 700) { - Stroke_length_new = 101.6; - } - if (IER_new == 2 && BPM_new == 12 && tidal_volume_new == 700) { - Stroke_length_new = 101.2; - } - if (IER_new == 2 && BPM_new == 13 && tidal_volume_new == 700) { - Stroke_length_new = 100.8; - } - if (IER_new == 2 && BPM_new == 14 && tidal_volume_new == 700) { - Stroke_length_new = 100.4; - } - if (IER_new == 2 && BPM_new == 15 && tidal_volume_new == 700) { - Stroke_length_new = 100.4; - } - if (IER_new == 2 && BPM_new == 16 && tidal_volume_new == 700) { - Stroke_length_new = 100.6; - } - if (IER_new == 2 && BPM_new == 17 && tidal_volume_new == 700) { - Stroke_length_new = 100.8; - } - if (IER_new == 2 && BPM_new == 18 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 2 && BPM_new == 19 && tidal_volume_new == 700) { - Stroke_length_new = 101.2; - } - if (IER_new == 2 && BPM_new == 20 && tidal_volume_new == 700) { - Stroke_length_new = 101.4; - } - if (IER_new == 2 && BPM_new == 21 && tidal_volume_new == 700) { - Stroke_length_new = 101.9; - } - if (IER_new == 2 && BPM_new == 22 && tidal_volume_new == 700) { - Stroke_length_new = 102.4; - } - if (IER_new == 2 && BPM_new == 23 && tidal_volume_new == 700) { - Stroke_length_new = 102.9; - } - if (IER_new == 2 && BPM_new == 24 && tidal_volume_new == 700) { - Stroke_length_new = 103.4; - } - // if(IER_new == 2 && BPM_new ==25 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==26 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==27 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==28 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==29 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 2 && BPM_new ==30 && tidal_volume_new ==700){ Stroke_length_new = NA;} - - - - - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 200) { - Stroke_length_new = 51; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 200) { - Stroke_length_new = 50.5; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 200) { - Stroke_length_new = 50.2; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 200) { - Stroke_length_new = 50; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 200) { - Stroke_length_new = 49.8; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 200) { - Stroke_length_new = 49.5; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 200) { - Stroke_length_new = 49.5; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 200) { - Stroke_length_new = 49.1; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 200) { - Stroke_length_new = 49; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 200) { - Stroke_length_new = 48.8; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 250) { - Stroke_length_new = 56.5; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 250) { - Stroke_length_new = 56.2; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 250) { - Stroke_length_new = 55.9; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 250) { - Stroke_length_new = 55.6; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 250) { - Stroke_length_new = 55.3; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 250) { - Stroke_length_new = 55.1; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 250) { - Stroke_length_new = 55; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 250) { - Stroke_length_new = 54.9; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 250) { - Stroke_length_new = 54.8; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 250) { - Stroke_length_new = 54.7; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 250) { - Stroke_length_new = 54.5; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 250) { - Stroke_length_new = 54.6; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 300) { - Stroke_length_new = 61.5; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 300) { - Stroke_length_new = 61; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 300) { - Stroke_length_new = 60.7; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 300) { - Stroke_length_new = 60.4; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 300) { - Stroke_length_new = 59.8; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 300) { - Stroke_length_new = 59.9; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 300) { - Stroke_length_new = 60; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 300) { - Stroke_length_new = 60.1; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 300) { - Stroke_length_new = 60.2; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 300) { - Stroke_length_new = 60.3; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 300) { - Stroke_length_new = 60.4; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 300) { - Stroke_length_new = 60.5; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 300) { - Stroke_length_new = 60.6; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 300) { - Stroke_length_new = 60.7; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 300) { - Stroke_length_new = 60.8; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 350) { - Stroke_length_new = 66.2; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 350) { - Stroke_length_new = 65.8; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 350) { - Stroke_length_new = 65.5; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 350) { - Stroke_length_new = 65.2; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 350) { - Stroke_length_new = 65.1; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 350) { - Stroke_length_new = 65; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 350) { - Stroke_length_new = 65.4; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 350) { - Stroke_length_new = 65.5; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 350) { - Stroke_length_new = 65.6; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 350) { - Stroke_length_new = 65.7; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 350) { - Stroke_length_new = 65.9; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 350) { - Stroke_length_new = 66.1; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 350) { - Stroke_length_new = 66.3; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 350) { - Stroke_length_new = 66.5; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 350) { - Stroke_length_new = 66.7; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 350) { - Stroke_length_new = 66.9; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 400) { - Stroke_length_new = 70.2; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 400) { - Stroke_length_new = 70.1; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 400) { - Stroke_length_new = 69.8; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 400) { - Stroke_length_new = 69.2; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 400) { - Stroke_length_new = 69.4; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 400) { - Stroke_length_new = 69.6; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 400) { - Stroke_length_new = 69.8; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 400) { - Stroke_length_new = 70; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 400) { - Stroke_length_new = 70.4; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 400) { - Stroke_length_new = 70.8; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 400) { - Stroke_length_new = 71.2; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 400) { - Stroke_length_new = 71.6; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 400) { - Stroke_length_new = 72; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 400) { - Stroke_length_new = 72.4; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 450) { - Stroke_length_new = 74.2; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 450) { - Stroke_length_new = 73.6; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 450) { - Stroke_length_new = 73.4; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 450) { - Stroke_length_new = 73.6; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 450) { - Stroke_length_new = 73.8; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 450) { - Stroke_length_new = 74; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 450) { - Stroke_length_new = 74.2; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 450) { - Stroke_length_new = 74.4; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 450) { - Stroke_length_new = 74.6; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 450) { - Stroke_length_new = 74.8; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 450) { - Stroke_length_new = 75; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 450) { - Stroke_length_new = 75.2; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 450) { - Stroke_length_new = 75.4; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 450) { - Stroke_length_new = 75.6; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 450) { - Stroke_length_new = 76; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 450) { - Stroke_length_new = 76.4; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 450) { - Stroke_length_new = 76.8; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 450) { - Stroke_length_new = 77.2; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 450) { - Stroke_length_new = 77.6; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 500) { - Stroke_length_new = 78; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 500) { - Stroke_length_new = 77.9; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 500) { - Stroke_length_new = 77.8; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 500) { - Stroke_length_new = 77.7; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 500) { - Stroke_length_new = 77.5; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 500) { - Stroke_length_new = 77.6; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 500) { - Stroke_length_new = 77.9; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 500) { - Stroke_length_new = 78.2; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 500) { - Stroke_length_new = 78.5; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 500) { - Stroke_length_new = 78.8; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 500) { - Stroke_length_new = 79.2; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 500) { - Stroke_length_new = 79.6; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 500) { - Stroke_length_new = 80; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 500) { - Stroke_length_new = 80.4; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 500) { - Stroke_length_new = 80.8; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 500) { - Stroke_length_new = 81.3; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 500) { - Stroke_length_new = 81.8; - } - if (IER_new == 3 && BPM_new == 28 && tidal_volume_new == 500) { - Stroke_length_new = 82.3; - } - if (IER_new == 3 && BPM_new == 29 && tidal_volume_new == 500) { - Stroke_length_new = 82.8; - } - if (IER_new == 3 && BPM_new == 30 && tidal_volume_new == 500) { - Stroke_length_new = 83.3; - } - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 550) { - Stroke_length_new = 82.4; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 550) { - Stroke_length_new = 82.8; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 550) { - Stroke_length_new = 83.2; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 550) { - Stroke_length_new = 83.6; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 550) { - Stroke_length_new = 84; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 550) { - Stroke_length_new = 84.5; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 550) { - Stroke_length_new = 84.9; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 550) { - Stroke_length_new = 85.3; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 550) { - Stroke_length_new = 85.7; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 550) { - Stroke_length_new = 86.1; - } - if (IER_new == 3 && BPM_new == 25 && tidal_volume_new == 550) { - Stroke_length_new = 86.5; - } - if (IER_new == 3 && BPM_new == 26 && tidal_volume_new == 550) { - Stroke_length_new = 87; - } - if (IER_new == 3 && BPM_new == 27 && tidal_volume_new == 550) { - Stroke_length_new = 87.5; - } - // if(IER_new == 3 && BPM_new ==28 && tidal_volume_new ==550){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==29 && tidal_volume_new ==550){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==30 && tidal_volume_new ==550){ Stroke_length_new = NA;} - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 600) { - Stroke_length_new = 87.7; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 600) { - Stroke_length_new = 87.4; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 600) { - Stroke_length_new = 87.1; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 600) { - Stroke_length_new = 87.3; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 600) { - Stroke_length_new = 87.5; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 600) { - Stroke_length_new = 87.7; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 600) { - Stroke_length_new = 88.2; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 600) { - Stroke_length_new = 88.7; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 600) { - Stroke_length_new = 89.2; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 600) { - Stroke_length_new = 89.7; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 600) { - Stroke_length_new = 90.2; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 600) { - Stroke_length_new = 90.7; - } - if (IER_new == 3 && BPM_new == 22 && tidal_volume_new == 600) { - Stroke_length_new = 91.2; - } - if (IER_new == 3 && BPM_new == 23 && tidal_volume_new == 600) { - Stroke_length_new = 91.7; - } - if (IER_new == 3 && BPM_new == 24 && tidal_volume_new == 600) { - Stroke_length_new = 92.2; - } - // if(IER_new == 3 && BPM_new ==25 && tidal_volume_new ==600){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==26 && tidal_volume_new ==600){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==27 && tidal_volume_new ==600){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==28 && tidal_volume_new ==600){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==29 && tidal_volume_new ==600){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==30 && tidal_volume_new ==600){ Stroke_length_new = NA;} - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 650) { - Stroke_length_new = 93.5; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 650) { - Stroke_length_new = 93.7; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 650) { - Stroke_length_new = 93.9; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 650) { - Stroke_length_new = 94.1; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 650) { - Stroke_length_new = 94.3; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 650) { - Stroke_length_new = 94.6; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 650) { - Stroke_length_new = 95; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 650) { - Stroke_length_new = 95.4; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 650) { - Stroke_length_new = 95.8; - } - if (IER_new == 3 && BPM_new == 19 && tidal_volume_new == 650) { - Stroke_length_new = 96.2; - } - if (IER_new == 3 && BPM_new == 20 && tidal_volume_new == 650) { - Stroke_length_new = 96.6; - } - if (IER_new == 3 && BPM_new == 21 && tidal_volume_new == 650) { - Stroke_length_new = 97; - } - // if(IER_new == 3 && BPM_new ==22 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==23 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==24 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==25 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==26 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==27 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==28 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==29 && tidal_volume_new ==650){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==30 && tidal_volume_new ==650){ Stroke_length_new = NA;} - - if (IER_new == 3 && BPM_new == 10 && tidal_volume_new == 700) { - Stroke_length_new = 99.4; - } - if (IER_new == 3 && BPM_new == 11 && tidal_volume_new == 700) { - Stroke_length_new = 99.6; - } - if (IER_new == 3 && BPM_new == 12 && tidal_volume_new == 700) { - Stroke_length_new = 99.8; - } - if (IER_new == 3 && BPM_new == 13 && tidal_volume_new == 700) { - Stroke_length_new = 100; - } - if (IER_new == 3 && BPM_new == 14 && tidal_volume_new == 700) { - Stroke_length_new = 100.2; - } - if (IER_new == 3 && BPM_new == 15 && tidal_volume_new == 700) { - Stroke_length_new = 100.6; - } - if (IER_new == 3 && BPM_new == 16 && tidal_volume_new == 700) { - Stroke_length_new = 101; - } - if (IER_new == 3 && BPM_new == 17 && tidal_volume_new == 700) { - Stroke_length_new = 101.4; - } - if (IER_new == 3 && BPM_new == 18 && tidal_volume_new == 700) { - Stroke_length_new = 101.8; - } - // if(IER_new == 3 && BPM_new ==19 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==20 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==21 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==22 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==23 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==24 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==25 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==26 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==27 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==28 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==29 && tidal_volume_new ==700){ Stroke_length_new = NA;} - // if(IER_new == 3 && BPM_new ==30 && tidal_volume_new ==700){ Stroke_length_new = NA;} - -#if TEMP_FIX1 /// stroke length for TW0002 - - /// temp fix for demo 28/04/2021 - tidal_volume_new = tidal_volume_new + 50 ; - /// temp fix for demo 28/04/2021 - -#endif - - DebugPort.print("IER_new : "); - DebugPort.print(IER_new); - DebugPort.print(" BPM_new : "); - DebugPort.print(BPM_new); - DebugPort.print(" tidal_volume_new : "); - DebugPort.print(tidal_volume_new); - DebugPort.print(" SL_new : "); - DebugPort.println(Stroke_length_new); -} +// ------------------------ EOF ---------------- diff --git a/mcu2/.vs/Ventilator/v14/.atsuo b/mcu2/.vs/Ventilator/v14/.atsuo new file mode 100644 index 0000000..8419d36 Binary files /dev/null and b/mcu2/.vs/Ventilator/v14/.atsuo differ diff --git a/mcu2/.vs/mcu2/v14/.atsuo b/mcu2/.vs/mcu2/v14/.atsuo index 13371da..6dc68be 100644 Binary files a/mcu2/.vs/mcu2/v14/.atsuo and b/mcu2/.vs/mcu2/v14/.atsuo differ diff --git a/mcu2/BoardDefines.h b/mcu2/BoardDefines.h index d395b43..c1a38db 100644 --- a/mcu2/BoardDefines.h +++ b/mcu2/BoardDefines.h @@ -29,11 +29,10 @@ #endif -#define ENABLE_BUZZER 0 -//#define DEBUG_RECEIVED_DATA 1 -#define PRINT_PROCESSING_TIME 0 - -#define ENABLE_O2_SUPPLY 0 +#define ENABLE_BUZZER 0 +#define ENABLE_O2_SUPPLY 0 +#define PRINT_PROCESSING_TIME 0 +//#define DEBUG_RECEIVED_DATA 1 #endif // __BOARD_INCLUDES_H__ diff --git a/mcu2/lcd_display/ctrl_display.cpp b/mcu2/lcd_display/ctrl_display.cpp index 1dd9c5d..5f55cef 100644 --- a/mcu2/lcd_display/ctrl_display.cpp +++ b/mcu2/lcd_display/ctrl_display.cpp @@ -908,7 +908,8 @@ void displayManager::aboutScreen(RT_Events_T eRTState) lcd.setCursor(1, 3); // lcd.write("Version : V3.04"); - lcd.write("Version : V3.05"); // After warnings clearacne from firmware. + // lcd.write("Version : V3.05"); // After warnings clearacne from firmware. + lcd.write("Version : V3.06"); // After spyro constant adjust to match tidal volumes with reference meter if (eRTState == RT_BT_PRESS) { diff --git a/mcu2/libraries/extEEPROM-3.4.1/extEEPROM.h b/mcu2/libraries/extEEPROM-3.4.1/extEEPROM.h index a57598e..3f327ec 100644 --- a/mcu2/libraries/extEEPROM-3.4.1/extEEPROM.h +++ b/mcu2/libraries/extEEPROM-3.4.1/extEEPROM.h @@ -59,7 +59,7 @@ #define extEEPROM_h #include -#include +#include //EEPROM size in kilobits. EEPROM part numbers are usually designated in k-bits. enum eeprom_size_t { diff --git a/mcu2/sensors/O2_sensor.cpp b/mcu2/sensors/O2_sensor.cpp index 6edf21b..5903000 100644 --- a/mcu2/sensors/O2_sensor.cpp +++ b/mcu2/sensors/O2_sensor.cpp @@ -28,7 +28,8 @@ #define O2_100_FACTORY_VALUE (long int)(595.88 *O2_CALIBRATION_VOLTAGE_ACCURACY ) -int const x_samples[NUM_OF_SAMPLES_O2] = {20, 216, 1000}; +//int const x_samples[NUM_OF_SAMPLES_O2] = {20, 216, 1000}; +int const x_samples[NUM_OF_SAMPLES_O2] = {50, 216, 960}; // as per the reference gases used .. N2 with 95% purity & O2 with 96% purity long int yO2VoltX1000[NUM_OF_SAMPLES_O2] = { O2_2_FACTORY_VALUE, O2_22_FACTORY_VALUE, O2_100_FACTORY_VALUE }; diff --git a/mcu2/sensors/pressure_sensor.cpp b/mcu2/sensors/pressure_sensor.cpp index 5e498a3..835a42f 100644 --- a/mcu2/sensors/pressure_sensor.cpp +++ b/mcu2/sensors/pressure_sensor.cpp @@ -56,12 +56,22 @@ from the pressure sensors #define MPXV7002DP_VFSS_MAX (4.5) #define MPXV7002DP_ACCURACY_MAX (0.06250) -/* -* Pressure sensors configurations -*/ -#define SPYRO_KSYSTEM 110 // Ksystem assumed for spyro -#define FLOWRATE_MIN_THRESHOLD 7 -#define CALIBRATION_COUNT 20 +// /* +// * Pressure sensors configurations +// */ +// #define SPYRO_KSYSTEM 110 // Ksystem assumed for spyro +// #define FLOWRATE_MIN_THRESHOLD 7 +// #define CALIBRATION_COUNT 20 +// +// // Slope adjustment for DP sensors +// // 1. In-hale DP sensor +// #define CALIB_SLOPE_TVi (1.28590) +// #define CALIB_CONST_TVi (2.85) +// +// // 1. Ex-hale DP sensor +// #define CALIB_SLOPE_TVe (0.95850) +// #define CALIB_CONST_TVe (5.05) + String sensorId2String(sensor_e type) { switch (type) { diff --git a/mcu2/sensors/pressure_sensor.h b/mcu2/sensors/pressure_sensor.h index aa488f1..2f531f4 100644 --- a/mcu2/sensors/pressure_sensor.h +++ b/mcu2/sensors/pressure_sensor.h @@ -26,6 +26,26 @@ #define DEBUG_DP_PRESSURE_SENSOR 0 #define DEBUG_DP_PRESSURE_SENSOR_SHORTLOG 0 + +/* +* Pressure sensors configurations +*/ +#define SPYRO_KSYSTEM 110 // Ksystem assumed for spyro +#define FLOWRATE_MIN_THRESHOLD 7 +#define CALIBRATION_COUNT 20 + +// Slope adjustment for DP sensors +// 1. In-hale DP sensor +#define CALIB_SLOPE_TVi (0.95) +#define CALIB_CONST_TVi (-65.0) + +// 1. Ex-hale DP sensor +#define CALIB_SLOPE_TVe (0.99) +#define CALIB_CONST_TVe (5.00) + + + + /**************************************************************************/ /*! @brief Class to handle Pressure sensor, inherits base sensor class diff --git a/mcu2/sensors/sensormanager.cpp b/mcu2/sensors/sensormanager.cpp index b2154ac..340756a 100644 --- a/mcu2/sensors/sensormanager.cpp +++ b/mcu2/sensors/sensormanager.cpp @@ -111,14 +111,31 @@ float sensorManager::capture_and_read_data(sensor_e s) { VENT_DEBUG_FUNC_START(); float data = 0.0; + switch(s) { case SENSOR_DP_A0: - if(_enabled_sensors & DP_A0) - data = _dpS1.capture_and_read(); + if(_enabled_sensors & DP_A0) { + data = _dpS1.capture_and_read(); + // DebugPort.print ("computed volume DP_A0 : "); + // DebugPort.println (data); + + // y = mx + c + data = data * CALIB_SLOPE_TVi + CALIB_CONST_TVi; + // DebugPort.print ("Adjusted volume DP_A0 : "); + // DebugPort.println (data); + } break; case SENSOR_DP_A1: - if(_enabled_sensors & DP_A1) - data = _dpS2.capture_and_read(); + if(_enabled_sensors & DP_A1) { + data = _dpS2.capture_and_read(); + // DebugPort.print ("computed volume DP_A1 : "); + // DebugPort.println (data); + + // y = mx + c + data = data * CALIB_SLOPE_TVe + CALIB_CONST_TVe; + // DebugPort.print ("Adjusted volume DP_A1 : "); + // DebugPort.println (data); + } break; case SENSOR_O2: if(_enabled_sensors & O2)