![]() |
DM&P Mity-Mite LT200 |
| 2002/07/16 |
| Command | Response | Description |
| [Socket connected] | OK, Password? | LT200 require password to check user. |
| QUIT | N/A | Quit control protocol. |
| set_outputX=Y | OK | X=1~8,Y=0/1. Set output X to Y. |
| get_input_all | XX | XX is a hex code to indicate input status. |
| get_inputX | 0 or 1 | Read input X status. |
| get_icntX | X | X is a number to indicate how many input status changed. |
| set_icntX=Y | OK | Set input status counter. |
About input counter: when input status changed from 0 to 1 or 1 to 0, the counter will be increase one. For example: assume the password of LT200 is "password", we use TcpCtrl.EXE to connect to LT200. It's the work flow:
| TcpCtrl.EXE | LT200 |
| "Connect" button is pressed, connect to LT200. | |
| OK, Password? | |
| password | |
| OK | |
| get_input1 | |
| 1 | |
| get_icnt1 | |
| 12 | |
| TcpCtrl.exe will send a lot of GET command to get status...(omit) | |
| "ON" button of output 1 is pressed, send set_output1=1 | |
| OK | |
| "OFF" button of output 3 is pressed, send set_output3=0 | |
| OK | |
| "Clear" button of input 2 is pressed, send set_icnt2=0 | |
| OK | |
| "Disconnect" button is pressed, send Quit | |
This table will help you to read our source code about TCP control protocol. See CTRL.C of DSOCK_AP project and TcpCtrlDlg.cpp of TcpCtrl project.
| Jan Yin Chan Electronics Co., LTD. All rights reserved. | Email us: info@dmp.com.tw |