Chapter 3 Creating and Editing Screens
Revision May, 2010 3-155
Property Description of Real Image Element
(6) int hmAbortAction();
(7) int hmClose();
Example
4. Brief Explanation of the commands
(1) Command: int hmOpen(const COMM_INFO* pCommInfo);
Input Value: COMM_INFO structure
Return Value: 1: Succeeded , 0: Failed
Explanation: Enable HMI communication. Input the name
of COM Port, such as COM1, COM2 etc.
(2) Command: int SendImageFromFile(LPCTSTR szFileName);
Input Value: File name of the image
Return Value: 1: Succeeded , 0: Failed
Explanation: After converting the input image format into
the width and height of the element, and Bit value, the
system will start to transmit the image to HMI. This
command is a synchronous command. After the data
transmission to HMI is completed, this command will
return.
(3) Command: HANDLE hmAsyncSendImageFromFile(LPCTSTR
szFileName);
Input Value: File name of the image
Return Value: 0: Failed, none zero value: Thread Handle
Explanation: After converting the input image format into
the width and height of the element, and Bit value, the
system will start to transmit the image to HMI. This
command is an asynchronous command. The user can
perform relevant operation by using Thread Handle data.
(4) Command: int hmSendImage(HBITMAP hbmp);
Input Value: HBITMAP Handle in Window
Return Value: 1: Succeeded , 0: Failed
Explanation: After converting the input image format into
the width and height of the element, and Bit value, the
system will start to transmit the image to HMI. This
command is a synchronous command. After the data
transmission to HMI is completed, this command will
return.
(5) Command: HANDLE hmAsyncSendImage(HBITMAP hbmp);
Input Value: HBITMAP Handle in Window
Return Value: 0: Failed, none zero value: Thread Handle