ICP CON I-7188XC Series User manual

I-7188XC Series User’s Manual
Warranty
All products manufactured by ICP DAS are under warranty regarding
defective materials for a period of one year, beginning from the date of
delivery to the original purchaser.
Warning
ICP DAS assumes no liability for any damage resulting from the use of
this product. ICP DAS reserves the right to change this manual at any
time without notice. The information furnished by ICP DAS is believed to
be accurate and reliable. However, no responsibility is assumed by ICP
DAS for its use, not for any infringements of patents or other rights of
third parties resulting from its use.
Copyright
Copyright©2007 by ICP DAS Co., Ltd.All rights are reserved.
Trademark
The names used for identification only may be registered trademarks of
their respective companies.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
1

Table of Contents
1. Introduction.................................................................................................. 4
1.1 FEATURES.....................................................................................................................5
1.2 SPECIFICATIONS..........................................................................................................6
1.3 Software and Document information ..............................................................................7
1.4 Hardware Information.....................................................................................................9
1.4.1 Schematics and Dimensions of the I-7188XC(D)....................................................9
1.4.2 Pin Assignment......................................................................................................10
1.4.3 Mounting the I-7188XC(D).....................................................................................12
1.4.4 Block Diagram.......................................................................................................13
1.4.5 Wiring Diagrams for Application ............................................................................14
1.4.6 DI/DO wire connection ..........................................................................................18
1.4.7 Mounting the I/O Expansion Bus...........................................................................19
2. Quick Start..................................................................................................20
2.1 Software Installation .....................................................................................................20
2.2 Connect the Download Cable to the Host PC...............................................................21
2.3 Downloading Programs to the I-7188XC(D) .................................................................23
2.4 MiniOS7 Upgrade.........................................................................................................27
3. Writing Your First Program .......................................................................29
3.1 Libraries........................................................................................................................29
3.2 Compiler and Linker .....................................................................................................30
3.3 The Detailed Steps for Programming............................................................................31
3.3.1 Download Turbo C++ version 1.01........................................................................31
3.3.2 Install Turbo C++ version 1.01...............................................................................33
3.3.3 Set the environment variables of the system.........................................................36
3.3.4 Build and Execute the Program.............................................................................38
4. Operating Principles.................................................................................. 47
4.1 System Mapping...........................................................................................................47
4.2 Debugging custom Programs using COM1..................................................................48
4.3 Using the Download Port as a COM Port.....................................................................50
4.4 Functions and Demo Programs List .............................................................................51
4.5 COM Port Comparison .................................................................................................54
4.6 Using the COM Ports....................................................................................................55
4.6.1 To print from the COM port....................................................................................56
4.6.2 To Use COM1/COM2 for an RS-485 Application...................................................57
4.6.3 To Send a Command to an I-7000 module............................................................57
4.7 Using the Red LED and 7-SEG LED Display ...............................................................60
4.8 Accessing the I-7188XC(D) Memory............................................................................61
4.8.1 Using Flash Memory .............................................................................................61
4.8.2 Using EEPROM.....................................................................................................62
4.9 Using the Watchdog Timer ...........................................................................................64
4.10Using the Timer Function..............................................................................................66
4.11Using Digital Input and Digital output............................................................................67
4.12Using the I/O Expansion Bus........................................................................................69
4.12.1 Definition of an I/O Expansion Bus........................................................................69
4.12.2 Reconfiguring the I-7188XC(D).............................................................................72
4.12.3 I/O Expansion Boards............................................................................................73
5. Applications ............................................................................................... 75
5.1 Embedded Controllers..................................................................................................75
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 2

5.2 Local Real Time Controller (RTC).................................................................................76
5.3 Remote Local Controller...............................................................................................77
5.4 PLC I/O Expansion Application.....................................................................................78
5.5 Radio Modem Application.............................................................................................80
5.6 An Application Using 4 COM Ports...............................................................................82
Appendix A: What is MiniOS7...........................................................................83
Appendix B: MiniOS7 Utility and 7188XW.......................................................86
MiniOS7 Utility.....................................................................................................................86
7188XW...............................................................................................................................88
Appendix C: Comparison Table........................................................................96
Appendix D: Library Function List...................................................................97
Appendix E: Compiling and linking ...............................................................134
Using the TC Compiler ......................................................................................................134
Using the BC++ Compiler..................................................................................................137
Using MSC Compiler.........................................................................................................143
Using MSVC++ Compiler...................................................................................................145
Appendix F: Glossary......................................................................................150
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 3

1.Introduction
The I-7188XC(D) is a series of expandable embedded controllers
designed for industry applications and can be used to replace PC or
PLC devices in harsh environments. The I-7188XC(D) also has support
for an I/O expansion bus, which can be used to implement various I/O
functions, such as D/I, D/O, A/D, D/A, UART, Flash memory, battery
backup SRAM, AsicKey and other I/O functions. Most types of I/O
function can be implemented using this bus. ICP DAS offers more than
20 types of I/O Expansion Board for the I-7188XC(D), which can be
used to expand the features of the controller. Depending on the type of
embedded firmware programs that are being developed, and which I/O
Expansion Board, the I-7188XC(D) can be used as a single versatile
controller.
Package List
In addition to this manual, the shipping package includes the following
items:
One I-7188XC(D) module
One download cable (CA0910)
One companion CD containing software drivers and digital
versions of the user manuals
One copy of the release notes
CA0910F
Note: If any of these items are missing or damaged, please contact
your local distributors for more information. We recommend that you
save the shipping materials and cartons in case you want to ship the
product in the future.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 4

1.1 FEATURES
Embedded 80188 CPU, 20M or compatible
Cost-effective version of I-7188 series
User defined DI/DO
Built-in EEPROM
2 Built-in COM ports: COM1 and COM2
COM driver supports both interrupt and 1K QUEUE input/output
buffer
Support for I/O expansion bus interface (Only one expansion
board can be added)
Three Digital Input Channels
Three Open-collector output Channels
Built-in self-tuner ASIC controller on the RS-485 port
Optional 7-segment LED display
Built-in MiniOS7 by ICP DAS
Program download port: COM1
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 5

1.2 SPECIFICATIONS
CPU module
CPU 80188 CPU, 20MHz or compatible
SRAM 128K bytes
Flash 256K bytes (can be expanded by 512K bytes for OEM)
EEPROM 2K bytes
NVRAM No
RTC (Real Time Clock) No
Hardware Serial Number No
Build-in Watchdog Timer Yes
Communication Interface
COM 1 RS-232/RS-485
COM 2 RS-485
COM 3 No
COM 4 No
Ethernet Port No
Digital Input
Input Channels 2
On Voltage Level +1V/DC Max. (Connect to GND)
Off Voltage Level +3.5V/DC to +30V/DC (For -20°C to +70°C)
+3.5V/DC to +25V/DC (For -20°C to +75°C)
Digital Output
Output Channels 3
Output Type Open-collector
Max Load Current 100mA
Load Voltage +30V/DC Max.
LED Display
1 LED as Power/Communication Indicator
5-digit 7-segment LED (for I-7188XCD only)
Dimensions
119mm x 72mm x 33mm
Operating Environment
Operating temperature -25°C to +75°C
Storage Temperature -40°C to +80°C
Humidity 0 to 90%
Power
Power requirements 10 to 30V/DC (non-regulated)
Power consumption 2.0W for I-7188XC
3.0W for I-7188XCD
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 6

1.3 Software and Document information
The location of all documents and software related to the I-7188XC(D)
on the companion CD are shown in the following directory tree. The
relevant file can quickly be located by referring to the tree.
CD:\Napdos 7188XABC 7188XC Demo BC_TC
MSC
7188XC_DemoList.htm
7188XC.pdf
Document
IO_Expansion_bus_docum
MiniOS7_document.html
Program_Develop_document.html
ent.html
OS_image Xc050628.img
Xboard Demo
Document
Readme.html
iobus_e.pdf
X702X703.pdf
MiniOS7 Utility MiniOS7_utility minios7_utility_V311.exe
Readme.html
7188xw.exe
The documents and software listed above can also be obtained from the
ICP DAS website: http://ftp.icpdas.com/pub/cd/8000cd/napdos. The
folder location of all documents and software on the website is identical
to the companion CD.
The iobus_e.pdf file that is provided in the
CD:\Napdos\7188XABC\Xboard\Document\ folder and the “I/O
Expansion Bus for 7188X/7188E User’s Manual” contain the same
content, so the user can refer to either document for more details
related to the I-7188XC(D) I/O expansion bus.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 7

Before continuing, it is recommended that you read the Readme.html,
which can be found in the CD:\Napdos\7188XABC\7188XC\. The latest
information available prior to shipping will be contained in this file.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 8

1.4 Hardware Information
1.4.1 Schematics and Dimensions of the I-7188XC(D)
Bottom View
Front View
DIN-RAIL MOUNTING
BRACKET
Unit: mm
Side View
Rear View
To
p
View
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 9

1.4.2 Pin Assignment
The pin assignment of 14-pin screw terminal block is as follows:
Pin Name Description
1 X3 Connects to I/O expansion board
2 X2 Connects to I/O expansion board
3 X1 Connects to I/O expansion board
4 DO3 Digital output, 100mA, 30V Max.
5 DO2 Digital output, 100mA, 30V Max.
6 DO1 Digital output, 100mA, 30V Max.
7 DI3 Digital input, 3.5V ~ 30V
8 DI2 Digital input, 3.5V ~ 30V
9 INIT* Initial pin
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 10

10 D2+ DATA+ pin for COM2 (RS-485)
11 D2- DATA- pin for COM2 (RS-485)
12 +VS V+ of power supply (+10 to +30V/DC, unregulated)
13 GND GND for the power supply
The pin assignment for the COM1 connector (DB-9 Male) is as below:
DB9-Male (COM1)
Pin Name Description
1 D1+ DATA+ for RS-485
2 TXD Transmit Data
3 RXD Receive Data
4 N/C No Connection
5 GND Signal ground for RS-232
6 N/C No Connection
7 CTS Clear To Send (RS-232)
8 RTS Request To Send (RS-232)
9 D1- DATA- for RS-485
Note: The COM1 can be used as either an RS-232 or RS-485 port. It is
not recommended to use both RS-232 and RS-485 at the same time.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 11

1.4.3 Mounting the I-7188XC(D)
1. Din-Rail Mounting
2. Stack Mounting
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 12

1.4.4 Block Diagram
80188-20 CPU
or compatible
EEPROM
(2K)
COM2
RS-485
DI: 2 Channel
3.5V to 30V
DO: 3 Channel
100mA, 30V
5-Digit LED
(Optional)
User defined Pin
3 pins
SRAM=128K
Flash Memory=256K Watchdog
Circuit
+10V to +30V
Power Converter
COM1
RS-232/RS-485
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 13

1.4.5 Wiring Diagrams for Application
Program download
COM Port of the PC
RI
9
8
7
6
5
4
3
2
1
CTS
RTS
DSR
GND
DTR
TXD
RXD
DCD
D2+
Init*
DI2
7188XC/7188XCD
+VS
D2-
DI3
DO1
GND
DO2
13
12
11
10
9
8
7
6
5
X
2
X
3
DO3
X
1
4
3
2
1
Ext.GND
Ext. 24V
Connect the INIT* pin
to GND to disable
autoexec.bat
COM1
2
3
4
5
6
7
8
9
TXD
RXD
N/C
GND
N/C
CTS
RTS
DATA-
1DATA+
Download cable
CA0910F
Note: Connect the DB-9 of the download cable to the COM Port of PC.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 14

Using a 3-wire RS-232 Port
RI
CTS
RTS
DSR
GND
DTR
TXD
RXD
DCD
RS-232 Device
RXD
TXD
GND
7188XC/7188XCD
COM1
Note: There are 3 wires as follows:
Connect the RXD to the TXD of the RS-232 device
Connect the TXD to the RXD of the RS-232 device
Connect the GND to the GND of the RS-232 device
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 15

Using a 5-wire RS-232 Port
RI
CTS
RTS
DSR
GND
DTR
TXD
RXD
DCD
RS-232 Device
GND
RTS
CTS
7188XC/7188XCD
RXD
TXD
COM1
Note: There are 5 wires as follows:
Connect the RXD to the TXD of the RS-232 device
Connect the TXD to the RXD of the RS-232 device
Connect the RTS to the CTS of the RS-232 device
Connect the CTS to the RTS of the RS-232 device
Connect the GND to the GND of the RS-232 device
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 16

Using the RS-485 Port
GND
+VS
D2-
D2+
7000 Module
D2-
D2+
7188XC/7188XCD
GND
+VS
10
9
8
7
14
13
12
11
Ext. GND
Ext. 24V
Ext. GND
Ext. 24V
COM1/COM2
Note: The RS-485 interface can directly drive up to 256 I-7000 series
modules without the need for a repeater.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 17

1.4.6 DI/DO wire connection
Digital Input Wire Connection
Input Type ON State
DI value as 0 OFF State
DI value as 1
Relay Contact
TTL/CMOS Logic
Open Collector
Digital Output Wire Connection
Input Type ON State
DO value as 1 OFF State
DO value as 0
Drive Relay
Resistance Load
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 18

1.4.7 Mounting the I/O Expansion Bus
Before mounting:
After mounting:
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 19

2.Quick Start
2.1 Software Installation
Step 1: Insert the companion CD into the CD drive.
Step 2: Copy the 7188XC folder from CD:\Napdos\7188XABC\ to the
Hard Drive of the Host PC.
Step 3: Install the MiniOS7 Utility.
Locate and execute the minios7_utility_v311.exe file from
CD:\NAPDOS\MINIOS7\UTILITY\MiniOS7_utility\ folder or
http://ftp.icpdas.com/pub/cd/8000cd/napdos/minios7/utility/minios7_
utility/
Step 4: Copy the 7188xw.exe file from the CD:\Napdos\MiniOS7\utility\
folder to the PATH directory, for example C:\Windows\.
After all the software is copied to the Host PC, the content of 7188XC
folder should be as follows:
7188XC
Demo Demo programs for the I-7188XC(D)
BC_TC Demo programs for the BC++ and the TC++
compiler
MSC Demo programs for the MSC compiler
7188XC_DemoList.htm Demo list for the I-7188XC(D)
Document Documents related to the I-7188XC(D)
OS_image The MiniOS7 image file matches the demo
programs
Readme.html The detailed description about the 7188XC
folder
Note: The 7188xw.exe file is used as a bridge between the I-7188XC(D)
and the Host PC. Therefore, the 7188xw.exe file must be copied to the
“C:\Windows\” folder to allow it to be executed from any location.
I-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) --- 20
This manual suits for next models
2
Table of contents