請先看『使用說明』
LCM Module:LCM under Linux
From LEXWiKi
Contents |
LCM Module Spec
LCM Module spec and command list :
<Google Drive> LCM-Spec
<FTP> LCM-Spec
The Sample code source you can download from
Source file:
<Google Drive> LCMctl_v2.2L_Src
<FTP> LCMctl_v2.2L_Src
About source code. 1.We suggest using Code::Blocks as an IDE in Linux. 2.Or you can just use "make" to compile the source code in the LCMctlv22LSrc/ folder or LCMctlv22LSrc/src/ folder. And you can excute "lcmctlv22l" file in the LCMctlv22LSrc/src/ folder $cd LCMctlv22LSrc/src/ $make $./lcmctlv22l
Binary file:
<Google Drive> LCMctl_v2.2L_Bin
<FTP> LCMctl_v2.2L_Bin
How to Switch functions
Our LCM module can support TTL and RS232 type,Please make sure your serial port support type,
And switch LCM JUMP as below picture!!
How to use the DEMO application
- COM Port selection
- Confirm COM Port select
- Upline message enter
- Upline message send
- Clear upline
- Lowline message enter
- Lowline message send
- Clear lowline
Sample code Introduction
Open COM Port Device(COM1~COM4)
portinfo_t portinfo1 ={'0' , 9600 , '8', '0' , '0' , '0' , '0' , '0' , '1' , 0 }; portinfo_t portinfo2 ={'0' , 9600 , '8', '0' , '0' , '0' , '1' , '0' , '1' , 0 }; portinfo_t portinfo3 ={'0' , 9600 , '8', '0' , '0' , '0' , '2' , '0' , '1' , 0 }; portinfo_t portinfo4 ={'0' , 9600 , '8', '0' , '0' , '0' , '3' , '0' , '1' , 0 }; //Default tty:COM2
Send the UP line message to LCM Device
char upline[C32]={0x1b,0x51,0x41}; //for LCM UP line command text = gtk_entry_get_text(GTK_ENTRY(entry)); sprintf(upline+3,"%s\r", text); PortSend(fdcom, upline, C32); //Send the message to LCM
Clear the UP line message of LCM Device
char upline[C32]={0x1b,0x51,0x41}; //for LCM UP line command const char *clear = ""; sprintf(upline+3 , "%s\r" , clear); PortSend(fdcom, upline, C32);
Send the LOW line message to LCM Device
char lowline[C32]={0x1b,0x51,0x42}; //for LCM LOW line command text = gtk_entry_get_text(GTK_ENTRY(entry)); sprintf(lowline+3,"%s\r",text); PortSend(fdcom, lowline, C32); //Send the message to LOW Line
Clear the LOW line message of LCM Device
char lowline[C32]={0x1b,0x51,0x42}; //for LCM LOW line command const char *clear = ""; sprintf(lowline+3 , "%s\r" , clear); PortSend(fdcom, lowline, C32);
LCM Command list
Please check the page6 in spec file ,you can download form LCM-Spec