BASIC4PPC  COMPILER
PROGRAM  EXAMPLE:


AUTOMATIC  SEQUENCE
This program example will
let you define 16 custom
ASCII character commands.
You can select one or more
commands and automatically
sequence through them with
a specific time delay between
each command byte in a packet and a specific delay between packet transmissions.  The sequence will automatically repeat until it is stopped.
BASIC4PPC Program Code Listing: No Comments
Sub Globals
portflag = 0
strlabel0="  COM 8: 9600,N,8,1"
strlabel1=" [OFF]"
strlabel2=" [ ON]"
strlabel3=" : "
strlabeltemp=""

Sip_Flag=0
Scan_Flag=0
Cycle_Flag=0
Box_Count=0
Box_Count_Temp=0
PacketDelay=0

check1=false
check2=false
check3=false
check4=false
check5=false
check6=false
check7=false
check8=false
check9=false
check10=false
check11=false
check12=false
check13=false
check14=false
check15=false
check16=false

R1_C1_Flag=0
R1_C2_Flag=0
R1_C3_Flag=0
R1_C4_Flag=0

R2_C1_Flag=0
R2_C2_Flag=0
R2_C3_Flag=0
R2_C4_Flag=0

R3_C1_Flag=0
R3_C2_Flag=0
R3_C3_Flag=0
R3_C4_Flag=0

R4_C1_Flag=0
R4_C2_Flag=0
R4_C3_Flag=0
R4_C4_Flag=0

R1_C1_Label=""
R1_C2_Label=""
R1_C3_Label=""
R1_C4_Label=""

R2_C1_Label=""
R2_C2_Label=""
R2_C3_Label=""
R2_C4_Label=""

R3_C1_Label=""
R3_C2_Label=""
R3_C3_Label=""
R3_C4_Label=""

R4_C1_Label=""
R4_C2_Label=""
R4_C3_Label=""
R4_C4_Label=""

R1_C1_Value=""
R1_C2_Value=""
R1_C3_Value=""
R1_C4_Value=""

R2_C1_Value=""
R2_C2_Value=""
R2_C3_Value=""
R2_C4_Value=""

R3_C1_Value=""
R3_C2_Value=""
R3_C3_Value=""
R3_C4_Value=""

R4_C1_Value=""
R4_C2_Value=""
R4_C3_Value=""
R4_C4_Value=""

timer_value=0

End Sub

Sub App_Start

Form1.show
TextBox1.Text=""
TextBox2.Text=""
label1.Text = strlabel0 & strlabel1 & strlabel3
strlabeltemp  = strlabel0 & strlabel1 & strlabel3
Image18.Image="r28w35.jpg"
Image20.Image="r28w35.jpg"
Sip(false)   
serial.New2 (8,9600,"N",8,1)
Num1_ValueChanged
Num2_ValueChanged
End Sub

Sub Clear_Flags

R1_C1_Flag=0
R1_C2_Flag=0
R1_C3_Flag=0
R1_C4_Flag=0

R2_C1_Flag=0
R2_C2_Flag=0
R2_C3_Flag=0
R2_C4_Flag=0

R3_C1_Flag=0
R3_C2_Flag=0
R3_C3_Flag=0
R3_C4_Flag=0

R4_C1_Flag=0
R4_C2_Flag=0
R4_C3_Flag=0
R4_C4_Flag=0

End Sub

Sub ImageButtonEnter_Click
If R1_C1_Flag=1 Then
R1_C1_Label=textbox1.text
R1_C1_Value=textbox2.text
End If

If R1_C2_Flag=1 Then
R1_C2_Label=textbox1.text
R1_C2_Value=textbox2.text
End If

If R1_C3_Flag=1 Then
R1_C3_Label=textbox1.text
R1_C3_Value=textbox2.text
End If

If R1_C4_Flag=1 Then
R1_C4_Label=textbox1.text
R1_C4_Value=textbox2.text
End If

If R2_C1_Flag=1 Then
R2_C1_Label=textbox1.text
R2_C1_Value=textbox2.text
End If

If R2_C2_Flag=1 Then
R2_C2_Label=textbox1.text
R2_C2_Value=textbox2.text
End If

If R2_C3_Flag=1 Then
R2_C3_Label=textbox1.text
R2_C3_Value=textbox2.text
End If

If R2_C4_Flag=1 Then
R2_C4_Label=textbox1.text
R2_C4_Value=textbox2.text
End If

If R3_C1_Flag=1 Then
R3_C1_Label=textbox1.text
R3_C1_Value=textbox2.text
End If

If R3_C2_Flag=1 Then
R3_C2_Label=textbox1.text
R3_C2_Value=textbox2.text
End If

If R3_C3_Flag=1 Then
R3_C3_Label=textbox1.text
R3_C3_Value=textbox2.text
End If

If R3_C4_Flag=1 Then
R3_C4_Label=textbox1.text
R3_C4_Value=textbox2.text
End If

If R4_C1_Flag=1 Then
R4_C1_Label=textbox1.text
R4_C1_Value=textbox2.text
End If

If R4_C2_Flag=1 Then
R4_C2_Label=textbox1.text
R4_C2_Value=textbox2.text
End If

If R4_C3_Flag=1 Then
R4_C3_Label=textbox1.text
R4_C3_Value=textbox2.text
End If

If R4_C4_Flag=1 Then
R4_C4_Label=textbox1.text
R4_C4_Value=textbox2.text
End If
End Sub

Sub ImageButtonClear_Click
textbox1.text=""
textbox2.text=""
textbox3.text=""
textbox4.text=""
Clear_Checkboxes
End Sub

Sub Clear_Checkboxes
Checkbox1.Checked=False
Checkbox2.Checked=False
Checkbox3.Checked=False
Checkbox4.Checked=False
Checkbox5.Checked=False
Checkbox6.Checked=False
Checkbox7.Checked=False
Checkbox8.Checked=False
Checkbox9.Checked=False
Checkbox10.Checked=False
Checkbox11.Checked=False
Checkbox12.Checked=False
Checkbox13.Checked=False
Checkbox14.Checked=False
Checkbox15.Checked=False
Checkbox16.Checked=False
End Sub

Sub ImageButtonReadFile_Click

FileOpen (c1,"SeqData.txt",cRead,,cASCII)

R1_C1_Label=FileRead(c1)
R1_C2_Label=FileRead(c1)
R1_C3_Label=FileRead(c1)
R1_C4_Label=FileRead(c1)

R2_C1_Label=FileRead(c1)
R2_C2_Label=FileRead(c1)
R2_C3_Label=FileRead(c1)
R2_C4_Label=FileRead(c1)

R3_C1_Label=FileRead(c1)
R3_C2_Label=FileRead(c1)
R3_C3_Label=FileRead(c1)
R3_C4_Label=FileRead(c1)

R4_C1_Label=FileRead(c1)
R4_C2_Label=FileRead(c1)
R4_C3_Label=FileRead(c1)
R4_C4_Label=FileRead(c1)

R1_C1_Value=FileRead(c1)
R1_C2_Value=FileRead(c1)
R1_C3_Value=FileRead(c1)
R1_C4_Value=FileRead(c1)

R2_C1_Value=FileRead(c1)
R2_C2_Value=FileRead(c1)
R2_C3_Value=FileRead(c1)
R2_C4_Value=FileRead(c1)

R3_C1_Value=FileRead(c1)
R3_C2_Value=FileRead(c1)
R3_C3_Value=FileRead(c1)
R3_C4_Value=FileRead(c1)

R4_C1_Value=FileRead(c1)
R4_C2_Value=FileRead(c1)
R4_C3_Value=FileRead(c1)
R4_C4_Value=FileRead(c1)

FileClose (c1)

End Sub

Sub ImageButtonSaveFile_Click

FileOpen (c1,"SeqData.txt",cWrite,,cASCII)

FileWrite (c1,R1_C1_Label)
FileWrite (c1,R1_C2_Label)
FileWrite (c1,R1_C3_Label)
FileWrite (c1,R1_C4_Label)

FileWrite (c1,R2_C1_Label)
FileWrite (c1,R2_C2_Label)
FileWrite (c1,R2_C3_Label)
FileWrite (c1,R2_C4_Label)

FileWrite (c1,R3_C1_Label)
FileWrite (c1,R3_C2_Label)
FileWrite (c1,R3_C3_Label)
FileWrite (c1,R3_C4_Label)

FileWrite (c1,R4_C1_Label)
FileWrite (c1,R4_C2_Label)
FileWrite (c1,R4_C3_Label)
FileWrite (c1,R4_C4_Label)

FileWrite (c1,R1_C1_Value)
FileWrite (c1,R1_C2_Value)
FileWrite (c1,R1_C3_Value)
FileWrite (c1,R1_C4_Value)

FileWrite (c1,R2_C1_Value)
FileWrite (c1,R2_C2_Value)
FileWrite (c1,R2_C3_Value)
FileWrite (c1,R2_C4_Value)

FileWrite (c1,R3_C1_Value)
FileWrite (c1,R3_C2_Value)
FileWrite (c1,R3_C3_Value)
FileWrite (c1,R3_C4_Value)

FileWrite (c1,R4_C1_Value)
FileWrite (c1,R4_C2_Value)
FileWrite (c1,R4_C3_Value)
FileWrite (c1,R4_C4_Value)

FileClose (c1)
End Sub

Sub ImageButtonEnter_ButtonDown
ImageButtonEnter.Image="r60w35.jpg"
End Sub

Sub ImageButtonEnter_ButtonUp
ImageButtonEnter.Image="g60w35.jpg"
End Sub

Sub ImageButtonReadFile_ButtonDown
ImageButtonReadFile.Image="g90w35.jpg"
End Sub

Sub ImageButtonReadFile_ButtonUp
ImageButtonReadFile.Image="r90w35.jpg"
End Sub

Sub ImageButtonSaveFile_ButtonDown
ImageButtonSaveFile.Image="g90w35.jpg"
End Sub

Sub ImageButtonSaveFile_ButtonUp
ImageButtonSaveFile.Image="r90w35.jpg"
End Sub

Sub ImageButtonClear_ButtonDown
ImageButtonClear.Image="g70w35.jpg"
End Sub

Sub ImageButtonClear_ButtonUp
ImageButtonClear.Image="b70w35.jpg"
End Sub

Sub ImageButtonStartSeq_Click
Scan_Flag=1
check1=checkbox1.checked
check2=checkbox2.checked
check3=checkbox3.checked
check4=checkbox4.checked
check5=checkbox5.checked
check6=checkbox6.checked
check7=checkbox7.checked
check8=checkbox8.checked
check9=checkbox9.checked
check10=checkbox10.checked
check11=checkbox11.checked
check12=checkbox12.checked
check13=checkbox13.checked
check14=checkbox14.checked
check15=checkbox15.checked
check16=checkbox16.checked

If Checkbox1.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox2.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox3.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox4.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox5.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox6.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox7.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox8.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox9.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox10.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox11.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox12.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox13.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox14.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox15.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox16.Checked=True Then
Box_Count = Box_Count + 1
End If

timer1.interval=num1.value
timer1.enabled=true
End Sub

Sub ImageButtonStopSeq_Click
timer1.enabled=false
Box_Count=0
Cycle_Flag=0
Scan_Flag=0
ImageButtonClear_Click
End Sub

Sub ImageButtonStartSeq_ButtonDown
ImageButtonStartSeq.Image="r70w35.jpg"
Image17.Image="r28w35.jpg"
Image18.Image="w28w35.jpg"
End Sub

Sub ImageButtonStartSeq_ButtonUp
ImageButtonStartSeq.Image="g70w35.jpg"
End Sub

Sub ImageButtonStopSeq_ButtonDown
ImageButtonStopSeq.Image="r70w35.jpg"
Image17.Image="w28w35.jpg"
Image18.Image="r28w35.jpg"
End Sub

Sub ImageButtonStopSeq_ButtonUp
ImageButtonStopSeq.Image="g70w35.jpg"
End Sub

Sub Timer1_Tick

If Box_Count=0 Then
checkbox1.checked=check1
checkbox2.checked=check2
checkbox3.checked=check3
checkbox4.checked=check4
checkbox5.checked=check5
checkbox6.checked=check6
checkbox7.checked=check7
checkbox8.checked=check8
checkbox9.checked=check9
checkbox10.checked=check10
checkbox11.checked=check11
checkbox12.checked=check12
checkbox13.checked=check13
checkbox14.checked=check14
checkbox15.checked=check15
checkbox16.checked=check16

If Checkbox1.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox2.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox3.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox4.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox5.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox6.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox7.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox8.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox9.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox10.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox11.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox12.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox13.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox14.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox15.Checked=True Then
Box_Count = Box_Count + 1
End If

If Checkbox16.Checked=True Then
Box_Count = Box_Count + 1
End If
timer1.Enabled=false
Sleep(PacketDelay)
timer1.Enabled=true
timer1.Interval=num1.Value
End If

If Checkbox1.Checked=True Then
checkbox1.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R1_C1_Label
Textbox2.Text=R1_C1_Value
Textbox3.Text=R1_C1_Value
label1.Text = strlabeltemp & R1_C1_Value
serial.Output (R1_C1_Value)
Goto time_end
End If

If Checkbox2.Checked=True Then
checkbox2.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R1_C2_Label
Textbox2.Text=R1_C2_Value
Textbox3.Text=R1_C2_Value
label1.Text = strlabeltemp & R1_C2_Value
serial.Output (R1_C2_Value)
Goto time_end
End If

If Checkbox3.Checked=True Then
checkbox3.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R1_C3_Label
Textbox2.Text=R1_C3_Value
Textbox3.Text=R1_C3_Value
label1.Text = strlabeltemp & R1_C3_Value
serial.Output (R1_C3_Value)
Goto time_end
End If

If Checkbox4.Checked=True Then
checkbox4.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R1_C4_Label
Textbox2.Text=R1_C4_Value
Textbox3.Text=R1_C4_Value
label1.Text = strlabeltemp & R1_C4_Value
serial.Output (R1_C4_Value)
Goto time_end
End If

If Checkbox5.Checked=True Then
checkbox5.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R2_C1_Label
Textbox2.Text=R2_C1_Value
Textbox3.Text=R2_C1_Value
label1.Text = strlabeltemp & R2_C1_Value
serial.Output (R2_C1_Value)
Goto time_end
End If

If Checkbox6.Checked=True Then
checkbox6.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R2_C2_Label
Textbox2.Text=R2_C2_Value
Textbox3.Text=R2_C2_Value
label1.Text = strlabeltemp & R2_C2_Value
serial.Output (R2_C2_Value)
Goto time_end
End If

If Checkbox7.Checked=True Then
checkbox7.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R2_C3_Label
Textbox2.Text=R2_C3_Value
Textbox3.Text=R2_C3_Value
label1.Text = strlabeltemp & R2_C3_Value
serial.Output (R2_C3_Value)
Goto time_end
End If

If Checkbox8.Checked=True Then
checkbox8.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R2_C4_Label
Textbox2.Text=R2_C4_Value
Textbox3.Text=R2_C4_Value
label1.Text = strlabeltemp & R2_C4_Value
serial.Output (R2_C4_Value)
Goto time_end
End If

If Checkbox9.Checked=True Then
checkbox9.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R3_C1_Label
Textbox2.Text=R3_C1_Value
Textbox3.Text=R3_C1_Value
label1.Text = strlabeltemp & R3_C1_Value
serial.Output (R3_C1_Value)
Goto time_end
End If

If Checkbox10.Checked=True Then
checkbox10.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R3_C2_Label
Textbox2.Text=R3_C2_Value
Textbox3.Text=R3_C2_Value
label1.Text = strlabeltemp & R3_C2_Value
serial.Output (R3_C2_Value)
Goto time_end
End If

If Checkbox11.Checked=True Then
checkbox11.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R3_C3_Label
Textbox2.Text=R3_C3_Value
Textbox3.Text=R3_C3_Value
label1.Text = strlabeltemp & R3_C3_Value
serial.Output (R3_C3_Value)
Goto time_end
End If

If Checkbox12.Checked=True Then
checkbox12.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R3_C4_Label
Textbox2.Text=R3_C4_Value
Textbox3.Text=R3_C4_Value
label1.Text = strlabeltemp & R3_C4_Value
serial.Output (R3_C4_Value)
Goto time_end
End If

If Checkbox13.Checked=True Then
checkbox13.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R4_C1_Label
Textbox2.Text=R4_C1_Value
Textbox3.Text=R4_C1_Value
label1.Text = strlabeltemp & R4_C1_Value
serial.Output (R4_C1_Value)
Goto time_end
End If

If Checkbox14.Checked=True Then
checkbox14.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R4_C2_Label
Textbox2.Text=R4_C2_Value
Textbox3.Text=R4_C2_Value
label1.Text = strlabeltemp & R4_C2_Value
serial.Output (R4_C2_Value)
Goto time_end
End If

If Checkbox15.Checked=True Then
checkbox15.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R4_C3_Label
Textbox2.Text=R4_C3_Value
Textbox3.Text=R4_C3_Value
label1.Text = strlabeltemp & R4_C3_Value
serial.Output (R4_C3_Value)
Goto time_end
End If

If Checkbox16.Checked=True Then
checkbox16.checked=false
Box_Count = Box_Count - 1
Textbox1.Text=R4_C4_Label
Textbox2.Text=R4_C4_Value
Textbox3.Text=R4_C4_Value
label1.Text = strlabeltemp & R4_C4_Value
serial.Output (R4_C4_Value)
Goto time_end
End If

time_end:

Cycle_Flag=Cycle_Flag + 1

If Cycle_Flag=2 Then
Cycle_Flag=0
End If

End Sub

Sub ImageButtonSIP_ButtonDown
ImageButtonSip.Image="g90w35.jpg"
End Sub

Sub ImageButtonSIP_ButtonUp
ImageButtonSip.Image="y90w35.jpg"
End Sub

Sub ImageButtonSIP_Click
Sip_Flag=Sip_Flag + 1
If Sip_Flag=2 Then
Sip_Flag=0
End If
If Sip_Flag=0 Then
Sip(False)
End If
If Sip_Flag=1 Then
Sip(True)
End If
End Sub

Sub ImageButtonOPENPORT_ButtonDown
Image19.Image="r28w35.jpg"
Image20.Image="w28w35.jpg"
End Sub

Sub ImageButtonCLOSEPORT_ButtonDown
Image19.Image="w28w35.jpg"
Image20.Image="r28w35.jpg"
End Sub

Sub ImageButtonOPENPORT_Click
If portflag = 0 Then
serial.PortOpen=true
portflag = 1
label1.Text = strlabel0 & strlabel2 & strlabel3
strlabeltemp=label1.Text

serial.enableoncomm=true
serial.Output ("*")
End If
End Sub

Sub ImageButtonCLOSEPORT_Click
If portflag = 1 Then
TextBox1.Text=""
TextBox2.Text=""
serial.Output ("^")
serial.enableoncomm=false
serial.PortOpen=false
portflag = 0
label1.Text = strlabel0 & strlabel1 & strlabel3
strlabeltemp=label1.Text
End If
End Sub

Sub serial_OnCom
TextBox4.Text=TextBox4.Text & serial.Inputstring
End Sub

Sub ImageButtonVIEW_Click
Label101.Text=R1_C1_Label
Label102.Text=R1_C2_Label
Label103.Text=R1_C3_Label
Label104.Text=R1_C4_Label
Label105.Text=R2_C1_Label
Label106.Text=R2_C2_Label
Label107.Text=R2_C3_Label
Label108.Text=R2_C4_Label
Label109.Text=R3_C1_Label
Label110.Text=R3_C2_Label
Label111.Text=R3_C3_Label
Label112.Text=R3_C4_Label
Label113.Text=R4_C1_Label
Label114.Text=R4_C2_Label
Label115.Text=R4_C3_Label
Label116.Text=R4_C4_Label

Label201.Text=R1_C1_Value
Label202.Text=R1_C2_Value
Label203.Text=R1_C3_Value
Label204.Text=R1_C4_Value
Label205.Text=R2_C1_Value
Label206.Text=R2_C2_Value
Label207.Text=R2_C3_Value
Label208.Text=R2_C4_Value
Label209.Text=R3_C1_Value
Label210.Text=R3_C2_Value
Label211.Text=R3_C3_Value
Label212.Text=R3_C4_Value
Label213.Text=R4_C1_Value
Label214.Text=R4_C2_Value
Label215.Text=R4_C3_Value
Label216.Text=R4_C4_Value

Form2.Show
End Sub

Sub ImageButtonEXIT_Click
Form2.Close
End Sub

Sub ImageButtonVIEW_ButtonDown
ImageButtonVIEW.Image="g90w35.jpg"
End Sub

Sub ImageButtonVIEW_ButtonUp
ImageButtonVIEW.Image="b90w35.jpg"
End Sub

Sub ImageButtonEXIT_ButtonDown
ImageButtonEXIT.Image="r150w35.jpg"
End Sub

Sub ImageButtonEXIT_ButtonUp
ImageButtonEXIT.Image="g150w35.jpg"
End Sub

Sub ImageButtonSet_Click
PacketDelay=num2.Value
PacketDelay=PacketDelay*1000
End Sub

Sub Num2_ValueChanged
PacketDelay=num2.Value
PacketDelay=PacketDelay*1000
End Sub

Sub CheckBox1_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R1_C1_Flag=1
textbox1.text=R1_C1_Label
textbox2.text=R1_C1_Value
End Sub

Sub CheckBox2_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R1_C2_Flag=1
textbox1.text=R1_C2_Label
textbox2.text=R1_C2_Value
End Sub

Sub CheckBox3_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R1_C3_Flag=1
textbox1.text=R1_C3_Label
textbox2.text=R1_C3_Value
End Sub

Sub CheckBox4_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R1_C4_Flag=1
textbox1.text=R1_C4_Label
textbox2.text=R1_C4_Value
End Sub

Sub CheckBox5_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R2_C1_Flag=1
textbox1.text=R2_C1_Label
textbox2.text=R2_C1_Value
End Sub

Sub CheckBox6_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R2_C2_Flag=1
textbox1.text=R2_C2_Label
textbox2.text=R2_C2_Value
End Sub

Sub CheckBox7_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R2_C3_Flag=1
textbox1.text=R2_C3_Label
textbox2.text=R2_C3_Value
End Sub

Sub CheckBox8_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R2_C4_Flag=1
textbox1.text=R2_C4_Label
textbox2.text=R2_C4_Value
End Sub

Sub CheckBox9_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R3_C1_Flag=1
textbox1.text=R3_C1_Label
textbox2.text=R3_C1_Value
End Sub

Sub CheckBox10_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R3_C2_Flag=1
textbox1.text=R3_C2_Label
textbox2.text=R3_C2_Value
End Sub

Sub CheckBox11_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R3_C3_Flag=1
textbox1.text=R3_C3_Label
textbox2.text=R3_C3_Value
End Sub

Sub CheckBox12_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R3_C4_Flag=1
textbox1.text=R3_C4_Label
textbox2.text=R3_C4_Value
End Sub

Sub CheckBox13_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R4_C1_Flag=1
textbox1.text=R4_C1_Label
textbox2.text=R4_C1_Value
End Sub

Sub CheckBox14_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R4_C2_Flag=1
textbox1.text=R4_C2_Label
textbox2.text=R4_C2_Value
End Sub

Sub CheckBox15_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R4_C3_Flag=1
textbox1.text=R4_C3_Label
textbox2.text=R4_C3_Value
End Sub

Sub CheckBox16_Click
If Scan_Flag = 0 Then
Clear_Flags
End If
Sound("beep.wav")
R4_C4_Flag=1
textbox1.text=R4_C4_Label
textbox2.text=R4_C4_Value
End Sub

Sub Num1_ValueChanged
timer1.Interval=num1.Value
End Sub