The text of a manual · part 33 of 34
HawkEye 1500 Series User Manual, pages 321 to 330
Pages 321 to 330 of 338
The original document is the PDF (3.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Microscan HE1510, RVSI CiMatrix HE1510 and Siemens HE1510
Page 321
Complete Source Code
' disable buttons if port is not available Dim i As Long For i = 1 To 4 btnConnect(i).Enabled = CheckSerialPort("COM" & i & ":") Next i Disconnect End Sub Private Sub Form_Unload(Cancel As Integer) Disconnect Set m_coord = Nothing End Sub Private Function CheckSerialPort(port As String) As Boolean ' this function uses MiAsciiConnection to check if ' the COM port can be opened at all - will throw exception ' on conect if in use by another application On Error GoTo err: Dim serial As New MiASCIIConnection serial.Connect port If serial.Connected Then End If serial.Disconnect CheckSerialPort = True Set serial = Nothing Exit Function err: Set serial = Nothing CheckSerialPort = False End Function
Custom Programming Using a Serial
F
Private Sub Connect(targ As String) m_coord.DeviceFocusSet targ End Sub Private Sub m_connection_OnConnectionReset() Dim i As Long m_bGettingReport = False If m_connection.IsConnected Then SerialHook.Enabled = True Else SerialHook.Enabled = False End If v2.4.1, Nov 2008
HawkEye™ 1500 Series User Manual
F-5
Page 322
Appendix
F
Custom Programming Using a Serial Connection
End Sub Private Sub UpdateButtons() Dim i As Long m_bInUpdateButtons = True If m_connection.IsConnected Then For i = 1 To btnConnect.Count If m_connection.Device.Name <> btnConnect(i).Caption Then btnConnect(i).Value = vbUnchecked Else btnConnect(i).Value = vbChecked End If Next i Else For i = 1 To btnConnect.Count btnConnect(i).Value = vbUnchecked Next i End If m_bInUpdateButtons = False End Sub Private Sub Disconnect() m_coord.DeviceFocusSet "" End Sub Private Sub btnConnect_Click(Index As Integer) If m_bInUpdateButtons Then Exit Sub If m_connection.IsConnected Then Dim i As Long For i = 1 To btnConnect.Count If btnConnect(i).Caption = m_connection.Device.Name Then m_bInUpdateButtons = True btnConnect(i).Value = vbUnchecked btnConnect(i).Refresh m_bInUpdateButtons = False End If Next i Disconnect End If If btnConnect(Index).Value = vbChecked Then Connect btnConnect(Index).Caption End If UpdateButtons End Sub
F-6
HawkEye™ 1500 Series User Manual v2.4.1, Nov 2008
Page 323
Complete Source Code
Private Sub ShowView(v As Long) Select Case v Case VIEW_TERMINAL m_terminal.Visible = True m_image.Visible = False m_report.Visible = False Case VIEW_IMAGE m_terminal.Visible = False m_image.Visible = True m_report.Visible = False Case VIEW_REPORT m_terminal.Visible = False m_image.Visible = False m_report.Visible = True End Select End Sub Private Sub Form_Resize() On Error Resume Next Dim y As Long y = 0 y = y + btnConnect(1).Height Dim w As Long w = ScaleWidth / 3 m_countTotal.Move 0, y, w m_countPassed.Move w, y, w m_countFailed.Move 2 * w, y, w y = y + m_countTotal.Height m_progress.Move 0, ScaleHeight - m_progress.Height, ScaleWidth m_tabstrip.Move 0, y, ScaleWidth, ScaleHeight - y - m_progress.Height With m_tabstrip m_terminal.Move .ClientLeft, .ClientTop, .ClientWidth, .ClientHeight m_image.Move .ClientLeft, .ClientTop, .ClientWidth, .ClientHeight m_report.Move .ClientLeft, .ClientTop, .ClientWidth, .ClientHeight End With End Sub Private Sub HookDevInfo_Click() m_bHookDevInfo = Not m_bHookDevInfo HookDevInfo.Checked = m_bHookDevInfo End Sub v2.4.1, Nov 2008
HawkEye™ 1500 Series User Manual
F-7
Custom Programming Using a Serial
F
Page 324
Appendix
F
Custom Programming Using a Serial Connection
Private Sub HookImages_Click() m_bHookImages = Not m_bHookImages If m_bHookImages Then m_bHookReports = True HookReports.Checked = m_bHookReports HookImages.Checked = m_bHookImages End Sub Private Sub HookReports_Click() m_bHookReports = Not m_bHookReports If Not m_bHookReports Then m_bHookImages = False HookImages.Checked = m_bHookImages HookReports.Checked = m_bHookReports End Sub Private Sub Compression_Click(Index As Integer) m_nCompression = Index Dim i As Long For i = Compression.LBound To Compression.UBound Compression(i).Checked = IIf(m_nCompression = i, vbChecked, vbUnchecked) Next i End Sub
Private Sub m_connection_OnDataTransferAborted() m_progress.Value = 0 m_progress.Visible = False m_bGettingReport = False End Sub Private Sub m_connection_OnDataTransferPercentComplete(ByVal nPercent As Integer) m_progress.Value = nPercent End Sub Private Sub m_connection_OnDataTransferStarted() m_progress.Visible = True m_progress.Min = 0 m_progress.Max = 100 m_progress.Value = 0 End Sub Private Sub m_connection_OnNewRecord(ByVal objReport As MIOBJLib.IMiCycleReport) If m_bGettingReport Then
F-8
HawkEye™ 1500 Series User Manual v2.4.1, Nov 2008
Page 325
Complete Source Code m_image.NewRecord objReport m_report.NewRecord objReport m_bGettingReport = False m_progress.Value = 100 m_progress.Visible = False End If End Sub Private Sub m_tabstrip_Click() Select Case m_tabstrip.SelectedItem.Key Case "terminal" ShowView VIEW_TERMINAL Case "image" ShowView VIEW_IMAGE Case "report" ShowView VIEW_REPORT End Select End Sub Private Sub SerialHook_Timer() If Not m_connection.IsConnected Then Exit Sub If Not m_bGettingReport Then If m_bHookDevInfo Then ' update the device info manually Dim dev As MiDevice Set dev = m_coord.DeviceFocusGet dev.RefreshInfo m_countTotal.Caption = dev.CountCycle m_countPassed.Caption = dev.CountPassed m_countFailed.Caption = dev.CountCycle - dev.CountPassed Else m_countTotal.Caption = "???" m_countPassed.Caption = "???" m_countFailed.Caption = "???" End If
Custom Programming Using a Serial
F
If m_bHookReports Then ' create a REPORTREQ command string m_bGettingReport = True Dim cmd As String cmd = "REPORTREQ " Select Case m_nCompression v2.4.1, Nov 2008
HawkEye™ 1500 Series User Manual
F-9
Page 326
Appendix
F
Custom Programming Using a Serial Connection
Case 1 cmd = cmd & " 255" Case 2 cmd = cmd & " 1" Case 3 cmd = cmd & " 4" Case 4 cmd = cmd & " 26" Case 5 cmd = cmd & " 27" Case Else MsgBox "Invalid Compression Ratio" End Select If m_bHookImages Then cmd = cmd & " 1" Else cmd = cmd & " 0" End If ' send the REPORTREQ m_connection.CommandSend cmd End If End If End Sub
F-10
HawkEye™ 1500 Series User Manual v2.4.1, Nov 2008
Page 327
Index
Symbols
.SEC Files C-1 bootloader_Reader.sec C-2 registry_Reader.sec C-2 vxWorks_Reader.sec C-2 +V 4-98 Numerics
8-bit Binary Code D-4 A
About ReadRunner 4-98 Acquisition use camera for 4-130 Adapter external i/o terminal block 2-27 Add camera 4-5, 4-6, 4-7, 4-11 Adding camera 4-7 not in network overview 4-11 on a different subnet 4-11 Advanced Tuning Window 4-104, 4-109 AIAG D-1 AIM D-1 grade 4-16 international technical specification excerpts D-9 Air Transport Association D-1 v2.4.1, Nov 2008
Alarms network overview window 4-97 ANGLE 4-77 ANGLE_FAILURE 4-60 ANSI D-8 X3.4 D-10 Aperture 4-115 Application Mode demo 3-3, 4-47 motion 3-4, 4-47 presentation 3-4, 4-48 stop and scan 3-4, 4-48 supermarket 3-4, 4-48 window 4-46 ASCII D-8 Assisted Learn enable 4-103 ATA D-1 Audio formatted 3-31 Auto learn parameters 4-105, 4-110 max exposure 4-114 max gain 4-114 min exposure 4-114 min gain 4-114 photometry 4-22 Automatic Identification Manufacturers International D-1 Automotive Industry Action Group D-1 Axial Nonuniformity 4-17 B
Barcode parameters bc decode near center 4-113 confidence 4-113 horizontal spacing 4-110
HawkEye™ 1500 Series User Manual
Index-1
Page 328
Index max barcode height 4-111 max barcode length 4-111 max barcode width 4-112 max number of bars 4-112 min barcode height 4-111 min barcode length 4-111 min barcode width 4-111 min number of bars 4-112 min quiet zone length 4-112 min threshold 4-113 num barcodes 4-110 probe direction 4-113 vertical spacing 4-111 Baud Rate 4-66, 4-67 BC Decode Near Center 4-113
Beeper turning on and off 4-87 Behavior of wildcard match 4-40 Binary Code D-4 Bit Versus Codeword D-6 Blocks mounting 2-47 BOOL 4-61 Bootloader C-2 bootloader_Reader.sec C-2 Broken Border D-4 Budget Report 4-52 Buttons add camera 4-6, 4-7, 4-11 color 4-46 details 4-98 display rate data 4-95 timing data 4-96 font 4-46 learn 4-14, 4-102 programming user 4-92 readrunner 4-6 refresh network 4-97 release 4-6 remove button 4-21 show internal messages 4-92 take control 4-6 turbo live 4-12 unlearn 4-104 zoom in 4-95
Index-2 zoom out 4-95 Byte-Oriented Error Detection and Correction Algorithm D-6 C
Cable external i/o terminal block adapter 2-34 serial adapter 2-39 cach Command 6-12 Camera adding 4-7 when on a different subnet 4-11 disconnecting from 4-21 name 4-65 unique 3-3 releasing control of 4-21 removing 4-21 report window 4-15 resolution 4-100 selecting correct 1-1 serial port baud rate 4-66, 4-67 data bits 4-67 flow control 4-67 parity 4-66, 4-67 stop bits 4-67 software upgrading C-1 taking control 4-7 upgrading software C-5 CCD 4-100 Cell sample 4-107 unit report 4-114 Certifications D-1 Chart Window 4-94 Check Sum Checking 4-117, 4-118, 4-119 Checking check sum 4-117, 4-118, 4-119 start 4-117 stop 4-117 CHECKSUM 4-77 Clear images from camera without uploading 4-127 terminal window 4-92 CLOSE Method 4-25
HawkEye™ 1500 Series User Manual v2.4.1, Nov 2008
Page 329
Index
Color button 4-46 fail 4-46 pass 4-46 Combination I/O Board wiring examples 2-26 Command text box 4-94 Commands cach 6-12 cpu 6-11 d 6-4 dbp 6-6 der 6-10 dfb 6-10 display boot params 6-6 command help 6-13 cpu registers 6-11 ethernet registers 6-10 flash blocks 6-10 last logged error 6-13 menu 6-9 system flash size 6-12 system ram size 6-12 test menu 6-5 dm 6-9 dt 6-5 dump memory 6-4 e 6-13 et 6-6 execute test 6-6 file transfer and execute 6-12 flsh 6-12 h 6-13 i-cache control 6-12 j 6-13 jump to application 6-13 m 6-5 mbp 6-7 modify boot parameters 6-7 modify memory 6-5 r 6-13 ram 6-12 reset unit 6-13 sending remote to camera 4-94 v2.4.1, Nov 2008 text box 4-93 wmr 6-11 wpr 6-11 write mac register 6-11 write phy register 6-11 x 6-12 Common Terminal 2-25 Communications configuration window 4-64, 4-71 Confidence 4-113 Configuration File loading 4-20 saving 4-19 Configuring the Part Queue 4-120 Connections network overview window 4-97 Connector DB15S 2-8 field i/o 2-8 light port 2-45 RJ45 ethernet 2-41 serial 2-39 Contrast 4-17 report 4-114 Controller network overview window 4-97 cpu Command 6-11 Ctrl +A 4-104, 4-109 +F 4-131 +F5 4-87 +F6 4-53 +G 4-71 +H 4-94 +I 4-129 +J 4-64, 4-71 +M 4-46, 4-49 +O 4-29, 4-41 +P 4-22 +Q 4-130 +R 4-15 +S 4-89 +T 4-92 +U 4-120 +V 4-25
HawkEye™ 1500 Series User Manual
Index-3
Page 330
Index
+Z 4-90 Current Image saving 4-129 Customer Settings Installed in Manufacturing 4-99 Cycle Reports storing 4-120 Cycles network overview window 4-97 D d Command 6-4 DATA 4-77 Data bits 4-67 regions D-11 storage area D-4 valid display at top of screen 4-46 full handshake 3-19, 3-22, 4-56 pipelined 3-19, 3-20, 4-56
Data Matrix 8-bit binary code D-4 additional features D-11 compared to barcode D-2 components D-3 construction 1-3 encoding schemes D-7 error correction D-5 parameters cell sample 4-107 ecc level 4-106 image style 4-106 matrix height 4-108 matrix width 4-108 num columns 4-105 num datamatrix 4-105 num rows 4-106 orientation 4-106 pixels per cell 4-107 polarity 4-106 probe direction 4-108 probe speed 4-109 probe threshold 4-109 read timeout 4-107, 4-111 warp type 4-106 weight/height ratio 4-107 symbol structure D-11 what it is D-1
Index-4
DATAHEX 4-77 DB-15S Connector 2-8 dbp Command 6-6 Debounce 3-10 Debugging 4-120 Decode backward 4-117 fail 4-85 forward 4-117 left to right 4-117 pass 4-85 right to left 4-117 string DECODE_FAILURE 4-60 Defaults restoring 4-89, 4-90 Delay 3-10 Demo Mode 3-3, 4-47 der Command 6-10 DETAILED 4-77 Details Button 4-98 dfb Command 6-10 DILATE Method 4-25 Disconnecting from a Camera 4-21 Display boot parameters command 6-6 command help command 6-13 commands sent to camera 4-92 cpu registers command 6-11 decode string at top of screen 4-46 ethernet registers command 6-10 flash blocks command 6-10 last logged error command 6-13 menu command 6-9 new images 4-132 rate data button 4-95 remove optional cs 4-117, 4-118, 4-119 report output from camera 4-92 system flash size command 6-12 system ram size command 6-12 test menu command 6-5 timing data button 4-96 Displaying barcode parameters 4-109 commands sent to camera 4-92
HawkEye™ 1500 Series User Manual v2.4.1, Nov 2008