
Page 38 Model 801GC-ISA & 801GF-ISA Programming Manual
End If
End Sub
Sub cmdInit_Click ()
Dim MsgBox_Response As Integer
MsgBox_Response = MsgBox("Would you like to re-initialize the board? This will erase all custom
formats, images and sequences!", MB_ICONSTOP Or MB_YESNO, "Communication Error")
If MsgBox_Response = IDYES Then
'Initialize the generator
Answer = board_init(comm_data, response)
'Analyze the error value if one occured
If Answer <> 0 Then
PortConnect_Error (Answer)
Else
pnlStatus.Caption = "The generator is being initialized. Please wait."
End If
End If
End Sub
Sub cmdModel_Click ()
Dim Company As String 'The company who supplies the video generator - Quantum Data
Dim Model As String 'The current video generator model
Dim position As Integer 'Used to help parse the response string
Dim position2 As Integer 'Used to help parse the response stringl
'Check to see if port connection is open
If Connected Then
'Download the command for the generator model to the generator
cmd = "*IDN?"
Answer = port_command(comm_data, cmd, response)
'Analyze the error value if one occured
If Answer <> 0 Then
PortConnect_Error (Answer)
Else
'The response string contains the data returned from the generator
position = InStr(response, ",")
Company = Left$(response, position - 1)
position2 = InStr(position + 1, response, ",")
Model = Mid$(response, position + 1, position2 - position - 1)
pnlStatus.Caption = Company & " " & Model 'The response string contains the data returned from
the generator
End If
Else
MsgBox "The ISA0 port connection is not open. Please try the 'Open Port - ISA0' button first.",
MB_ICONSTOP, "OPEN PORT"
End If
End Sub
Sub cmdOpenPort_Click ()
Dim Answer As Integer 'Value return from DLL
'Initialize the data in comm_data_type needed for ISA port connection
comm_data.portType = ISA_Connection 'ISA_Connection = 1
comm_data.PortNum = 0
'Create string to send to the DLL describing ISA port
Comentarios a estos manuales