mirror of
				https://github.com/brmlab/ratbox.git
				synced 2025-10-31 05:53:59 +01:00 
			
		
		
		
	Odstraneno hodne chyb a pridano par novych funkcionalit
This commit is contained in:
		
							parent
							
								
									7be19c6c97
								
							
						
					
					
						commit
						ac93644b9c
					
				
					 3 changed files with 377 additions and 101 deletions
				
			
		|  | @ -16,11 +16,9 @@ SearchString=True | ||||||
| 
 | 
 | ||||||
| [OpenFile] | [OpenFile] | ||||||
| File[1]="FMain.form" | File[1]="FMain.form" | ||||||
| File[2]="FMain.class:281.0" | File[2]="FMain.class:663.0" | ||||||
| File[3]="Form1.form" | Active=2 | ||||||
| Active=3 | Count=2 | ||||||
| File[4]="Form1.class:8.0" |  | ||||||
| Count=4 |  | ||||||
| 
 | 
 | ||||||
| [Watches] | [Watches] | ||||||
| Count=0 | Count=0 | ||||||
|  |  | ||||||
							
								
								
									
										298
									
								
								FMain.class
									
										
									
									
									
								
							
							
						
						
									
										298
									
								
								FMain.class
									
										
									
									
									
								
							|  | @ -45,6 +45,9 @@ PUBLIC ExpLastStim AS Integer | ||||||
| PUBLIC ExpGenerujStimul AS Boolean | PUBLIC ExpGenerujStimul AS Boolean | ||||||
| PUBLIC ExpTemp AS Integer | PUBLIC ExpTemp AS Integer | ||||||
| 
 | 
 | ||||||
|  | PUBLIC PreTimeout AS Integer | ||||||
|  | 
 | ||||||
|  | PUBLIC PreLastBuffer AS Integer | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB _new() | PUBLIC SUB _new() | ||||||
| 
 | 
 | ||||||
|  | @ -159,7 +162,7 @@ DIM StrTmp AS String | ||||||
|   PreP4E = CheckBoxPrePE4.Value |   PreP4E = CheckBoxPrePE4.Value | ||||||
|   PreP5E = CheckBoxPrePE5.Value |   PreP5E = CheckBoxPrePE5.Value | ||||||
|   PreP6E = CheckBoxPrePE6.Value |   PreP6E = CheckBoxPrePE6.Value | ||||||
|   PrePNE = CheckBoxPrePP.Value | '  PrePNE = CheckBoxPrePP.Value | ||||||
|   PrePOD = CheckBoxPrePP2.Value |   PrePOD = CheckBoxPrePP2.Value | ||||||
|   IF PreP1E = TRUE THEN StrTmp = StrTmp & "1" |   IF PreP1E = TRUE THEN StrTmp = StrTmp & "1" | ||||||
|   IF PreP1E = FALSE THEN StrTmp = StrTmp & "0" |   IF PreP1E = FALSE THEN StrTmp = StrTmp & "0" | ||||||
|  | @ -182,39 +185,47 @@ DIM StrTmp AS String | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ_Click() | PUBLIC SUB BtnSZ_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 1 | ||||||
|   PreEaventZ1 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ1 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ2_Click() | PUBLIC SUB BtnSZ2_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 2 | ||||||
|   PreEaventZ2 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ2 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ3_Click() | PUBLIC SUB BtnSZ3_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 3 | ||||||
|   PreEaventZ3 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ3 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ4_Click() | PUBLIC SUB BtnSZ4_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 4 | ||||||
|   PreEaventZ4 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ4 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ5_Click() | PUBLIC SUB BtnSZ5_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 5 | ||||||
|   PreEaventZ5 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ5 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnSZ6_Click() | PUBLIC SUB BtnSZ6_Click() | ||||||
|   PreEaventPotkan = TRUE | ExpZ = 6 | ||||||
|   PreEaventZ6 = TRUE | '  PreEaventPotkan = TRUE | ||||||
|  | '  PreEaventZ6 = TRUE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB BtnPreStart_Click() | PUBLIC SUB BtnPreStart_Click() | ||||||
| DIM PotkanAkceTMP AS Integer | DIM PotkanAkceTMP AS Integer | ||||||
| DIM PocetCiklu AS Integer | DIM PocetCiklu AS Integer | ||||||
|  | PreLastBuffer = 0 | ||||||
|   PocetCiklu = 0 |   PocetCiklu = 0 | ||||||
|  | PreBtnNastavTimeout_Click | ||||||
|   IF CheckBoxExpVisEn.Value = TRUE THEN  |   IF CheckBoxExpVisEn.Value = TRUE THEN  | ||||||
|     SysLogWrite("Experiment_START") |     SysLogWrite("Experiment_START") | ||||||
|     VisStimIdx = 0 |     VisStimIdx = 0 | ||||||
|  | @ -279,7 +290,8 @@ DIM PocetCiklu AS Integer | ||||||
|       SysLogWrite("Experiment_ZOBR_STIMUL: " & VisStimIdx) |       SysLogWrite("Experiment_ZOBR_STIMUL: " & VisStimIdx) | ||||||
|       IF (VisStimIdx < 1) OR (VisStimIdx > 6) THEN GOTO EXPSTART |       IF (VisStimIdx < 1) OR (VisStimIdx > 6) THEN GOTO EXPSTART | ||||||
|       ExperimentPicture.Picture = Picture.Load("/home/tomsuch/" & Str(VisStimIdx) & ".bmp") |       ExperimentPicture.Picture = Picture.Load("/home/tomsuch/" & Str(VisStimIdx) & ".bmp") | ||||||
|       PictureBox1.Picture = Picture.Load("/home/tomsuch/" & Str(VisStimIdx) & ".bmp")) | '      Form1.PictureBox1.Picture = Picture.Load("/home/tomsuch/" & Str(VisStimIdx) & ".bmp")) | ||||||
|  | '      Form1.Picture = Picture.Load("/home/tomsuch/" & Str(VisStimIdx) & ".bmp") | ||||||
|       Label23.Text = VisStimIdx |       Label23.Text = VisStimIdx | ||||||
|       SysLogWrite("Experiment_PAUZA_1") |       SysLogWrite("Experiment_PAUZA_1") | ||||||
|       IF ExpChkEnableTiming.Value = FALSE THEN  |       IF ExpChkEnableTiming.Value = FALSE THEN  | ||||||
|  | @ -323,7 +335,7 @@ DIM PocetCiklu AS Integer | ||||||
|       IF ExperimentCheckZhasniStimul.Value = TRUE THEN |       IF ExperimentCheckZhasniStimul.Value = TRUE THEN | ||||||
|         SysLogWrite("Experiment_ZHAS_STIMUL") |         SysLogWrite("Experiment_ZHAS_STIMUL") | ||||||
|         ExperimentPicture.Picture = Picture.Load("/home/tomsuch/clear.bmp") |         ExperimentPicture.Picture = Picture.Load("/home/tomsuch/clear.bmp") | ||||||
|         Form1.PictureBox1.Picture = Picture.Load("/home/tomsuch/clear.bmp") | '        Form1.PictureBox1.Picture = Picture.Load("/home/tomsuch/clear.bmp") | ||||||
|         WAIT  |         WAIT  | ||||||
|       ENDIF  |       ENDIF  | ||||||
|       WAIT  |       WAIT  | ||||||
|  | @ -468,7 +480,7 @@ ELSE | ||||||
|   PreCasPauza = TxtPreTmrPauza.Text |   PreCasPauza = TxtPreTmrPauza.Text | ||||||
|   SysLogWrite("Pre_Cas_Pauza: " & PreCasPauza) |   SysLogWrite("Pre_Cas_Pauza: " & PreCasPauza) | ||||||
| BtnPreNastavNastaveniPitek_Click | BtnPreNastavNastaveniPitek_Click | ||||||
| 
 | PreLastBuffer = 0 | ||||||
| 
 | 
 | ||||||
|   SysLogWrite("Pre_START") |   SysLogWrite("Pre_START") | ||||||
| 
 | 
 | ||||||
|  | @ -485,6 +497,15 @@ PocetCiklu = PocetCiklu + 1 | ||||||
| 
 | 
 | ||||||
|   LabelPre.Background = Color.Green  |   LabelPre.Background = Color.Green  | ||||||
| 
 | 
 | ||||||
|  |     IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("Pre_SYSTEM_BOX_OK") | ||||||
|  |       WRITE #SerialPort1, "D" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Pre_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF  | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|   PreCntTmp = 0 |   PreCntTmp = 0 | ||||||
|   PreCnt = TRUE |   PreCnt = TRUE | ||||||
|    |    | ||||||
|  | @ -503,23 +524,122 @@ PocetCiklu = PocetCiklu + 1 | ||||||
| 
 | 
 | ||||||
|   LabelPre2.Background = Color.Green |   LabelPre2.Background = Color.Green | ||||||
| 
 | 
 | ||||||
|   WHILE PreEaventPotkan = FALSE | 
 | ||||||
|  | precekejakci: | ||||||
|  | WAIT  | ||||||
|  | IF PreChkTimeout.Value = TRUE THEN  | ||||||
|  | WAIT  | ||||||
|  |      ExpZ = 0 | ||||||
|  |       ExpTmrTimeout.Enabled = FALSE | ||||||
|  |       ExpTimeoutBuff = 0 | ||||||
|  |       ExpTmrTimeout.Enabled = TRUE | ||||||
|  |        WHILE (ExpZ < 1) AND (ExpTimeoutBuff < PreTimeout) | ||||||
|  |         IF PotkanAkceBuff = 1 THEN ExpZ = 1 | ||||||
|  |         IF PotkanAkceBuff = 2 THEN ExpZ = 2 | ||||||
|  |         IF PotkanAkceBuff = 4 THEN ExpZ = 3 | ||||||
|  |         IF PotkanAkceBuff = 8 THEN ExpZ = 4 | ||||||
|  |         IF PotkanAkceBuff = 16 THEN ExpZ = 5 | ||||||
|  |         IF PotkanAkceBuff = 32 THEN ExpZ = 6 | ||||||
|         WAIT  |         WAIT  | ||||||
|       WEND  |       WEND  | ||||||
|  | ELSE  | ||||||
|  | WAIT | ||||||
|  |  ExpZ = 0 | ||||||
|  |        WHILE (ExpZ < 1) | ||||||
|  |         IF PotkanAkceBuff = 1 THEN ExpZ = 1 | ||||||
|  |         IF PotkanAkceBuff = 2 THEN ExpZ = 2 | ||||||
|  |         IF PotkanAkceBuff = 4 THEN ExpZ = 3 | ||||||
|  |         IF PotkanAkceBuff = 8 THEN ExpZ = 4 | ||||||
|  |         IF PotkanAkceBuff = 16 THEN ExpZ = 5 | ||||||
|  |         IF PotkanAkceBuff = 32 THEN ExpZ = 6 | ||||||
|  |         WAIT  | ||||||
|  |       WEND  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | SysLogWrite("Pre_Potkan_Akce:" & ExpZ) | ||||||
|  | 
 | ||||||
|  | IF CheckBoxPrePP2.Value = TRUE THEN  | ||||||
|  | WAIT  | ||||||
|  | IF PreLastBuffer = ExpZ THEN SysLogWrite("Pre_Potkan_Opakovani_Volby: " & ExpZ) | ||||||
|  | WAIT  | ||||||
|  | IF PreLastBuffer = ExpZ THEN GOTO precekejakci | ||||||
|  | WAIT  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | PreLastBuffer = ExpZ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE.Value = TRUE) AND (ExpZ = 1) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  | GOTO precekejakci  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE2.Value = TRUE) AND (ExpZ = 2) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  |  GOTO precekejakci  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE3.Value = TRUE) AND (ExpZ = 3) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  |  GOTO precekejakci | ||||||
|  |  ENDIF  | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE4.Value = TRUE) AND (ExpZ = 4) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  |  GOTO precekejakci  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE5.Value = TRUE) AND (ExpZ = 5) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  |  GOTO precekejakci  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | IF (CheckBoxPrePE6.Value = TRUE) AND (ExpZ = 6) THEN | ||||||
|  | SysLogWrite("Pre_Potkan_Zakazana_Volba") | ||||||
|  |  GOTO precekejakci  | ||||||
|  | ENDIF  | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | IF ExpTimeoutBuff >= PreTimeout THEN | ||||||
|  | SysLogWrite("Pre_POTKAN_TIMEOUT") | ||||||
|  | ExpTmrTimeout.Enabled = FALSE | ||||||
|  | ExpTimeoutBuff = 0 | ||||||
|  | LabelPre2.Background = Color.Background | ||||||
|  | GOTO preapres | ||||||
|  | ELSE  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   PreEaventPotkan = FALSE | ENDIF  | ||||||
|  | 
 | ||||||
|  | ' PreEaventPotkan = FALSE | ||||||
|   LabelPre2.Background = Color.Background |   LabelPre2.Background = Color.Background | ||||||
| 
 | 
 | ||||||
| PotkanAkceTMP = AkcePotkan() |  | ||||||
| 
 | 
 | ||||||
| SysLogWrite("Pre_Potkan_Akce:" & PotkanAkceTMP) |  | ||||||
| 
 | 
 | ||||||
| SysLogWrite("Pre_Nastavuji_Pitko:" & PotkanAkceTMP) | 'PotkanAkceTMP = AkcePotkan() | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | SysLogWrite("Pre_Nastavuji_Pitko:" & ExpZ) | ||||||
| 
 | 
 | ||||||
| LabelPre3.Background = Color.Green | LabelPre3.Background = Color.Green | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |         IF SerialPort1.Status = 1 THEN  | ||||||
|  |           SysLogWrite("Pre_SYSTEM_BOX_OK") | ||||||
|  |           IF VisStimIdx = 1 THEN WRITE #SerialPort1, "s1" | ||||||
|  |           IF VisStimIdx = 2 THEN WRITE #SerialPort1, "s2" | ||||||
|  |           IF VisStimIdx = 3 THEN WRITE #SerialPort1, "s3" | ||||||
|  |           IF VisStimIdx = 4 THEN WRITE #SerialPort1, "S1" | ||||||
|  |           IF VisStimIdx = 5 THEN WRITE #SerialPort1, "S2" | ||||||
|  |           IF VisStimIdx = 6 THEN WRITE #SerialPort1, "S3" | ||||||
|  |         ELSE  | ||||||
|  |           SysLogWrite("Pre_SYSTEM_BOX_CHYBA") | ||||||
|  |         ENDIF  | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|   PreCntTmp = 0 |   PreCntTmp = 0 | ||||||
|   PreCnt = TRUE |   PreCnt = TRUE | ||||||
| 
 | 
 | ||||||
|  | @ -548,9 +668,22 @@ TxtPreTmrPiti.Background = Color.Green | ||||||
| 
 | 
 | ||||||
| TxtPreTmrPiti.Background = Color.White | TxtPreTmrPiti.Background = Color.White | ||||||
| 
 | 
 | ||||||
| LabelPre5.Background = Color.Green | preapres: | ||||||
| 
 | 
 | ||||||
| SysLogWrite("Pre_Zavreni_Dveri") | 
 | ||||||
|  | LabelPre5.Background = Color.Green | ||||||
|  | LabelPre4.Background = Color.Green | ||||||
|  | 
 | ||||||
|  | SysLogWrite("Pre_Reset_Aparatury") | ||||||
|  | 
 | ||||||
|  |     IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("Pre_SYSTEM_BOX_OK") | ||||||
|  |       WRITE #SerialPort1, "S0" | ||||||
|  |       WRITE #SerialPort1, "s0" | ||||||
|  |       WRITE #SerialPort1, "d" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Pre_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF  | ||||||
| 
 | 
 | ||||||
|   PreCntTmp = 0 |   PreCntTmp = 0 | ||||||
|   PreCnt = TRUE |   PreCnt = TRUE | ||||||
|  | @ -562,20 +695,9 @@ SysLogWrite("Pre_Zavreni_Dveri") | ||||||
|     TxtPreWDTTmr.Text = 0 |     TxtPreWDTTmr.Text = 0 | ||||||
|        |        | ||||||
| LabelPre5.Background = Color.Background | LabelPre5.Background = Color.Background | ||||||
| 
 |  | ||||||
| LabelPre4.Background = Color.Green |  | ||||||
| SysLogWrite("Pre_Parkuji_Pitka") |  | ||||||
|   PreCntTmp = 0 |  | ||||||
|   PreCnt = TRUE |  | ||||||
|   WHILE PreCntTmp < 3 |  | ||||||
|   WAIT  |  | ||||||
|   TxtPreWDTTmr.Text = PreCntTmp |  | ||||||
|   WAIT  |  | ||||||
|   WEND   |  | ||||||
|   TxtPreWDTTmr.Text = 0 |  | ||||||
|    |  | ||||||
| LabelPre4.Background = Color.Background | LabelPre4.Background = Color.Background | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| SysLogWrite("Pre_Pauza") | SysLogWrite("Pre_Pauza") | ||||||
| 
 | 
 | ||||||
| TxtPreTmrPauza.Background = Color.Green | TxtPreTmrPauza.Background = Color.Green | ||||||
|  | @ -726,8 +848,110 @@ Message("TEST") | ||||||
| END SELECT | END SELECT | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| PUBLIC SUB Button1_Click() | PUBLIC SUB BtnReset_Click() | ||||||
| 
 | 
 | ||||||
|   Form1.Visible = TRUE |   IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_RESET") | ||||||
|  |       WRITE #SerialPort1, "S0" | ||||||
|  |       WRITE #SerialPort1, "s0" | ||||||
|  |       WRITE #SerialPort1, "d" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF  | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnOpenDor_Click() | ||||||
|  | 
 | ||||||
|  |   IF SerialPort1.Status = 1 THEN | ||||||
|  |         SysLogWrite("BOX_OPEN") | ||||||
|  |         WRITE #SerialPort1, "D" | ||||||
|  |       ELSE  | ||||||
|  |         SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |       ENDIF  | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnCloseDor_Click() | ||||||
|  | 
 | ||||||
|  |   IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_CLOSE") | ||||||
|  |       WRITE #SerialPort1, "d" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF  | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS6_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT6") | ||||||
|  |       WRITE #SerialPort1, "S3" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT1") | ||||||
|  |       WRITE #SerialPort1, "s1" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF  | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS2_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT2") | ||||||
|  |       WRITE #SerialPort1, "s2" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS3_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT3") | ||||||
|  |       WRITE #SerialPort1, "s3" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS4_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT4") | ||||||
|  |       WRITE #SerialPort1, "S1" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB BtnPitS5_Click() | ||||||
|  | 
 | ||||||
|  |    IF SerialPort1.status = 1 THEN  | ||||||
|  |       SysLogWrite("BOX_SLOT5") | ||||||
|  |       WRITE #SerialPort1, "S2" | ||||||
|  |     ELSE  | ||||||
|  |       SysLogWrite("Experiment_SYSTEM_BOX_CHYBA") | ||||||
|  |     ENDIF | ||||||
|  | 
 | ||||||
|  | END | ||||||
|  | 
 | ||||||
|  | PUBLIC SUB PreBtnNastavTimeout_Click() | ||||||
|  | SysLogWrite("Pre_Nastavuji_Timeout: " & Val(TxtPreTimeout.Text)) | ||||||
|  |   PreTimeout = Val(TxtPreTimeout.Text) | ||||||
| 
 | 
 | ||||||
| END | END | ||||||
|  |  | ||||||
							
								
								
									
										168
									
								
								FMain.form
									
										
									
									
									
								
							
							
						
						
									
										168
									
								
								FMain.form
									
										
									
									
									
								
							|  | @ -16,13 +16,13 @@ | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { TimerSystime #Timer |   { TimerSystime #Timer | ||||||
|     #X = 973 |     #X = 427 | ||||||
|     #Y = 7 |     #Y = 231 | ||||||
|     Enabled = True |     Enabled = True | ||||||
|     Delay = 100 |     Delay = 100 | ||||||
|   } |   } | ||||||
|   { TxtSysLog TextArea |   { TxtSysLog TextArea | ||||||
|     Move(714,49,518,301) |     Move(889,49,343,301) | ||||||
|     Text = ("") |     Text = ("") | ||||||
|     ReadOnly = True |     ReadOnly = True | ||||||
|     Wrap = True |     Wrap = True | ||||||
|  | @ -88,12 +88,12 @@ | ||||||
|     Text = ("sec") |     Text = ("sec") | ||||||
|   } |   } | ||||||
|   { TxtPreTmrPauza TextBox |   { TxtPreTmrPauza TextBox | ||||||
|     Move(301,294,70,28) |     Move(301,294,70,21) | ||||||
|     Text = ("10") |     Text = ("10") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { BtnPreNastavCasPauza Button |   { BtnPreNastavCasPauza Button | ||||||
|     Move(301,329,70,7) |     Move(301,322,70,7) | ||||||
|     Text = ("NASTAV") |     Text = ("NASTAV") | ||||||
|   } |   } | ||||||
|   { LabelPreFrm5 Label |   { LabelPreFrm5 Label | ||||||
|  | @ -101,11 +101,6 @@ | ||||||
|     Text = ("<--------------------\n") |     Text = ("<--------------------\n") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePP CheckBox |  | ||||||
|     Move(315,63,105,42) |  | ||||||
|     ToolTip = ("Vypropaguje nastaveni pitek do ciklu") |  | ||||||
|     Text = ("NASTAVENI\nPITEK") |  | ||||||
|   } |  | ||||||
|   { LabelPreFrm1 Label |   { LabelPreFrm1 Label | ||||||
|     Move(98,175,70,14) |     Move(98,175,70,14) | ||||||
|     Text = ("------------>") |     Text = ("------------>") | ||||||
|  | @ -139,44 +134,44 @@ | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { LabelPreFrm8 Label |   { LabelPreFrm8 Label | ||||||
|     Move(350,105,28,42) |     Move(350,91,28,56) | ||||||
|     Text = (" |\n |\n") |     Text = (" |\n |\n |") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE CheckBox |   { CheckBoxPrePE CheckBox | ||||||
|     Move(21,56,42,21) |     Move(21,63,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P1") |     Text = ("S1") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE2 CheckBox |   { CheckBoxPrePE2 CheckBox | ||||||
|     Move(21,84,42,21) |     Move(21,91,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P2") |     Text = ("S2") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE3 CheckBox |   { CheckBoxPrePE3 CheckBox | ||||||
|     Move(21,112,42,21) |     Move(21,119,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P3") |     Text = ("S3") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE4 CheckBox |   { CheckBoxPrePE4 CheckBox | ||||||
|     Move(77,56,42,21) |     Move(77,63,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P4") |     Text = ("S4") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE5 CheckBox |   { CheckBoxPrePE5 CheckBox | ||||||
|     Move(77,84,42,21) |     Move(77,91,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P5") |     Text = ("S5") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePE6 CheckBox |   { CheckBoxPrePE6 CheckBox | ||||||
|     Move(77,112,42,21) |     Move(77,119,42,21) | ||||||
|     ToolTip = ("Povoli pouziti pitka") |     ToolTip = ("Povoli pouziti pitka") | ||||||
|     Text = ("P6") |     Text = ("S6") | ||||||
|   } |   } | ||||||
|   { CheckBoxPrePP2 CheckBox |   { CheckBoxPrePP2 CheckBox | ||||||
|     Move(154,63,119,28) |     Move(154,63,119,28) | ||||||
|     ToolTip = ("Zakaze opakovani stejnych pitek 2x po sobe") |     ToolTip = ("Zakaze opakovani stejnych pitek 2x po sobe") | ||||||
|     Text = ("NEPOAKOVAT") |     Text = ("NEOPAKOVAT") | ||||||
|   } |   } | ||||||
|   { LabelPreFrm9 Label |   { LabelPreFrm9 Label | ||||||
|     Move(119,70,35,14) |     Move(119,70,35,14) | ||||||
|  | @ -184,66 +179,62 @@ | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { LabelPreFrm10 Label |   { LabelPreFrm10 Label | ||||||
|     Move(280,70,35,14) |     Move(280,70,91,14) | ||||||
|     Text = ("---") |     Text = ("---------------------") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { BtnPreStart Button |   { BtnPreStart Button | ||||||
|     Move(560,70,84,28) |     Move(812,266,63,28) | ||||||
|     Text = ("START") |     Text = ("START") | ||||||
|   } |   } | ||||||
|   { BtnPreStop Button |   { BtnPreStop Button | ||||||
|     Move(560,105,84,28) |     Move(812,301,63,28) | ||||||
|     Text = ("STOP") |     Text = ("STOP") | ||||||
|   } |   } | ||||||
|   { BtnSZ Button |   { BtnSZ Button | ||||||
|     Move(147,224,35,21) |     Move(168,217,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z1") |     Text = ("S1") | ||||||
|   } |   } | ||||||
|   { BtnSZ2 Button |   { BtnSZ2 Button | ||||||
|     Move(189,224,35,21) |     Move(168,245,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z2") |     Text = ("S2") | ||||||
|   } |   } | ||||||
|   { BtnSZ3 Button |   { BtnSZ3 Button | ||||||
|     Move(231,224,35,21) |     Move(168,273,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z3") |     Text = ("S3") | ||||||
|   } |   } | ||||||
|   { BtnSZ4 Button |   { BtnSZ4 Button | ||||||
|     Move(147,252,35,21) |     Move(210,217,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z4") |     Text = ("S4") | ||||||
|   } |   } | ||||||
|   { BtnSZ5 Button |   { BtnSZ5 Button | ||||||
|     Move(189,252,35,21) |     Move(210,245,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z5") |     Text = ("S5") | ||||||
|   } |   } | ||||||
|   { BtnSZ6 Button |   { BtnSZ6 Button | ||||||
|     Move(231,252,35,21) |     Move(210,273,35,21) | ||||||
|     ToolTip = ("Simuluje zacumakovani potkana") |     ToolTip = ("Simuluje zacumakovani potkana") | ||||||
|     Text = ("Z6") |     Text = ("S6") | ||||||
|   } |   } | ||||||
|   { TxtPrePocetCiklu TextBox |   { TxtPrePocetCiklu TextBox | ||||||
|     Move(462,84,84,21) |     Move(714,280,84,21) | ||||||
|     Text = ("10") |     Text = ("10") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { BtnPrePocetCikluNastav Button |   { BtnPrePocetCikluNastav Button | ||||||
|     Move(462,112,84,21) |     Move(714,308,84,21) | ||||||
|     Text = ("NASTAV") |     Text = ("NASTAV") | ||||||
|   } |   } | ||||||
|   { Label5 Label |   { Label5 Label | ||||||
|     Move(462,63,84,14) |     Move(714,259,84,14) | ||||||
|     Text = ("Pocet ciklu:") |     Text = ("Pocet cyklu:") | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { BtnPreNastavNastaveniPitek Button |  | ||||||
|     Move(133,105,210,21) |  | ||||||
|     Text = ("NASTAV NASTAVENI PITEK") |  | ||||||
|   } |  | ||||||
|   { TxtPreWDTTmr TextBox |   { TxtPreWDTTmr TextBox | ||||||
|     Move(399,7,70,21) |     Move(399,7,70,21) | ||||||
|     Text = ("0") |     Text = ("0") | ||||||
|  | @ -502,8 +493,8 @@ | ||||||
|     Alignment = Align.Center |     Alignment = Align.Center | ||||||
|   } |   } | ||||||
|   { ExpTmrTimeout #Timer |   { ExpTmrTimeout #Timer | ||||||
|     #X = 924 |     #X = 378 | ||||||
|     #Y = 7 |     #Y = 231 | ||||||
|   } |   } | ||||||
|   { TxtTimeout TextBox |   { TxtTimeout TextBox | ||||||
|     Move(553,7,70,21) |     Move(553,7,70,21) | ||||||
|  | @ -523,15 +514,15 @@ | ||||||
|     Text = ("Pripoj BOX") |     Text = ("Pripoj BOX") | ||||||
|   } |   } | ||||||
|   { SerialPort1 #SerialPort |   { SerialPort1 #SerialPort | ||||||
|     #X = 875 |     #X = 329 | ||||||
|     #Y = 7 |     #Y = 231 | ||||||
|   } |   } | ||||||
|   { Separator1 Separator |   { Separator1 Separator | ||||||
|     Move(14,35,1218,7) |     Move(14,35,1218,7) | ||||||
|     Foreground = &H000000& |     Foreground = &H000000& | ||||||
|   } |   } | ||||||
|   { Separator2 Separator |   { Separator2 Separator | ||||||
|     Move(14,357,1218,21) |     Move(7,357,1218,21) | ||||||
|   } |   } | ||||||
|   { Separator3 Separator |   { Separator3 Separator | ||||||
|     Move(700,49,7,301) |     Move(700,49,7,301) | ||||||
|  | @ -667,8 +658,71 @@ | ||||||
|     Move(119,406,119,21) |     Move(119,406,119,21) | ||||||
|     Text = ("NEOPAKOVAT") |     Text = ("NEOPAKOVAT") | ||||||
|   } |   } | ||||||
|   { Button1 Button |   { BtnOpenDor Button | ||||||
|     Move(721,385,119,28) |     Move(735,98,35,21) | ||||||
|     Text = ("Button1") |     Text = ("OD") | ||||||
|  |   } | ||||||
|  |   { BtnCloseDor Button | ||||||
|  |     Move(777,98,35,21) | ||||||
|  |     Text = ("CD") | ||||||
|  |   } | ||||||
|  |   { BtnReset Button | ||||||
|  |     Move(819,98,35,21) | ||||||
|  |     Text = ("RB") | ||||||
|  |   } | ||||||
|  |   { BtnPitS Button | ||||||
|  |     Move(756,133,35,21) | ||||||
|  |     Text = ("S1") | ||||||
|  |   } | ||||||
|  |   { BtnPitS2 Button | ||||||
|  |     Move(756,161,35,21) | ||||||
|  |     Text = ("S2") | ||||||
|  |   } | ||||||
|  |   { BtnPitS3 Button | ||||||
|  |     Move(756,189,35,21) | ||||||
|  |     Text = ("S3") | ||||||
|  |   } | ||||||
|  |   { BtnPitS4 Button | ||||||
|  |     Move(805,133,35,21) | ||||||
|  |     Text = ("S4") | ||||||
|  |   } | ||||||
|  |   { BtnPitS5 Button | ||||||
|  |     Move(805,161,35,21) | ||||||
|  |     Text = ("S5") | ||||||
|  |   } | ||||||
|  |   { BtnPitS6 Button | ||||||
|  |     Move(805,189,35,21) | ||||||
|  |     Text = ("S6") | ||||||
|  |   } | ||||||
|  |   { Label32 Label | ||||||
|  |     Move(728,49,140,42) | ||||||
|  |     Text = ("Manu\xC3\xA1ln\xC3\xAD ovl\xC3\xA1d\xC3\xA1n\xC3\xAD\naparatury") | ||||||
|  |     Alignment = Align.Center | ||||||
|  |   } | ||||||
|  |   { Separator4 Separator | ||||||
|  |     Move(714,231,175,7) | ||||||
|  |   } | ||||||
|  |   { TxtPreTimeout TextBox | ||||||
|  |     Move(553,84,70,28) | ||||||
|  |     Text = ("30") | ||||||
|  |     Alignment = Align.Center | ||||||
|  |   } | ||||||
|  |   { Label33 Label | ||||||
|  |     Move(637,84,28,28) | ||||||
|  |     Text = ("sec") | ||||||
|  |     Alignment = Align.Center | ||||||
|  |   } | ||||||
|  |   { PreBtnNastavTimeout Button | ||||||
|  |     Move(553,119,70,21) | ||||||
|  |     Text = ("NASTAV") | ||||||
|  |   } | ||||||
|  |   { PreChkTimeout CheckBox | ||||||
|  |     Move(553,56,126,14) | ||||||
|  |     Text = ("CAS NA REAKCI") | ||||||
|  |     Value = CheckBox.True | ||||||
|  |   } | ||||||
|  |   { Label34 Label | ||||||
|  |     Move(21,42,98,21) | ||||||
|  |     Text = ("Vypnuti slotu:") | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tomas Suchan
						Tomas Suchan