%Header Record Format:MCS1 Type Number:1 File Name:GETDATA Option Name: Communication SW:0 Capacity:1833 Data Type:PG %Data Record Password: BaseN:0 \ClrText " ":" ":" ":" ":" " \Locate 1,1,"EA-100 data program" \Locate 1,3,"Choose:" \Locate 1,4,"1. new experiment" \Locate 1,5,"2. download data" ?\->C \If C\<>2 \Then \ClrText " ":" ":" ":" " \Locate 1,1,"Turn EA-100 unit on" \Locate 1,2,"connect probe(s)" \Locate 1,3,"\and then press EXE"\Disp\Locate 1,5,"Initialising..." \ClrList {0}\->\List 1 \Send(\List 1) \ClrText " ":" " \Locate 1,1,"Number of samples" \Locate 11,2,"(2 - 250)" ?\->N \If N<2:\Then 2\->N:\IfEnd \If N>250:\Then 250\->N:\IfEnd \ClrText " ":" " \Locate 1,1,"Time between samples" \Locate 6,2,"(.001s - 16000s)" ?\->T \If T<.001:\Then .001\->T:\IfEnd \If T>16000:\Then 16000\->T:\IfEnd " ":" " \Locate 1,6,"Total time (s)=" \Locate 16,6,NT\Disp\ClrText " ":" " \Locate 1,1,"Checking mem\ory..." {7}\->\List 1 \Send(\List 1) \Receive(\List 1) \Dim \List 1-6\->P \Seq(0,I,1,N,1)\->\List 1 \List 1\->\List 2 \If P>1:\Then \List 1\->\List 3:\IfEnd \If P>2:\Then \List 1\->\List 4:\IfEnd \Locate 10,2,"mem\ory OK"\Disp" ":" ":" " \Locate 1,4,"Press EXE to start" \Locate 1,5,"data sampling"\Disp{3,T,N,2,0}\->\List 1 \Send(\List 1) \ClrText " ":" ":" " \Locate 1,1,"Sampling in progress" \Locate 1,2,"Wait until DONE" \Locate 1,3,"appears on EA-100" \Else \ClrText " ":" ":" " \Locate 1,1,"Check EA-100 is on" \Locate 1,2,"with probes still" \Locate 1,3,"connected" \IfEnd " " \Locate 1,4,"then press EXE..."\Disp\ClrText \Locate 1,1,"\Receiving data" "Time....." \Receive(\List 1) \Dim \List 1\->N \If C=2 \Then 3\->V \List 1[2]\->T \If \List 1[1]>1\EE\(-)4:\Then 2\->V:\IfEnd \Int (T*10^(V+1))\->T \Int (T/10)\->W \If T-10W\>=5:\Then W+1\->W:\IfEnd W/10^V\->T {7}\->\List 1 \Send(\List 1) \Receive(\List 1) \Dim \List 1-6\->P \IfEnd \Seq(I,I,0,T(N-1),T)\->\List 1 "data 1..." \Receive(\List 2) 2-\Int \log \Abs \Max(\List 2)\->R \If R>2:\Then 2\->R:\IfEnd \If R<0:\Then 0\->R:\IfEnd \Int (10^R*\List 2+.5)/10^R\->\List 2 \Max(\List 2)-\Min(\List 2)\->M \If P>1 \Then "data 2..." \Receive(\List 3) 2-\Int \log \Abs \Max(\List 3)\->R \If R>2:\Then 2\->R:\IfEnd \If R<0:\Then 0\->R:\IfEnd \Int (10^R*\List 3+.5)/10^R\->\List 3 \Max(\List 3)-\Min(\List 3)+M\->M \IfEnd \If P>2 \Then "data 3..." \Receive(\List 4) 2-\Int \log \Abs \Max(\List 4)\->R \If R>2:\Then 2\->R:\IfEnd \If R<0:\Then 0\->R:\IfEnd \Int (10^R*\List 4+.5)/10^R\->\List 4 \Max(\List 4)-\Min(\List 4)+M\->M \IfEnd \If \ Not (N=1\ Or M=0) \Then \ClrText " ":" " \Locate 1,1,"All data in" \Locate 1,2,"EXE to graph..."\Disp\ClrGraph \S-WindAuto \S-Gph1 \DrawOn,\Scatter,\List 1,\List 2,1,\Cross \S-Gph2 \DrawOff \S-Gph3 \DrawOff \If P>1:\Then \S-Gph2 \DrawOn,\Scatter,\List 1,\List 3,1,\Square:\IfEnd \If P>2:\Then \S-Gph3 \DrawOn,\Scatter,\List 1,\List 4,1,\Dot:\IfEnd 10T\->\Xscl 100\->\Yscl \DrawStat \Text 2,99,"EXE..."\Disp\IfEnd \ClrText " " \Locate 1,1,"Finished" \Locate 1,2,"Again...... EXE" \Locate 1,3,"See data... MENU,2" \Locate 1,4,"End........ AC\slashON" \@00 %End %Header Record Format:MCS1 Type Number:1 File Name:GETITEM Option Name: Communication SW:0 Capacity:657 Data Type:PG %Data Record Password: BaseN:0 \ClrText:\ClrList \Locate 1,1,"Get Item v1.2":\Locate 1,2,"EA-100 must be on":\Locate 1,3,"Then":\Locate 6,3,"choose:" \Locate 1,5,"F1.Single data" \Locate 1,6,"F6.Paired data" \Seq(0,X,1,255,1)\->\List 1 \Do:\Getkey\->P:\LpWhile P=0 \ClrText \If P\<>29:\Then 1\->P:\Else 2\->P:\List 1\->\List 2:\IfEnd {0}\->\List 5:\Send(\List 5) {3,.01,\(-)1,0,0}\->\List 6:\Send(\List 6) \Locate 1,6,"F1" \Locate 1,7,"End" \Locate 20,6,"F6" \Locate 19,7,"\Log" \Locate 4,2,"Sample:" \Locate 5,3,"Value:" \If P=2:\Then \Locate 5,4,"Value:":\IfEnd 0\->V \Do 1+V\->V \Locate 12,2,V \For 1\->I \To P \Locate 11,4," " \Do:\Receive(D):\Locate 11,2+I," ":\Locate 12,2+I,D:\Getkey\->K:\LpWhile K=0 \If K=29\ And I=1:\Then D\->\List 1[V]:\IfEnd \If K=29\ And I=2:\Then D\->\List 2[V]:\IfEnd \If K\<>79:\Then \Locate 11,2+I,"\aster":\For 1\->J \To 200:\Getkey\->K:\Next :\IfEnd \If K=79:\Then P+1\->I:\IfEnd \Next \LpWhile K\<>79 \Send(\List 5) \Seq(\List 1[I],I,1,V,1)\->\List 1 \If P=2:\Then \Seq(\List 2[I],I,1,V,1)\->\List 2:\IfEnd \List 1\Disp\If P=2 \Then \List 2\Disp\IfEnd \ClrText\@00 %End %Header Record Format:MCS1 Type Number:1 File Name:GETPH Option Name: Communication SW:0 Capacity:2880 Data Type:PG %Data Record Password: BaseN:0 0\->A~Z:60\->N:1\->T:\(-)3.838\->A:13.72\->B:14\->G:{0}\->\List 1:{0}\->\List 2 \Do \BG-None:\ClrText:\Cls:\ViewWindow 1,127,0,1,63,0 \Text 1,1,"GET pH" \Text 13,1,"pH probe only in CH1":\Text 19,1,"Samples:":\Text 25,1,"Interval:":\Text 31,1,"Tot time:":\Text 37,1,"\Ymin:":\Text 43,1,"\Ymax:" 2\->L \If C=1:\Then \Text 7,1,"Using Calib Eqn":\Else \Text 7,1," ":\IfEnd \For 19\->I \To 43 \Step 6:\Text I,40," ":\Next \Text 19,42,N:\Text 25,42,T:\Text 31,42,TN:\Text 37,42,F:\Text 43,42,G \For 2\->I \To 107 \Step 21:\F-Line I,1,I,8:\F-Line I,8,I+18,8:\Next \Text 50,1," " \Text 58,4," Go ":\Text 58,25,"Grph":\Text 58,46,"Cal ":\Text 58,67,"Set ":\Text 58,88," ":\Text 58,109,"Exit " \Do:8-\Int (\Getkey/10)\->K:\LpWhile K=8 \If K=1:\Then \Text 50,1,"Wait!...":\ClrList \Text 58,4," ":\Text 58,25," ":\Text 58,46," ":\Text 58,67," ":\Text 58,88," ":\Text 58,109," " \Seq(IT,I,1,N,1)\->\List 1:0\List 1\->\List 2 {0}\->\List 6:\Send(\List 6):{1,1,1}\->\List 6:\Send(\List 6):{4,1,1,0,B,A}\->\List 6:\Send(\List 6):{3,.3,\(-)1,0,1}\->\List 6:\Send(\List 6) \Text 50,1,"F1 to start when steady":\Text 58,4," Go " \Do:\Receive(V):\Text 50,104,V:8-\Int (\Getkey/10)\->I:\LpWhile I\<>1 {0}\->\List 6:\Send(\List 6):{1,1,1}\->\List 6:\Send(\List 6):{4,1,1,0,B,A}\->\List 6:\Send(\List 6) {3,T-.27,\(-)1,0,0}\->\List 6:\Send(\List 6):\ViewWindow 1,NT,1,F,G,1:\AxesOff:\Cls:\F-Line 1,F,1,G:\F-Line D,F,NT,F:\Text 1,4,G:\Text 57,4,F:\Text 1,59,"pH" \Receive(V):V\->\List 2[1]:\Text 1,82,"Sample1" \For 2\->I \To N:\Receive(V):\F-Line (I-1)T,\List 2[I-1],IT,V:V\->\List 2[I]:\Text 1,111,I:\PxlOn 1,1:\Next {0}\->\List 6:\Send(\List 6) \Text 50,106,"[EXE]"\Disp\IfEnd \If K=2\ And \Max(\List 1)-\Min(\List 1)\<>0\ And \Max(\List 2)-\Min(\List 2)\<>0:\Then \S-WindAuto:\AxesOn:\S-Gph2 \DrawOff:\S-Gph3 \DrawOff:\S-Gph1 \DrawOn,\xyLine,\List 1,\List 2,1,\Dot:\DrawStat:\Text 50,106,"[EXE]"\Disp\AxesOff \IfEnd \If K=4:\Then \Text 50,1,"SETUP" \Text 58,4,"Rset":\Text 58,25,"Smp":\Text 58,46,"Int":\Text 58,67,"\Yscl":\Text 58,109," OK" \Do \Do:8-\Int (\Getkey/10)\->J:\LpWhile J=8 \If J=1:\Then 60\->N:1\->T:\(-)3.838\->A:13.72\->B:0\->C:0\->F:14\->G:\IfEnd \If J=2:\Then \ClrText:" ":\Locate 1,1,"Number of samples":" ":\Locate 1,2,"Type number, then EXE":" ":\Locate 1,3,"[2 to 255]":?\->N:\If N<2:\Then 2\->N:\IfEnd:\If N>255:\Then 255\->N:\IfEnd:\IfEnd \If J=3:\Then \ClrText:" ":\Locate 1,1,"Time (seconds)":" ":\Locate 1,2,"between samples":" ":\Locate 1,3,"Type number, then EXE":" ":\Locate 1,4,"[1 to 16000]":?\->T:\If T<1:\Then 1\->T:\IfEnd:\If T>16000:\Then 16000\->T:\IfEnd:\IfEnd \If J=4:\Then \ClrText:1\->D:N\->E:" ":\Locate 1,1,"\Vertical graph scl":" ":" ":\Locate 1,3,"Ymi":\Locate 4,3,"n \-> Ym":\Locate 10,3,"ax":"\Ymin"?\->F:"\Ymax"?\->G:\IfEnd 4\->L \If J\<>6:\Then \If C=1:\Then \Text 7,1,"Using Calib Eqn":\Else \Text 7,1," ":\IfEnd \For 19\->I \To 43 \Step 6:\Text I,40," ":\Next \Text 19,42,N:\Text 25,42,T:\Text 31,42,TN:\Text 37,42,F:\Text 43,42,G \IfEnd \LpWhile J\<>6 \IfEnd \If K=3:\Then \ClrText:" ":\Locate 1,1,"Calibrate probe...":\Locate 1,3,"1st remove all other":\Locate 1,4,"probe(s) from EA100":\Locate 8,7,"Then":\Locate 13,7,"press EXE":\Do:\Getkey\->W:\LpWhile W\<>31 \ClrText:" ":\Locate 1,1,"Calibration expt":" ":\Locate 1,2,"to find a,b: y=ax+b":" ":\Locate 1,3,"How many cal. points":?\->B \Seq(0,X,1,B,1)\->\List 3:\List 3\->\List 4 {0}\->\List 6:\Send(\List 6):{1,1,1}\->\List 6:\Send(\List 6):{3,.3,\(-)1,0,0}\->\List 6:\Send(\List 6) \For 1\->I \To B \ClrText:" ":\Locate 1,1,"Point":\Locate 7,1,I:\Locate 10,1,"Wait f\or":" ":\Locate 1,2,"steady reading then":" ":\Locate 1,3,"long press EXE":" ":\Locate 1,4,"R":\Locate 2,4,"eading=" \Do:\Receive(V):\Locate 10,4," ":\Locate 10,4,V:\Getkey\->W:\LpWhile W\<>31:V\->\List 3[I]:"\aster rec\orded \aster" "Value"?\->\List 4[I] \Next {0}\->\List 6:\Send(\List 6) \LinearReg \List 3,\List 4:\Ra\->A:\Rb\->B:1\->C \ClrText:\Locate 1,2,"Using y=ax+b coeffs":\Locate 1,4,"a=":\Locate 3,4,\Ra:\Locate 1,5,"b=":\Locate 3,5,\Rb:\Locate 9,7,"EXE to cont..":\Do:\Getkey\->W:\LpWhile W\<>31 \IfEnd \LpWhile K\<>6 \Cls:\Text 20,47,"GET pH" \Text 33,7,"(C)2000 Charlie Watson" 107\->I:\F-Line I,1,I,8:\F-Line I,8,I+18,8:\Text 58,109," OK" \Do:8-\Int (\Getkey/10)\->H:\LpWhile H\<>6 \Cls:\ClrText\@00 %End %Header Record Format:MCS1 Type Number:1 File Name:GETPULSE Option Name: Communication SW:0 Capacity:1653 Data Type:PG %Data Record Password: BaseN:0 \ClrText:\ClrList:\Locate 4,3,"Checking.." {0}\->\List 6:\Send(\List 6) \Norm :0\->A~Z:.03\->T:100\->N:100\->W:\(-)1\->G \Seq(TX,X,0,N-1,1)\->\List 1 {1,1,10}\->\List 6:\Send(\List 6) \Locate 15,3,"Ok!":\Locate 5,5,"Clip on ear":\Locate 2,7,"then EXE to start"\Disp{5,0,0,W+1,W+N}\->\List 5 {3,T,W+N,0,0}\->\List 6:\Send(\List 6) \ClrText:\AxesOff:\Cls \Text 1,1,"GETPULSE" \Text 8,1,"(C)2000 Charlie Watson" \Text 15,1,"Use F1 (long press) to switch" \Text 21,1,"current \and hist\ory views" \Text 29,1,"Use F6 (long press) to finish" \Text 40,1,"Please wait 15 seconds" \Text 47,1,"Collecting initial data..":\Text 1,125," " \S-Gph1 \DrawOn,\xyLine,\List 1,\List 2,1,\Dot \S-Gph2 \DrawOn,\xyLine,\List 3,\List 4,1,\Dot \S-Gph3 \DrawOff \For 0\->I \To 500:\Getkey\->K:\If K=29:\Then 501\->I:\IfEnd:\Next :\If K=29:\Then \Goto4:\IfEnd \Text 54,1,"Transfering..":\Text 1,125," " \Do \Send(\List 5):\Receive(\List 2):\Getkey\->K:\If K=29:\Then \Goto3:\IfEnd \If K=79\ And L>1:\Then \(-)G\->G:\Cls:\IfEnd \Send(\List 6) \Text 56,4," " \Max(\List 2)\->A:\Min(\List 2)\->B:.6A-.4B\->M \If G=\(-)1:\Then \AxesOff:\S-WindAuto:\S-Gph2 \DrawOff:\S-Gph1 \DrawOn:\Cls:\DrawStat:\F-Line \Xmin,\Ymin,\Xmin,\Ymax:\F-Line \Xmin,\Ymin,\Xmax,\Ymin:\IfEnd \Getkey\->K:\If K=29:\Then \Goto3:\IfEnd \Text 56,43,"Calculating..":\Text 1,125," " 1+Z\->Z:0\->P:0\->F:\(-)1\->V:1\->I:1\->R \Do 1+I\->I \If \List 2[I]>M \Then \If \List 2[I]\>=\List 2[I-1]\ And \List 2[I]\>=\List 2[I+1] \Then I\->S:1+V\->V \If V=0:\Then I\->C:\IfEnd \If V=1:\Then I\->D:\IfEnd \If V\>=2 \Then \If (S-D)/(D-C)+(D-C)/(S-D)>2.12:\Then 0\->R:\IfEnd D\->C:S\->D \IfEnd \If F=0:\Then I\->F:\IfEnd I+4\->I \IfEnd \IfEnd \Getkey\->K \If K=29:\Then \Break:\IfEnd \LpWhile IP:\IfEnd \If P>200:\Then 0\->R:\IfEnd \If R=1:\Then 1+L\->L:\IfEnd \If L=1\ And R=1:\Then [[Z\ab/c4][P]]\->\Mat Z:\IfEnd \If L>1 \Then \If R=1 \Then \Augment(\Mat Z,[[Z\ab/c4][P]])\->\Mat Z \IfEnd \Trn \Mat Z\->\Mat Z:\Mat->List\Mat Z,1)\->\List 3:\Mat->List\Mat Z,2)\->\List 4:\Trn \Mat Z\->\Mat Z \IfEnd \If G=1\ And L>1 \Then \AxesOn:\S-WindMan:\ViewWindow 0,(Z+10)/4,1,0,200,25:\S-Gph1 \DrawOff:\S-Gph2 \DrawOn:\Cls:\DrawStat:\Text 14,4,"150":\Text 45,4,"50":\Text 1,4,"BPM" \IfEnd \Getkey\->K \If K=29:\Then \Goto3:\IfEnd \Text 56,42," BPM: ":\Text 56,75,P \If R=0:\Then \Text 48,44,"\aster\Rejected\aster":\IfEnd \Text 1,60,"St\ored":\Text 1,87,L:\Text 1,100,"of":\Text 1,110,Z:\Text 56,99,"F6:\Stop":\Text 56,4,"F1:ChView" \If A<3:\Then \Text 8,8,"WARNING! EA100 batteries LOW?":\IfEnd \Text 1,30,"Wait..":\Text 1,125," " \Lbl 3 \LpWhile K\<>29\ And L<255 \Lbl 4:\Norm :\AxesOn:\ClrText \@00 %End