大族思特激光扫描振镜GMC卡功能说明1

1.1 激光扫描振镜GMC卡功能概述

1.1 GMC card functions overview

GMC板卡是由深圳市大族思特科技有限公司自主研发的振镜运动控制卡,目前该控制卡实现的主要功能有:

GMC board card is a galvanometer control card independentlydeveloped by Shenzhen Han’s Scanner S&T, co., LTD. The main functions ofthe control card are as follow

1、  支持2D3D以及飞行打标(试行)功能。

Supports 2D, 3D and flight marker functions

2、  支持三种振镜数据通信协议,分别是XY2-100SPI以及SL2通信协议。用户可以根据方头的协议,用上位机软件进行协议切换。

Three kinds ofmirror data communication protocols are supported, namely xy2-100, SPI andSL2.Users can use software to switch protocols according to actual needs

3、  通过高速以太网与打标软件进行通信,提高数据通信以及打标效率。只需改电脑IP,无需其他需要配置的东西;

High speedEthernet is used to communicate with marking software to improve datacommunication and marking efficiency. In addition, the user can communicatewith the board card through the network cable without installing the board carddriver, which is convenient for installation and use.

4、  提供C++C#两种二次开发语言DEMO,用户可根据熟悉的编程语言选择开发;

Provide C ++, C# two secondary development languages DEMO, users can choose to developaccording to the familiar programming language

5、  支持光纤激光器(如IPGSPI、锐科、JPT等)、CO2激光器、紫外激光器、绿光激光器。

Support fiberlaser (such as IPG, SPI, Ruike, JPT, etc.), CO2 laser, UV laser, green laser.

6、  自带高精度校正软件,校正一次,即可永久使用,无需二次开发人员频繁的加载校正文件。本控制卡校正文件保存在控制卡里,断电重启也不会丢失,不需要其他软件再次加载校正文件。

Comes withhigh-precision calibration software. Once calibrated, it can be usedpermanently, without the need for secondary developers to frequently loadcalibration files. This control card calibration file is stored in the controlcard, and it will not be lost after restarting the power supply. No othersoftware is required to load the calibration file again.

第2章 激光扫描振镜IP设置

Chapter 2: IP setting

因为本控制卡是通过以太网与电脑进行通讯的,因此在使用本控制卡之前,需要对电脑的IP进行设置,IP地址设置网段为172.18.34.2~172.18.34.255均可,子网掩码255.255.255.0,不过要避免电脑的IP与卡的IP一致,控制卡初始IP地址为172.18.34.227(此IP地址可以更改,不过网段不能改变),另外控制卡在上电时会产生一个临时的172.18.34.226的地址,等卡上电初始化完成之后此IP就会消失,也避免使用此初始化的IP地址。因此除了卡的IP172.18.34.227)与初始化IP172.18.34.226)之外,其他IP随意设置。

Because thecontrol card communicates with the computer via Ethernet, you need to set thecomputer's IP before using the control card. The IP address can be set from172.18.34.2 to 172.18.34.255. The subnet mask 255.255.255.0, but the IP of thecomputer and the IP of the card should be avoided. The initial IP address ofthe control card is 172.18.34.227 (this IP address can be changed, but thenetwork segment cannot be changed). In addition, the control card will generatea temporary The IP address of 172.18.34.226 will disappear after the card ispowered on and initialized. Avoid using this initialized IP address. Therefore,in addition to the card's IP (172.18.34.227) and initialization IP (172.18.34.226),other IPs can be set at will.

另外,本控制卡可以支持一个上位机软件同时控制多张控制卡打不同图形的功能,若要实现此功能,需要将其中一张卡默认的172.18.34.227地址改变一下,可以为172.18.34.228。若多张卡的IP地址一样,上位机软件是无法区分不同的卡。在有多张控制卡的情况下,需要使用路由器或者交换机,在电脑上插入不同的网卡可能会出问题,因此尽量用交换机或者路由器。

In addition, the control card can support one PC software to controlmultiple control cards to play different graphics at the same time. To achievethis function, you need to change the default address of one of the cards to172.18.34.227, which can be 172.18.34.228. If the IP addresses of multiplecards are the same, the host software cannot distinguish between differentcards. When there are multiple control cards, you need to use a router orswitch. Inserting different network cards into the computer may cause problems,so try to use a switch or router.

第3章 激光扫描振镜二次开发说明

Chapter 3 SecondaryDevelopment Instructions

3.1 基本文件说明

3.1 Basicdocument description

GMC控制卡除了提供配套的激光打标软件以外,还给用户提供了用于二次开发的动态连接库。所用的文件包括:

In addition to supporting laser marking software, GMC control cardalso provides users with a dynamic link library for secondary development. Thefiles used include

HM_Comm.dllDLL主要负责上位机软件与控制卡之间的数据交换,同时也是HM_HashuScan.dll所依赖的连接库;

HM_Comm.dll: This DLL is mainly responsible for the data exchangebetween the host computer software and the control card, and is also theconnection library on which HM_HashuScan.dll depends;

HM_HashuScan.dll本文件主要有两个作用,①生成打标所需要的UDM.BIN 文件;②与控制卡进行数据交互,传送数据等;

HM_HashuScan.dll: This file has two main functions: generating the UDM.BIN filerequired for marking; interacting with the control card to transmit data, etc.

头文件HM_HashuUDM.h:主要包含用来生成打标数据,其中包含设置方头协议、方头电机参数、激光器参数、基本图形(点、线、多边形、圆等)等函数接口;

Header file HM_HashuUDM.h: Mainly used to generate marking data,which includes setting the square head protocol, square head motor parameters,laser parameters, basic graphics (points, lines, polygons, circles, etc.) andother functional interfaces

头文件HM_HashuScan.h主要包含寻找控制卡IP、连接控制卡、发送数据、启动打标、停止打标等函数接口;

Header file HM_HashuScan.h: It mainly contains function interfacesuch as finding control card IP, connecting control card, sending data,starting marking, stopping marking, etc .;

System.ini配置文件,用户只需要放在EXE所在目录下即可,缺少此配置文件可能会导致无法找到卡的IP地址

System.ini: configuration file, users only need to put it in thedirectory where the EXE is located. The lack of this configuration file maylead to the failure to find the IP address of the card.

另外还包含对应的两个LIB文件HM_HashuScan.libHM_Comm.lib

It also contains the corresponding two LIB files HM_HashuScan.lib,HM_Comm.lib

本软件基础开发库使用VS2010编译完成,用户尽可能使用高于2010版本测VS进行开发,支持C++C#两种语言。

This software's basic development library is compiled with VS2010.Users should try to develop with VS higher than 2010 version, and support C ++and C # languages.

注意:HM_HashuScan.dllHM_Comm.dllSystem.iniEXE程序必须放在同一个目录下。


用户如果想快速应用,可以跳过本章,直接看第四章的DEMO开发指南,可以在DEMO的基础上快速开发应用,本章函数说明可以在不懂的时候再查看。