13.07.2015 Views

User manual - ICP DAS USA

User manual - ICP DAS USA

User manual - ICP DAS USA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fig. 8-28.1 Introduction of COM1 Port of LinPAC-8x4xCOM1 is an internal I/O expansion port of the LinPAC-8x4x. This port is used toconnect the I-87KW series module plugged into the LinPAC-8x4x embedded controller.<strong>User</strong>s must use the serial command to control the I-87KW series module. For controllingthe I-87KW module, you must input the Com-port parameters and call the Open_Comfunction to open the com1 port based on the appropriate settings. Finally, the user can callthe ChangeToSlot(slot) function in order to change the control slot. This is like the serialaddress, and you can send out the control commands to the I/O module which is pluggedinto this slot. Therefore the module’s serial address for its slot is 0. A detailed example isprovided below:For Example:int slot=1; char data=8, parity=0, stopbit=1 ;unsigned char port=1; // for all modules in com1 port of LinPAC-8x4xDWORD baudrate=115200;Open_Slot(slot);Open_Com(port, baudrate, data, parity, stopbit);ChangeSlotToI-87k(slot);// send command...Close_Com(port);Close_Slot(slot);LinPAC-8x4x SDK:270

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

Saved successfully!

Ooh no, something went wrong!