⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formsin.frm

📁 访真了高频系统的调制解调
💻 FRM
📖 第 1 页 / 共 5 页
字号:
End If

If TempY2 > 0 And Sinda2 < 0 Then
j2 = 1
TempY2 = 0

 TempB2 = A_aud2 * Sin(2.37999443453772E-08 * F_aud2 * (i + 0.000001 * P_aud2 * F2 * 2640))
  If TempB2 > Alim Then
    TempB2 = Alim
    End If
        If TempB2 < Alim * (-1) Then
     TempB2 = Alim * (-1)
     End If
     
   TempBre2 = TempB2 + A_aud * Sin(2.37999443453772E-08 * F_aud * (i + 0.000001 * P_aud2 * F2 * 2640))

Else
j2 = j2 + 1
End If

If TempY3 > 0 And Sinda3 < 0 Then
j3 = 1
TempY3 = 0

 TempB3 = A_aud3 * Sin(2.37999443453772E-08 * F_aud3 * (i + 0.000001 * P_aud3 * F3 * 2640))
        If TempB3 > Alim Then
        TempB3 = Alim
        End If
        If TempB3 < Alim * (-1) Then
        TempB3 = Alim * (-1)
        End If
     
  TempBre3 = TempB3 + A_aud * Sin(2.37999443453772E-08 * F_aud * (i + 0.000001 * P_aud3 * F3 * 2640))
     
Else
j3 = j3 + 1
End If
TempY = TempY1 + TempY2 + TempY3
Sinda1 = TempY1
Sinda2 = TempY2
Sinda3 = TempY3

'Print #1, Str(i) & "    " & Str(TempY) & "   " & Str(DemoY)
Select Case DemoInd                     ' 解调部分
Case 0
k1 = 0
k2 = 0
Demo1 = 0
Demo2 = 0
DemoMax = 0
If i Mod 12000 = 0 Then
DemoInd = 1
Else
DemoInd = 0
End If

Case 1
Demo1 = Demo2
Demo2 = TempY
If Demo2 > 0 And Demo1 < 0 Then
k1 = i Mod 12000
DemoInd = 2
End If
If Demo2 < 0 And Demo1 > 0 Then
DemoInd = 3
k1 = i Mod 12000
End If

Case 2
Demo1 = Demo2
Demo2 = TempY
If TempY > DemoMax Then
DemoMax = TempY
End If
If Demo2 >= 0 And Demo1 < 0 Then
k2 = i Mod 12000
If DemoMax < Limda Then
If Demodowith = True Then
Demodowith = False
DemoY = 2803
Else
Demodowith = True
DemoY = 2476
End If
Else
DemoY = k2 - k1
End If

If DemoY > 2840 Then
DemoY = 2840
End If

If DemoY < 2440 Then
DemoY = 2440
End If
If DemoY < 100 Then
DemoY = 2640
End If
DemoInd = 0
DemoPh = True
End If

Case 3
Demo1 = Demo2
Demo2 = TempY
If TempY > DemoMax Then
DemoMax = TempY
End If
If Demo2 < 0 And Demo1 >= 0 Then
k2 = i Mod 12000
If DemoMax < Limda Then
If Demodowith = True Then
Demodowith = False
DemoY = 2803
Else
Demodowith = True
DemoY = 2476
End If
Else
DemoY = k2 - k1
End If

If DemoY > 2840 Then
DemoY = 2840
End If

If DemoY < 2440 Then
DemoY = 2440
End If

If DemoY < 100 Then
DemoY = 2640
End If

DemoInd = 0
DemoPh = True
End If
End Select


If (i - (Sk - 1) * 528000 * Stime) Mod 53 = 0 Then

    If (i - (Sk - 1) * 528000 * Stime) = 0 Then
    x0 = 100
    y0 = 1600 - TempY * 3000 / 60
    X = x0 + (1 / Stime)
    Y = y0

      Else
    x0 = X
    y0 = Y
    X = X + (1 / Stime)
    Y = 1600 - TempY * 3000 / 60
    End If
 
  Picture1.Line (X, Y)-(x0, y0), &HFFFF00
  End If
  
  If Check1.Value = 1 Then
  If (i - (Sk - 1) * 528000 * Stime) Mod 53 = 0 Then                  '显示波形;每53个值显1个点
            If (i - (Sk - 1) * 528000 * Stime) = 0 Then
            BreX0 = 100
            BreY0 = 1400 - TempBre1 / 5.8
            BreX1 = BreX0 + (1 / Stime)
            BreY1 = BreY0
        Else
            BreX0 = BreX1
            BreY0 = BreY1
            BreX1 = BreX1 + (1 / Stime)
            BreY1 = 1400 - TempBre1 / 5.8
        End If
    Picture2.Line (BreX1, BreY1)-(BreX0, BreY0), vbRed
   End If
    
    End If


If DemoPh = True Then
'Print #1, Str(DemoY) & "    " & Str(i) & "     " & Str(TempY)
    If (i - (Sk - 1) * 528000 * Stime) < 13000 Then
    Demox0 = 100
    Demoy0 = 1400 + (DemoY - 2640) * 6.1
    Demox1 = Demox0
    Demoy1 = Demoy0
   
    Else
    Demox0 = Demox1
    Demoy0 = Demoy1
    Demox1 = Demox0 + (227.703984819734 / Stime)
    Demoy1 = 1400 + (DemoY - 2640) * 6.1
    End If
   
Picture2.Line (Demox1, Demoy1)-(Demox0, Demoy0), &HFFFF00

DemoPh = False

End If

 Next i
 

'Close #1
End Sub

Private Sub Comcount_Click()
j1 = 0
j2 = 0
j3 = 0
If Option4(0).Value = True Then
SinTime = 1
End If
If Option4(1).Value = True Then
SinTime = 10
End If
If Option4(2).Value = True Then
SinTime = 100
End If
Sink = 1
Call Demodulation(SinTime, Sink)

End Sub



Private Sub ComRight_Click()
Sink = Sink + 1
Call Demodulation(SinTime, Sink)

End Sub
Private Sub Flash1_GotFocus()
Flash1.Visible = False
Flash1.Stop
End Sub


Private Sub Form_Load()
DemoInd = 0
DemoPh = False
Sink = 1
SinA = 1
SinAgain = 1
If Option4(0).Value = True Then
SinTime = 1
End If
If Option4(1).Value = True Then
SinTime = 10
End If
If Option4(2).Value = True Then
SinTime = 100
End If
Picture4.ForeColor = vbWhite
     Picture4.FontBold = True
     Picture4.AutoRedraw = True
If Dir(App.Path + "\AIL.swf", vbNormal) <> "" Then
Flash1.Movie = App.Path & "\AIL.swf"
Else
Flash1.Visible = False
Flash1.Playing = False
End If
End Sub


Private Sub Progress(percent As Long)
Dim msg As String
     msg = percent & "%"
     With Picture4
          .Cls
          Picture4.Line (0, 0)-(percent / 100 * .ScaleWidth, .ScaleHeight), &HC0C0C0, BF
          .CurrentX = (.ScaleWidth - .TextWidth(msg)) / 2
          .CurrentY = (.ScaleHeight - .TextHeight(msg)) / 2
          Picture4.Print msg
          .Refresh
     End With
End Sub




Private Sub TextA1_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub



Private Sub TextA2_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextA3_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextAaud1_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub



Private Sub TextAaud2_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextAaud3_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextF1_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub


Private Sub TextF2_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextF3_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextFaud1_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890-" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextFaud2_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextFaud3_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextLim_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextPaud1_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextPaud2_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890-" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

Private Sub TextPaud3_KeyPress(KeyAscii As Integer)
Dim numbers$
numbers = "1234567890-" + Chr(8) + Chr(46)
    If InStr(numbers, Chr(KeyAscii)) = 0 Then
        KeyAscii = 0
    End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -