Create a HALCON “Hello World” Program

This tutorial shows how to create and start developing a HDevelop program for Zivid using HALCON, using screenshots to guide you through each step.

Requirements

참고

This tutorial was tested with the following HALCON versions: 19.05 Progress, 20.05 Progress, 21.11 Progress, 24.05 Progress, 24.11 Progress-Steady, 25.05 Progress, 25.11 Progress, 26.05 Progress.

Instructions

Create ZividHelloWorld.hdev

HALCON을 실행한 다음 FileNew Program 을 클릭합니다. Program Window main () 에 다음 코드를 추가하십시오.

<c>* Connect to the camera</c>
<l>open_framegrabber ('GenICamTL',1, 1, 0, 0, 0, 0, 'progressive', -1, 'default', -1, 'false', 'default', 'default', 0, 0, AcqHandle)</l>
<c/>
<c>* Create a window and print 'Hello World!'</c>
<l>dev_open_window (0, 0, 512, 512, 'black', WindowHandle)</l>
<l>write_string(WindowHandle,'Hello World!')</l>

코드를 원하는 위치에 ZividHelloWorld.hdev 로 저장합니다.

Run the program

키보드에서 F5 키를 눌러 프로그램을 실행합니다.

HDevelop의 HALCON Hello World 스크립트

우리의 HALCON samples 을 확인하고 개발을 시작하십시오!