13.07.2015 Views

User manual - ICP DAS USA

User manual - ICP DAS USA

User manual - ICP DAS USA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Send_CmdDescription:This function only sends a command string to DCON series modules. If thewChkSum=1, it automatically adds the two checksum bytes to the command string.And then the end of sending string is further added [0x0D] to mean the termination of thecommand (szCmd). And this command string cannot include space char within thecommand string. For example: “$01M 02 03” is user’s command string. However, the actualcommand send out is “$01M”.Syntax:[ C ]WORD Send_Cmd (char port, char szCmd[ ], WORD wTimeOut, WORD wChksum)Parameter:port : : [Input] 1=COM1, 2=COM2, 3=COM3..., 255=COM255.szCmd : [Input] Sending command stringwTimeOut : [Input] Communicating timeout setting, the unit=1mswChkSum : [Input] 0=Disable, 1=EnableReturn Value:NoneExample:char m_port=1, m_szSend[40];DWORD m_baudrate=115200;WORD m_timeout=100, m_chksum=0;m_szSend[0] = '$';m_szSend[1] = '0';m_szSend[2] = '0';m_szSend[3] = 'M';Open_Slot(2); // The module is plug in slot 2 and address is 0.Open_Com(m_port, m_baudrate, Data8Bit, NonParity, OneStopBit);Send _Cmd(m_port, m_szSend, m_timeout, m_chksum);Close_Com (m_port);Remark:LinPAC-8x4x SDK:46

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!