AM335X-PAC Series User Manual version 2.0.1 Page: 45
Copyright © 2019 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
A serial command must be used to control the I-87KW/97K series module. For more information
about serial command usage, see the chapter
To control the series module, the Com port parameters and call the
Open_Com()
function to open
the COM1 port based on the appropriate settings. Finally, call the
ChangeToSlot(slot)
function to
specify which slot will be controlled, the
I-87KW/97K
series could be necessary. This is like the
serial address, meaning that control commands can be sent to an I/O module that is inserted in
the specified slot. Consequently,
the serial address for the slot that contains the module is
0
. A
detailed example is provided below:
For Example:
int slot=1; char data=8, parity=0, stopbit=1 ;
unsigned char port=1; // for all modules in COM1 port of LP-8x21
DWORD baudrate=115200;
Open_Slot(slot);
Open_Com(port, baudrate, data, parity, stopbit);
ChangeSlotToI-87k(slot);
// send command...
Close_Com(port);
Close_Slot(slot);