int port=2; /*to use COM2*/
int i;
InitLib(); /* Initiate the 7188xc library */
InstallCom(port, 115200L, 8, 0, 1); /*install the COM2 driver*/
for(i=0; i<10; i++){
printCom(port, “Test %d\r\n”, i); /*print data from COM2*/
}
RestoreCom(port); /*uninstall the COM driver*/
4.6.2 To Use COM1/COM2 for an RS-485 Application
COM1/COM2 is a 2-wire RS-485 COM Port, and includes the following
2 pins:
D+: connect to the Data+ of the RS-485 network
D-: connect to the Data- of the RS-485 network
COM1/COM2 is a half-duplex 2-wire RS-485 network and cannot be
used in a full-duplex 4-wire application. It is designed to directly drive
I-7000 series modules.
Send/receive directional control in a 2-wire RS-485 network is very
important. Therefore, the I-7188XC(D) is equipped with a Self-Tuner
ASIC controller for all RS-485 ports, which will automatically detect and
control the send/receive direction of the RS-485 network. In this manner,
the application programmer does not have to worry about the
send/receive direction control for the RS-485 network.
4.6.3 To Send a Command to an I-7000 module
The commands used for I-7000 series modules are very different from
those of the I-7188XC(D), but commands can be sent from the
I-7188XC(D) to a I-7000 module using the
ToCom()
function.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
57
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...