关键词不能为空

当前您在: 主页 > 英语 >

MarkEzddll_Manual_EN

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-08 12:34
tags:

-

2021年2月8日发(作者:rushhour)


1. Summarize


file is Dynamic Link Library provided by Beijing JCZ Technology CO.


LTD for developing software based on ezcad2 and lmc board




MarkEzdDll.h is header file of the exports function in




We can develop the software using VC6.0.



The calling way of is explicitly link. Developer needs to load and free


by calling Windows API function.



The steps are as follows.



1. Call Windows



API function LoadLibrary() to load DLL dynamically;




2. Call Windows



API function GetProcAddrress() to get the pointer of the functions


in the DLL and use the function pointer to finish the work;



3. Call Windows



API function FreeLibrary() to release library when you do not use


DLL or the program ends.




Note: the program that calls must be located at the same folder


with . Or else the program would not work. And and


cannot work as usually at the same time, so you must close


when is used.



2. Description


Return value of most functions in is a common error code of integer type.


Its definitions are as follow:



#define LMC1_ERR_SUCCESS




0



// Success


#define LMC1_ERR_EZCADRUN



1



// Find EZCAD running


#define LMC1_ERR_NOFINDCFGFILE


2



// Can not find


#define LMC1_ERR_FAILEDOPEN



3



// Open LMC1 board failed


#define LMC1_ERR_NODEVICE




4



// Can not find valid lmc1 device


#define LMC1_ERR_HARDVER



5



// Lmc1



s version is error.


#define LMC1_ERR_DEVCFG





6



// Can not find configuration files


#define LMC1_ERR_STOPSIGNAL



7



// Alarm signal


#define LMC1_ERR_USERSTOP



8



// User stops


#define LMC1_ERR_UNKNOW




9



// Unknown error


#define LMC1_ERR_OUTTIME




10



// Overtime



#define LMC1_ERR_NOINITIAL




11



// Un-initialized



#define LMC1_ERR_READFILE



12



// Read file error


#define LMC1_ERR_OWENWNDNULL


13



// Window handle is NULL


#define LMC1_ERR_NOFINDFONT



14



// Can not find designated font




#define LMC1_ERR_PENNO





15



// Wrong pen number



#define LMC1_ERR_NOTTEXT




16



// Object is not text



#define LMC1_ERR_SAVEFILE




17



// Save file failed



#define LMC1_ERR_NOFINDENT



18



// Can not find designated object


#define LMC1_ERR_STATUE




19



//


Can


not


run


the


operation


in


current state



Note: The entire TCHAR object in must be UNICODE.



lmc1_Initial


INTENTION


: initialize lmc1 control board


DEFINITION


: int lmc1_Initial(TCHAR* strEzCadPath, BOOL bTestMode, HWND


hOwenWnd)


strEzCadPath:



the full path where exists


bTestMode



Whether in test mode or not


hOwenWnd:



The window that has the focus. It is used to check the user



s stop


messages.


DESCRIPTION


: you must first call lmc1_Initial before other function in program.



RETURN VALUE


: common error code



lmc1_Close



INTENTION


: Close lmc1 board


DEFINITION


: int lmc1_Close();



DESCRIPTION


:


you


must


call


lmc1_Close


to


close


the


lmc1


board


when


exit


program.



RETURN VALUE


: common error code



lmc1_LoadEzdFile


INTENTION


: open the appointed ezd file, and clear all the object in database.


DEFINITION


: int lmc1_LoadEzdFile(TCHAR* strFileName);


DESCRIPTION:


this


function


can


open


an


ezd


file


that


was


build


by


user


as


a


template. User need not set process parameters, because they will


be loaded in from the template file.



RETURN



VALUE


: common error code



lmc1_Mark


INTENTION


: mark all the data in database


DEFINITION


: int lmc1_Mark(BOOL bFlyMark)




bFlyMark= TRUE



// mark on fly



DISCRIPTION


: Begin to mark by calling this function after loading ezd file using


lmc1_LoadEzdFile. The function will not return back until marking


complete.


RETURN VALUE


: common error code



lmc1_ChangeTextByName


INTENTION


: change the content of the text with appointed name.


DEFINITION


:


int


lmc1_ChangeTextByName(TCHAR*


strTextName,


TCHAR*


strTextNew);


strTextName






the name of text object whose content will be changed


strTextNew







new content of text


DISCRIPTION


:


after


loading


ezd


file


by


lmc_LoadEzdFile,


user


can


use


this


function


to


change


the


content


of


appointed


text


object


before


marking it.





lmc1_MarkEntity


INTENTION:


mark the



appointed named object in database


DEFINITION


: int lmc1_MarkEntity(TCHAR* strEntName);


DISCRIPTION


:


after


loading


ezd


file


by


lmc1_LoadEzdFile,


user


can


use


this


function


to


mark


the


appointed


object.


The


function


will


not


return


back


until marking complete.


RETURN VALUE


: common error code



lmc1_ReadPort


INTENTION


: read the input port of the lmc1


DEFINITION


: int lmc1_ReadPort(WORD& data)




data:




the data in input port


DISCRIPTION


: call lmc1_ReadPort to read the data from input ports



RETURN VALUE


: common error code



lmc1_WritePort


INTENTION


: write data to output port on the lmc1


DEFINITION


: int lmc1_WritePort(WORD data)




data: the data to output ports


DISCRIPTION


: call lmc1_WritePort to write data to the output port



RETURN VALUE


: common error code



lmc1_GetPrevBitmap


INTENTION


: Get the preview picture of all the objects in database.


DEFINITION


: CBitmap* lmc1_GetPrevBitmap(HWND hwnd, int nBMPWidth, int


nBMPHeight)




Hwnd: Window Handle that the preview shows in


nBMPWidth: the preview picture



s width in pixel



nBMPHeight: the preview picture



s height in pixel


DISCRIPTION


:


Call


lmc1_GetPrevBitmap


to


get


the


preview


picture


of


all


the


objects in database. It can be used to refresh the interface.


RETURN VALUE


: return


picture’


s pointer if successful and NULL if failed



lmc1_SetDevCfg


INTENTION


: set parameter for device



DEFINITION


: int lmc1_SetDevCfg( )


DISCRIPTION


: call lmc1_SetDevCfg, and then a window will be popup. User could


set parameters of device in it.




RETURN VALUE


: common error code



lmc1_SetHathParam


INTENTION


: Set the hatch parameter


DEFINITION


: int lmc1_SetHatchParam (


BOOL




bEnableContour,


//enable the contour of object to be marked


int





bEnableHatch1, //enable hatch NO. 1


int





nPenNo1, //set the pen of hatch NO. 1


int





nHatchAttrib1, //set the attribute of hatch NO. 1


double dHatchEdgeDist1, //set the distance between hatch line and contour


of hatch NO. 1


double dHatchLineDist1, //set the distance between two line of hatch NO. 1 .


double dHatchStartOffset1, //set the start offset of hatch NO. 1


double dHatchEndOffset1, //set the end offset of hatch NO. 1


double dHatchAngle1, //set the hatch angle of hatch NO. 1


int





bEnableHatch2, //enable hatch1 NO.2


int





nPenNo2,


int





nHatchAttrib2,


double dHatchEdgeDist2,



double dHatchLineDist2.


double dHatchStartOffset2,


double dHatchEndOffset2,



double dHatchAngle2



);



nHatchAttrib1: attribute of hatch



which is a combination of the following values:


const int HATCHATTRIB_ALLCALC = 0x01; //compute all object as one


const int HATCHATTRIB_BIDIR




= 0x08; // reciprocating hatch


const int HATCHATTRIB_EDGE





= 0x02; // re-mark the edge



const int HATCHATTRIB_LOOP





= 0x10; // ring-like hatch




DISCRIPTION


:


call


lmc1_SetHatchParam


to


set


the


parameters


of


hatch.


The


parameters will be used for the latter hatched object.


RETURN VALUE


: common error code



lmc1_SetFontParam


INTENTION


: set the parameter of font


DEFINITION


: int lmc1_SetFontParam(


TCHAR* strFontName



double dCharHeight,



double dCharWidth,



double dCharAngle,



double dCharSpace,



double dLineSpace,


BOOL




bEqualCharWidth


);


strFontName:




name of font


dCharHeight:




height of character



dCharWidth:




width of character


dCharAngle:




angle of character


dCharSpace:




distance between the character


s


dLineSpace:





distance between the lines.


bEqualCharWidth:



enable the same characters width mode



DISCRIPTION


: call lmc1_SetFontParam to set parameters of font. The parameters


will be used for the latter text object added in database.


RETURN VALUE


: common error code



lmc1_GetPenParam


INTENTION


: get the parameter of appointed pen


DEFINITION


: int lmc1_GetPenParam(


int







nPenNo,



// Pen



s NO. (0-255)


int&






nMarkLoop,



//mark times


double&




dMarkSpeed,



//speed of marking mm/s


double&




dPowerRatio,



// power ratio of laser (0-100%)



double&




dCurrent,


//current of laser (A)


int&







nFreq,


// frequency of laser HZ


int&







nQPulseWidth,



//width of Q pulse (us)



int&







nStartTC,


// Start delay (us)


int&







nLaserOffTC,


/


/delay before laser off (us)


int&







nEndTC,


// marking end delay (us)


int&







nPolyTC ,


//delay for corner (us)



double&




dJumpSpeed,



//speed of jump without laser (mm/s)


int&







nJumpPosTC,



//delay about jump position (us)


int&







nJumpDistTC,


//delay about the jump distance (us)



double&




dEndComp,


// compensate for end (mm)


double&




dAccDist,


// distance of speed up (mm)



double&




dPointTime,


//delay for point mark (ms)


BOOL&




bPulsePointMode,


//pulse for point mark mode


int&







nPulseNum,


//the number of pulse


double&




dFlySpeed


//speed of production line


);



DISCRIPTION


:


call


lmc1_GetParam


to


get


the


parameter


of


appointed


pen


in


database


RETURN VALUE


: common error code



lmc1_SetPenParam


INTENTION


: Set the pan parameter


DEFINITION


: int lmc1_SetPenParam(


int







nPenNo,



// Pen



s NO. (0-255)


int&







nMarkLoop,



//mark times


double&




dMarkSpeed,


//speed of marking mm/s


double&




dPowerRatio,


/


/ power ratio of laser (0-100%)



double&




dCurrent,


//current of laser (A)


int&







nFreq,


// frequency of laser HZ


int&







nQPulseWidth,



//width of Q pulse (us)



int&







nStartTC,


// Start delay (us)


int&







nLaserOffTC,



//delay before laser off (us)


int&







nEndTC,


// marking end delay (us)


int&







nPolyTC,



//delay for corner (us)


double&




dJumpSpeed,



//speed of jump without laser (mm/s)


int&







nJumpPosTC,



//delay about jump position (us)


int&







nJumpDistTC,


//delay about the jump distance (us)



double&




dEndComp,



//compensate for end (mm)


double&




dAccDist,


// distance of speed up (mm)



double&




dPointTime,


//delay for point mark (ms)



BOOL&




bPulsePointMode,


//pulse for point mark mode


int&







nPulseNum,


//the number of pulse


double&




dFlySpeed


//speed of production line


);


DISCRIPTION


:


call


lmc1_SetPenParam


to


set


the


parameters


of


appointed


pen


in


database



RETURN VALUE


: common error code



lmc1_ClearEntLib


INTENTION


: clear all object in database


DEFINITION


: int lmc1_ClearEntLib();





DISCRIPTION


: call lmc1_ClearEntLib to clear all objects in database.


RETURN VALUE


: common error code



lmc1_AddTextToLib1


INTENTION


: add new text object into database.


DEFINITION


: int lmc1_AddTextToLib(


TCHAR* pStr,



TCHAR* pEntName,



double dPosX,



double dPosY,



double dPosZ,



int





nAlign


double dTextRotateAngle,


int nPenNo,



BOOL bHatchText



//hatch the text object or not.


);


pStr:







the character string


pEntName: the name of character string object


dPosX





left-bottom point



s X coordinate of the character string object



dPosY





left-bottom point



s Y coordinate of the character string object



dPosZ





Z coordinate of the character string object


nAlign





align way 0



8


//meaning of the align way:


//




6 ---



5 ---



4


//




|













|


//




|













|


//




7






8






3


//




|













|


//




|













|


//




0 ----- 1 --- -- 2


dTextRotateAngle



rotation


angle


(in


radian)


that


the


character


string


object


rotates around base point.


nPenNo











the number of pen to mark text




bHatchText








hatch the text object or not


DISCRIPTION


: call lmc1_AddTextToLib to add



new text object into database.


RETURN VALUE


: common error code



lmc1_AddCurveToLib


INTENTION


: add new curve object into database.


DEFINITION


: int lmc1_AddCurveToLib(


double ptBuf[][2],


//array of the curve vertex


int



ptNum, //number of the curve vertex



TCHAR* pEntName,



//name of the curve object


int nPenNo,



//the pen number of curve object



int bHatch


//hatch the curve object or not


);


DISCRIPTION


: call lmc1_AddCurveToLib to add curve object into database.


RETURN VALUE


: common error code



lmc1_AddFileToLib


INTENTION


: add the appointed file into database.


DEFINITION



int lmc1_AddFileToLib(


TCHAR* pFileName,


//filename


TCHAR* pEntName,



// name of the file object


double dPosX,



// X coordinate of left-bottom point



double dPosY,



// Y coordinate of left-bottom point


double dPosZ,


// Z coordinate of the file object


int





nAlign,


// align way 0



8


double dRatio,


// scaling ratio








int nPenNo,


//the pen number of the file object


BOOL bHatchFile



// hatch the file object or not


);





DISCRIPTION


:


call


lmc1_AddFileLib


to


add


new


file


object


into


database.


The


following file formats are supported :


ezd,


dxf



dst,


plt,


ai,


bmp,


jpg, tga, png, gif, tiff



RETURN VALUE


: common error code



lmc1_AddBarCodeTolib


INTENTION


: add a new bar code object into database.


DEFINITION


: int lmc1_AddBarCodeToLib(


TCHAR* pStr,



TCHAR* pEntName,


double dPosX,



double dPosY,



double dPosZ,



int





nAlign,


int





nPenNo,


int





bHatchText,


int





nBarcodeType,


WORD




wBarCodeAttrib,



double dHeight,


double dNarrowWidth,


double dBarWidthScale[4],


double dSpaceWidthScale[4],


double dMidCharSpaceScale,


double dQuietLeftScale,


double dQuietMidScale,


double dQuietRightScale,


double dQuietTopScale,


double dQuietBottomScale,


int





nRow,



int





nCol,



int





nCheckLevel,


int





nSizeMode,


double dTextHeight,



double dTextWidth,



double dTextOffsetX,



double dTextOffsetY,



double dTextSpace,



TCHAR* pTextFontName


);




pStr



character string of the bar code



pEntName



name of the bar code object


dPosX,



X coordinate of left-bottom basic point of the barcode


dPosY



Y coordinate of left-bottom basic point of the barcode


dPosZ



Z coordinate of the bar code object


nAlign, align way 0



8


nPenNo




the pen NO. of the barcode object


bHatchText



hatch the barcode object or not


nBarcodeType



type of barcode, see following:


#define BARCODETYPE_39







0


#define BARCODETYPE_93







1


#define BARCODETYPE_128A





2


#define BARCODETYPE_128B





3


#define BARCODETYPE_128C





4


#define BARCODETYPE_128OPT



5


#define BARCODETYPE_EAN128A 6


#define BARCODETYPE_EAN128B 7


#define BARCODETYPE_EAN128C 8


#define BARCODETYPE_EAN13




9


#define BARCODETYPE_EAN8





10


#define BARCODETYPE_UPCA





11


#define BARCODETYPE_UPCE





12


#define BARCODETYPE_25







13


#define BARCODETYPE_INTER25 14


#define BARCODETYPE_CODABAR 15


#define BARCODETYPE_PDF417



16


#define BARCODETYPE_DATAMTX 17


wBarCodeAttrib attribute of barcode.


#define BARCODEATTRIB_REVERSE



0x0008


// reverse barcode



#define BARCODEATTRIB_HUMANREAD


0x1000 // show the character


#define BARCODEATTRIB_CHECKNUM


0x0004 // need check number



#define BARCODEATTRIB_PDF417_SHORTMODE



0x0040


//short


mode of PDF417


#define BARCODEATTRIB_DATAMTX_DOTMODE


0x0080


//point


mode of DataMtrix



dHeight









height of bar code




dNarrowWidth: width of the narrowest module


dBarWidthScale: ratio of bar width to narrowest module


dSpaceWidthScale: ratio of space width to the narrowest module


dMidCharSpaceScale ratio of character space width to the narrowest module


dQuietLeftScale: ratio of the left blank width to the narrowest module


dQuietMidScale: ration of the middle blank width to the narrowest module


dQuietRightScale: ratio of the right blank width to the narrowest module


dQuietTopScale: ratio of the top blank width to the narrowest module


dQuietBottomScale: ratio of the bottom blank width to the narrowest module


nRow:



row number of two-dimension barcode


nCol:



column number of two- dimension barcode


nCheckLevel, //pdf417 error recovery level 0-8


nSizeMode, //DataMatrix size mode 0-30


#define DATAMTX_SIZEMODE_SMALLEST



0


#define DATAMTX_SIZEMODE_10X10






1


#define DATAMTX_SIZEMODE_12X12






2


#define DATAMTX_SIZEMODE_14X14






3


#define DATAMTX_SIZEMODE_16X16






4


#define DATAMTX_SIZEMODE_18X18






5


#define DATAMTX_SIZEMODE_20X20






6


#define DATAMTX_SIZEMODE_22X22






7


#define DATAMTX_SIZEMODE_24X24






8


#define DATAMTX_SIZEMODE_26X26






9


#define DATAMTX_SIZEMODE_32X32






10


#define DATAMTX_SIZEMODE_36X36






11


#define DATAMTX_SIZEMODE_40X40






12


#define DATAMTX_SIZEMODE_44X44






13


#define DATAMTX_SIZEMODE_48X48






14


#define DATAMTX_SIZEMODE_52X52






15


#define DATAMTX_SIZEMODE_64X64






16

-


-


-


-


-


-


-


-



本文更新与2021-02-08 12:34,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/614549.html

MarkEzddll_Manual_EN的相关文章