User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Starting Your UC-7400-CE Computer
- Resetting Your UC-7400-CE Computer
- Operating UC-7400-CE Computer Via Serial Console
- Changing the Network Settings
- Operating Your UC-7400-CE Computer Via Telnet Client
- User/Group Management
- Adjusting System Time and RTC Time
- Starting and Stopping Services
- Troubleshooting Network Connectivity
- Simple Network Management Protocol (SNMP)
- 3. Web-based Management System
- 4. Application Development
- 5. Programming Examples
- A. Operating Programmable Function Keys and LCM
- B. Firmware Upgrade Procedure
- C. Service Information

UC-7400-CE User’s Manual Programming Examples
5-8
Example #4—LCM Display
Every UC-7420-CE and UC-7410-CE computer is equipped with LCM hardware with a display
area of 8x16. This device offers a simple eye-catching interface for your applications. An internal
service is pre-installed to manage a set of English text fonts for your applications. As an example,
the following program transmits text to the service.
#include <windows.h>
#include <moxa/devices.h>
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
HANDLE hndl;
char *buf="Hi, hello World!!\nabcdefg\n\n1234567890";
unsigned int w, h, x, y;
hndl = mxlcm_open(&w, &h);
if (!hndl)
return 1;
x = 2; y=1;
mxlcm_clear(hndl);
mxlcm_write(hndl, buf, strlen(buf), &x, &y);
mxlcm_close(hndl);
return 0;
}
Upon detecting the character ‘\n’ or ‘\r’ in the received text, the internal service forces a down
shift of a line on the display screen. In addition, the service scrolls up a lengthy portion of text by
dropping its leading part in order to fit the area of the LCM display.
/* open a handle to the LCM devie
<lcm_w> the function outputs the width of the LCM display to this pointer
<lcm_h> the function outputs the height of the LCM display to this pointer
Return nonzero value in success.
*/
HANDLE mxlcm_open(unsigned int *lcm_w, unsigned int *lcm_h);