📄 q15.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "privy APP Wangx"
ClientHeight = 10080
ClientLeft = 45
ClientTop = 435
ClientWidth = 15015
Icon = "q15.frx":0000
LinkTopic = "Form1"
ScaleHeight = 11100
ScaleMode = 0 'User
ScaleWidth = 29365.38
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text6
Height = 4455
Left = 10440
MultiLine = -1 'True
TabIndex = 18
Top = 600
Width = 4335
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
TabIndex = 15
Text = "50"
Top = 2040
Width = 1095
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
TabIndex = 13
Text = "0.864"
Top = 1320
Width = 1095
End
Begin VB.TextBox Text3
Height = 4455
Left = 10440
MultiLine = -1 'True
TabIndex = 8
Top = 5400
Width = 4335
End
Begin VB.CommandButton Command2
Caption = "清零"
Height = 495
Left = 5880
TabIndex = 5
Top = 9360
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "转换"
Height = 495
Left = 3600
TabIndex = 4
Top = 9360
Width = 1575
End
Begin VB.TextBox Text2
Height = 5655
Left = 3600
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 3
Top = 3480
Width = 3855
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 3720
TabIndex = 0
Text = "100"
Top = 600
Width = 1095
End
Begin VB.Label Label14
Caption = "对应LF2407A的指令周期数:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 8400
TabIndex = 19
Top = 600
Width = 1935
End
Begin VB.Label Label13
Caption = "E-MAIL:wangxun_cz@126.com"
Height = 255
Left = 120
TabIndex = 17
Top = 9000
Width = 2295
End
Begin VB.Label Label12
Caption = "(0/N)π至(N/N)π的N点值"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 0
TabIndex = 16
Top = 4440
Width = 3375
End
Begin VB.Label Label11
Caption = "请输入基波频率f(HZ):"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 14
Top = 2040
Width = 3015
End
Begin VB.Label Label10
Caption = "请输入调制度M:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 12
Top = 1320
Width = 2175
End
Begin VB.Label Label9
Caption = "IGBT开通时间(μs):"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7440
TabIndex = 11
Top = 5400
Width = 3255
End
Begin VB.Label Label8
Caption = "格式:Q15格式"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 10
Top = 3960
Width = 2055
End
Begin VB.Label Label3
Caption = "面积等效法求IGBT开通时间"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6000
TabIndex = 9
Top = 0
Width = 3615
End
Begin VB.Label Label5
Caption = "版本:1.0"
Height = 255
Left = 120
TabIndex = 7
Top = 8760
Width = 1695
End
Begin VB.Label Label4
Caption = "版权所有:WangX"
Height = 255
Left = 120
TabIndex = 6
Top = 8520
Width = 1815
End
Begin VB.Label Label2
Caption = "输出转换COS值:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 2
Top = 3480
Width = 2175
End
Begin VB.Label Label1
Caption = "请输入载波比N:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 1
Top = 600
Width = 2175
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Command1_Click()
Dim front As String
Dim back As String
Dim lastst As String
Dim value As String * 20
Dim st1 As String
Dim st2 As String
Dim st3 As String
Dim st4 As String
Dim st5 As String
Dim st6 As String
Dim st7 As String
Dim st8 As String
Dim st9 As String
Dim st10 As String
Dim st11 As String
Dim st12 As String
Dim st13 As String
Dim st14 As String
Dim st15 As String
Dim st16 As String
Dim st17 As String
Dim st18 As String
Dim st19 As String
Dim st20 As String
Dim temp1 As Long
Dim temp2 As Long
Dim i As Integer
Dim j As Integer
Dim p As Integer
Dim n As Integer
Dim m As String
Dim f As String
Dim k As String
Dim ab(200) As String
Dim bc(200) As String
Dim cd(200) As String
Dim de(200) As String
back = ","
Text3.Text = "(" + ":"
m = Text4.Text
f = Text5.Text
k = m / 2
k = k / 3.1415926
k = k / f
k = k * 1000000
k = FormatNumber(k, 0, vbUseDefault, 0, vbFalse)
i = 0
j = 0
n = Text1.Text
While (i <= n)
ab(i) = Cos(j / n * 3.1415926) * 32768
bc(i) = Cos(j / n * 3.1415926)
If (i = 0) Then
Else: p = i - 1
cd(i) = bc(p) - bc(i)
If (cd(i) < 0) Then
st3 = 0
Else
End If
cd(i) = cd(i) * k
cd(i) = FormatNumber(cd(i), 1, vbUseDefault, 0, vbFalse)
End If
temp1 = ab(i)
ab(i) = temp1
If (i = 0) Then
Text2.Text = ab(i)
Else: Text2.Text = Text2 + back + ab(i)
Text3.Text = Text3 + back + cd(i)
de(i) = cd(i) / 0.025
Text6.Text = Text6 + back + de(i)
End If
i = i + 1
j = j + 1
Wend
Dim frequency As Long, sylong As Long
frequency = CLng(1000)
sylong = CLng(300)
APIBeep frequency, sylong
End Sub
Private Sub Command2_Click()
Dim i As Integer
Dim j As Integer
Text6.Text = ""
Text5.Text = "50"
Text4.Text = "0.864"
Text3.Text = ""
Text2.Text = ""
Text1.Text = "100"
i = 0
j = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -