📄 frmmain.frm
字号:
Index = 29
Left = 3720
TabIndex = 30
Top = 3240
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "WSTOP2"
Height = 255
Index = 28
Left = 3720
TabIndex = 29
Top = 2760
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "WSTOP1"
Height = 255
Index = 27
Left = 3720
TabIndex = 28
Top = 2280
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "WSTOP0"
Height = 255
Index = 26
Left = 3720
TabIndex = 27
Top = 1800
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "WLMT-"
Height = 255
Index = 25
Left = 3720
TabIndex = 26
Top = 1320
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "WLMT+"
Height = 255
Index = 24
Left = 3720
TabIndex = 25
Top = 840
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "ZIN"
Height = 255
Index = 23
Left = 2640
TabIndex = 24
Top = 4200
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZALARM"
Height = 255
Index = 22
Left = 2640
TabIndex = 23
Top = 3720
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZINPOS"
Height = 255
Index = 21
Left = 2640
TabIndex = 22
Top = 3240
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZSTOP2"
Height = 255
Index = 20
Left = 2640
TabIndex = 21
Top = 2760
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZSTOP1"
Height = 255
Index = 19
Left = 2640
TabIndex = 20
Top = 2280
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZSTOP0"
Height = 255
Index = 18
Left = 2640
TabIndex = 19
Top = 1800
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZLMT-"
Height = 255
Index = 17
Left = 2640
TabIndex = 18
Top = 1320
Width = 975
End
Begin VB.CheckBox Check1
Caption = "ZLMT+"
Height = 255
Index = 16
Left = 2640
TabIndex = 17
Top = 840
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YIN"
Height = 255
Index = 15
Left = 1560
TabIndex = 16
Top = 4200
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YALARM"
Height = 255
Index = 14
Left = 1560
TabIndex = 15
Top = 3720
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YINPOS"
Height = 255
Index = 13
Left = 1560
TabIndex = 14
Top = 3240
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YSTOP2"
Height = 255
Index = 12
Left = 1560
TabIndex = 13
Top = 2760
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YSTOP1"
Height = 255
Index = 11
Left = 1560
TabIndex = 12
Top = 2280
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YSTOP0"
Height = 255
Index = 10
Left = 1560
TabIndex = 11
Top = 1800
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YLMT-"
Height = 255
Index = 9
Left = 1560
TabIndex = 10
Top = 1320
Width = 975
End
Begin VB.CheckBox Check1
Caption = "YLMT+"
Height = 255
Index = 8
Left = 1560
TabIndex = 9
Top = 840
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XIN"
Height = 255
Index = 7
Left = 480
TabIndex = 8
Top = 4200
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XALARM"
Height = 255
Index = 6
Left = 480
TabIndex = 7
Top = 3720
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XINPOS"
Height = 255
Index = 5
Left = 480
TabIndex = 6
Top = 3240
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XSTOP2"
Height = 255
Index = 4
Left = 480
TabIndex = 5
Top = 2760
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XSTOP1"
Height = 255
Index = 3
Left = 480
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XSTOP0"
Height = 255
Index = 2
Left = 480
TabIndex = 3
Top = 1800
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XLMT-"
Height = 255
Index = 1
Left = 480
TabIndex = 2
Top = 1320
Width = 975
End
Begin VB.CheckBox Check1
Caption = "XLMT+"
Height = 255
Index = 0
Left = 480
TabIndex = 1
Top = 840
Width = 975
End
Begin VB.Label Label3
Caption = "输出检测"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5280
TabIndex = 51
Top = 480
Width = 1095
End
Begin VB.Label Label2
Caption = "输入检测"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 33
Top = 480
Width = 1215
End
Begin VB.Label Label1
Caption = "850卡IO检测"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3240
TabIndex = 0
Top = 120
Width = 1815
End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim cardno As Long
Dim OutNo As Integer
Private Sub btnExit_Click()
Dim i As Integer
For i = 0 To 31
write_bit cardno, i, 0
Check2(i) = 0
Next i
End
End Sub
Private Sub btnOutAllClose_Click()
Dim i As Integer
For i = 0 To 31
write_bit cardno, i, 0
Check2(i) = 0
Next i
End Sub
Private Sub btnOutAllOpen_Click()
Dim i As Integer
For i = 0 To 31
write_bit cardno, i, 1
Check2(i) = 1
Next i
End Sub
Private Sub Form_Load()
Init850Card
Timer1.Enabled = True
End Sub
Private Sub Init850Card()
Dim count As Integer
count = adt850_initial
If count < 1 Then
MsgBox "850控制卡未安装"
' End
End If
cardno = 0
End Sub
Private Sub Timer1_Timer()
Dim value As Long
Dim InNo As Long
Dim OutNo As Long
For InNo = 0 To 31
value = read_bit(cardno, InNo)
If (value = 0) Then
Check1(InNo) = 1
Else
Check1(InNo) = 0
End If
Next InNo
For OutNo = 0 To 31
If Check2(OutNo) = 1 Then
write_bit cardno, OutNo, 1
Else
write_bit cardno, OutNo, 0
End If
Next OutNo
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -