ICP uPAC-5001PD User manual

Category
Software
Type
User manual

This manual is also suitable for

μPAC-5000 User Manual
(C Language Based)
Version 1.0.1, June 2010
Service and usage information for
μPAC-5001 (D) / μPAC-5001P (D)
μPAC-5001-FD (D) / μPAC-5001-FD (D)
μPAC-5002 (D) / μPAC-5002P (D)
μPAC-5002-FD (D) / μPAC-5002P-FD (D)
μPAC-5002-NV (D) / μPAC-5002P-NV (D)
μPAC-5002-SM (D) / μPAC-5002P-SM (D)
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 2
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
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 @ 2009 by ICP DAS Co., Ltd. All rights are reserved.
Trademark
The names used for identification only may be registered trademarks
of their respective companies.
Contact US
If you have any problem, please feel free to contact us.
You can count on us for quick response.
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 3
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
Table of Contents
1. Introduction --------------------------------------------------------------------- 6
1.1. μPAC-5000 (C Language Based) ----------------------------------------------------- 7
1.1.1. μPAC-5000 Release Module -------------------------------------------------------------------- 7
1.1.1.1. General Series ------------------------------------------------------------------------------- 7
1.1.1.2. GPS Series ------------------------------------------------------------------------------------ 7
1.1.1.3. GPRS Series----------------------------------------------------------------------------------- 7
1.1.1.4. GPS & GPRS Series -------------------------------------------------------------------------- 8
1.1.2. μPAC-5000 Module Naming Convention ---------------------------------------------------- 9
1.1.3. μPAC-5000 Comparison ------------------------------------------------------------------------ 10
1.1.3.1. General Series ------------------------------------------------------------------------------ 10
1.1.3.2. GPS Series ----------------------------------------------------------------------------------- 11
1.1.3.3. GPRS Series---------------------------------------------------------------------------------- 12
1.1.3.4. GPS & GPRS Series ------------------------------------------------------------------------- 13
1.2. Features -------------------------------------------------------------------------------- 14
1.3. Specifications ------------------------------------------------------------------------- 18
1.3.1. General Series ------------------------------------------------------------------------------------ 18
1.3.2. GPS Series ----------------------------------------------------------------------------------------- 19
1.3.3. GPRS Series --------------------------------------------------------------------------------------- 19
1.3.4. GPS & GPRS Series ------------------------------------------------------------------------------ 19
1.4. Overview ------------------------------------------------------------------------------- 20
1.5. Dimensions ---------------------------------------------------------------------------- 24
1.6. Companion CD ------------------------------------------------------------------------ 25
2. Getting Started ---------------------------------------------------------------- 26
2.1. Hardware Installation --------------------------------------------------------------- 27
2.2. Software Installation ---------------------------------------------------------------- 30
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 4
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
2.3. Boot Configuration ------------------------------------------------------------------- 32
2.4. Uploading μPAC-5000 Programs -------------------------------------------------- 33
2.4.1. Establishing a connection between PC and µPAC-5000 -------------------------------- 34
2.4.1.1. RS-232 connection ------------------------------------------------------------------------- 35
2.4.1.2. Ethernet Connection ---------------------------------------------------------------------- 38
2.4.2. Uploading and executing µPAC-5000 programs ------------------------------------------ 43
2.4.3. Making programs start automatically------------------------------------------------------- 44
2.5. Updating μPAC-5000 OS image --------------------------------------------------- 46
3. “Hello World” - Your First Program --------------------------------------- 49
3.1. C Compiler Installation -------------------------------------------------------------- 50
3.1.1. Installing the C compiler ----------------------------------------------------------------------- 51
3.1.2. Setting up the environment variables ------------------------------------------------------ 55
3.2. μPAC-5000 APIs ----------------------------------------------------------------------- 58
3.3. First Program in μPAC-5000 -------------------------------------------------------- 59
4. APIs and Demo References ------------------------------------------------ 70
4.1. API for COM Port --------------------------------------------------------------------- 74
4.1.1. Types of COM port functions ----------------------------------------------------------------- 75
4.1.2. API for MiniOS7 COM port -------------------------------------------------------------------- 76
4.1.3. API for standard COM port -------------------------------------------------------------------- 79
4.1.4. Port functions Comparison -------------------------------------------------------------------- 82
4.1.5. Request/Response protocol define on COM port ---------------------------------------- 84
4.2. API for I/O Modules ----------------------------------------------------------------- 85
4.3. API for EEPROM ---------------------------------------------------------------------- 87
4.4. API for Flash Memory --------------------------------------------------------------- 89
4.5. API for NVRAM------------------------------------------------------------------------ 91
4.6. API for 5-Digital LED ----------------------------------------------------------------- 93
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 5
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
4.7. API for Timer -------------------------------------------------------------------------- 95
4.8. API for WatchDog Timer (WDT) --------------------------------------------------- 97
4.9. API for MFS (For µPAC-5000-FD series only) ----------------------------------- 99
4.10. API for microSD -------------------------------------------------------------------- 105
Appendix A. What is MiniOS7? ---------------------------------------------- 110
Appendix B. What is MiniOS7 Utility? ------------------------------------- 111
Appendix C. What is MiniOS7 File System (MFS)? ---------------------- 112
Appendix D. More C Compiler Settings ------------------------------------ 115
D.1. Turbo C 2.01 -------------------------------------------------------------------------- 116
D.2. BC++ 3.1. IDE ------------------------------------------------------------------------- 119
D.3. MSC 6.00 ------------------------------------------------------------------------------ 123
D.4. MSVC 1.50 ---------------------------------------------------------------------------- 125
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 6
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1. Introduction
μPAC-5000 family is a palm size PAC. It can install in narrow space and survive in harsh
environment. For different applications, μPAC-5000 family offers 3 series, μPAC-5000,
LP-5000 and WP-5000. Customers who needs MiniOS7, Linux, or WinCE , all can find a
product to fit their requirement..
μPAC-5000 family offers two CPU types (80186, PAX270), 3 OS solutions (WinCE 5.0, Linux,
MiniOS7) and several software development toolkits (C, VS .NET, ISaGRAF, InduSoft) for
chosen, and all of them are featured same stability and flexibility as ICP DASs PAC family.
This makes μPAC-5000 have a good potential to apply to factory automation, building
automation, machine automation, manufacturing management, environment monitoring,
etc.
Besides, combining one of the optional expansion boards (XW-boards) for μPACs, such as DI,
DO, A/D, D/A, Timer/Counter, communication interface (RS-232/422/485, CAN, FRnet), etc.,
customers can customize the hardware specification of their μPAC-5000 for different
situations.
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 7
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1. μPAC-5000 (C Language Based)
1.1.1. μPAC-5000 Release Module
The μPAC-5000 Series are divided into the General series, GPS series and GPRS series.
1.1.1.1. General Series
μPAC-5000 can be divided into five types, according to their features.
μPAC-5001/μPAC-5001P
μPAC-5001-FD/μPAC-5001P-FD
μPAC-5002/μPAC-5002P
μPAC-5002-FD/μPAC-5002P-FD
μPAC-5002-NV/μPAC-5002P-NV
μPAC-5002-SM/μPAC-5002P-SM
For their comparison, please refer to section “1.1.3.1. General Series”
1.1.1.2. GPS Series
GPS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
1.1.1.3. GPRS Series
GPRS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 8
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.1.4. GPS & GPRS Series
GPS & GPRS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 9
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.2. μPAC-5000 Module Naming Convention
As you examine this manual, you‘ll notice there are many different products available.
Sometimes it is difficult to remember the specifications for any given product. However, if
you take a few minutes to understand the module naming conventions, it may save you
some time and confusion. The figure below shows how the module naming conventions
work for eachμPAC-5000 product.
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 10
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.3. μPAC-5000 Comparison
1.1.3.1. General Series
The following table provides a comparison of μPAC-5000 General Series specifications
Model
CPU
Flash
SRAM
Memory
Expansion
PoE
GPS
μPAC-5001
μPAC-5001P
80 MHz
512 KB
512 KB
microSD
-
Yes
-
-
μPAC-5001-FD
μPAC-5001P-FD
microSD +
64 MB Flash
-
Yes
μPAC-5002
μPAC-5002P
768 KB
microSD
-
Yes
μPAC-5002-FD
μPAC-5002P-FD
microSD +
64 MB Flash
-
Yes
μPAC-5002-NV
μPAC-5002P-NV
microSD +
1 MB NVRAM
-
Yes
μPAC-5002-SM
μPAC-5002P-SM
microSD +
512 KB
Battery
Backup
SRAM
-
Yes
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 11
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.3.2. GPS Series
The following table provides a comparison of μPAC-5000 GPS Series specifications
Model
CPU
Flash
SRAM
Memory
Expansion
PoE
GPS
μPAC-5101
μPAC-5101P
80 MHz
512 KB
512 KB
microSD
-
Yes
Yes
-
μPAC-5101-FD
μPAC-5101P-FD
microSD +
64 MB Flash
-
Yes
μPAC-5102
μPAC-5102P
768 KB
microSD
-
Yes
μPAC-5102-FD
μPAC-5102P-FD
microSD +
64 MB Flash
-
Yes
μPAC-5102-NV
μPAC-5102P-NV
microSD +
1 MB NVRAM
-
Yes
μPAC-5102-SM
μPAC-5102P-SM
microSD +
512 KB
Battery
Backup
SRAM
-
Yes
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 12
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.3.3. GPRS Series
The following table provides a comparison of μPAC-5000 GPRS Series specifications
Model
CPU
Flash
SRAM
Memory
Expansion
PoE
GPS
μPAC-5201
80 MHz
512 KB
512 KB
microSD
-
-
Yes
μPAC-5201-FD
microSD +
64 MB Flash
-
μPAC-5202
768 KB
microSD
-
μPAC-5202-FD
microSD +
64 MB Flash
-
μPAC-5202-NV
microSD +
1 MB NVRAM
-
μPAC-5202-SM
microSD +
512 KB
Battery
Backup
SRAM
-
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 13
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.1.3.4. GPS & GPRS Series
The following table provides a comparison of μPAC-5000 GPS & GPRS Series specifications
Model
CPU
Flash
SRAM
Memory
Expansion
PoE
GPS
μPAC-5301
80 MHz
512 KB
512 KB
microSD
-
Yes
Yes
μPAC-5301-FD
microSD +
64 MB Flash
-
μPAC-5302
768 KB
microSD
-
μPAC-5302-FD
microSD +
64 MB Flash
-
μPAC-5302-NV
microSD +
1 MB NVRAM
-
μPAC-5302-SM
microSD +
512 KB
Battery
Backup
SRAM
-
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 14
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.2. Features
Various CPU and OS for Choosing
MiniOS7
80186 CPU
μPAC-5000 Series
DOS-like
Boot up in 0.4 ~ 0.8 second
Build-in hardware diagnostic
Standard version for C language programming
ISaGRAF version for IEC 61131-3 programming
Local I/O and Communication Expansion Board
The 5000 series equip an I/O expansion bus to support one optional expansion board, called
XW-board. It can be used to implement various I/O functions such as DI, DO, A/D, D/A,
Timer/Counter and various communication interface, such as RS-232/422/485, CAN, FRnet,
etc.
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 15
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
Remote I/O Module and Expansion Unit
With the built-in RS-485 and Ethernet port,
the 5000 series can connect
RS-485/Ethernet remote I/O Units
(RU-87Pn/ET-87Pn) or modules
(I-7000/M-7000/ET-7000). With an
XW-board, the 5000 series can have more
communication ports or different
interface to connect to other
type of devices, for example:
CANOpen devices, DeviceNet
devices, or FRnet I/O
modules.
Multi-Communication Interface
There are several communication interfaces to expand I/O and connect external devices:
Ethernet
RS-232/422/485
USB host
CAN bus
FRnet
GSM/GPRS
GPS
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 16
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
Various Memory Expansions
μPAC-5000 provides various memory storage options, such
as EEPROM, Flash, battery-backup SRAM or microSD.
Customers can choose the memory based on their
characteristics.
16 KB EEPROM: to store not frequently changed
parameters.
microSD: to implement portable data logging
applications.
max. of 2GB on the MiniOS7 platform
max. of 32 GB on Linux and WinCE platforms
64 MB Flash: to implement non-portable data
logging applications.
512 KB battery backup SRAM: to hold data while power lost.
Unique 64-bit Hardware Serial Number to Protect Your Program
A unique 64-bit serial number is assigned to each hardware device
to protect your software against piracy.
Small and Easy Installation
μPAC -5000 series have a slender shape (91
mm x 132 mm x 52 mm) to be install in a
narrow space with DIN-Rail.
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 17
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
Plastic and Metal Housing
The default housing is plastic material, customers can choose metal housing if they want.
Redundant Power Inputs
To prevent the μPAC-5000 from failing by the power loss, the power module is designed with
two input connectors. Once a power input fails, the power module switches to the other
power input. And there is a relay output for informing the power failure.
Highly Reliable Under Harsh Environment
The μPAC-5000 operates in a wide
range of temperature and
humidity.
Operating Temperature:
-25°C ~ +75 °C
Storage Temperature:
-40°C ~ +80 °C
Humidity:
10 ~ 95% RH, non-condensing
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 18
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.3. Specifications
1.3.1. General Series
Models
Regular Version
μPAC5001(D)
μPAC5001-FD(D)
μPAC5002(D)
μPAC5002-FD(D)
μPAC5002-NV(D)
μPAC5002-SM(D)
PoE Version
μPAC5001P(D)
μPAC5001P-FD(D)
μPAC5002P(D)
μPAC5002P-FD(D)
μPAC5002P-NV(D)
μPAC5002P-SM(D)
System Software
OS
MiniOS7 (DOS-like embedded operating system)
Program Upload Interface
RS-232 (COM1) or Ethernet
Programming Language
C language
Compilers to Create .exe Files
TC++ 1.01/TC2.01 (Freeware)/BC++3.1 ~ 5.2x/MSC 6.0/MSVC++ (before version 1.5.2)
CPU Module
CPU
80186 or compatible (16-bit and 80MHz)
SRAM
512 KB
768 KB
Flash
512 KB; erase unit is on sector (64 K bytes); 100,000 erase/write cycles
microSD Expansion
Yes, can support 1 or 2 GB microSD
64 MB NAND Flash Disk
-
Yes
-
Yes
-
1 MB NVRAM
-
Yes
-
512 KB Battery Backup SRAM
-
Yes
EEPROM
16 KB
NVRAM
31 Bytes (battery backup, data valid up to 5 year)
RTC (Real Time Clock)
RTC provide seconds, minutes, hours, date of week/month; month and year, valid from 1980 to 2079
64-bit Hardware Serial Number
Yes
Watchdog Timers
Yes (0.8 second)
Communication Ports
Ethernet
RJ-45 x 1, 10/100 Base-TX (Auto-negotiating, Auto MDI/MDI-X, LED indicators)
COM1
RS-232 (TxD, RxD, RTS, CTS, GND), non-isolated, speed: 115200 bps max.
COM2
RS-485 (D2+, D2-), self-tuner ASIC inside, non-isolated, speed: 115200 bps max.
LED Indicator
Programmable LED Indicators
2
LED Display
5-digit 7-segnment LED display for (D) versions
Hardware Expansion
I/O Expansion Bus
Yes
Mechanical
Dimension (W x H x D)
91 mm x 123 mm x 52 mm
Installation
DIN-Rail
Environmental
Operating Temperature
-25 ~ + 75 ˚C
Storage Temperature
-30 ~ +80 ˚C
Ambient Relative Humidity
10 ~ 90 % RH (non-condensing)
Power
Protection
Power reverse polarity protection
Frame Ground
Yes (for ESD protection)
Input Range
+12 ~ +48 V
DC
Isolation
-
Redundant Power Inputs
Yes
Power over
Regular version
-
Ethernet (PoE)
PoE version
IEEE 802.3af Class 1
Power Consumption
2 W; 2.5 W for (D) version
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 19
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.3.2. GPS Series
GPS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
1.3.3. GPRS Series
GPRS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
1.3.4. GPS & GPRS Series
GPS & GPRS Series coming soon.
Please visit our products page or contact us for more information.
http://www.icpdas.com/products/PAC/up-5000/selection_guide.htm
µPAC-5000 Series (C Language Based) User Manual, Version 1.0.1 Page: 20
Copyright © 2010 ICP DAS Co., Ltd. All Rights Reserved. E-mail: service@icpdas.com
1.4. Overview
Here is a brief overview of the components and its descriptions for module status.
Front Panel
The LED indicators and 5-digit 7-Segnment LED display are on the front panel that provides a
very convenient way of displaying information for faster, easier diagnostics.
LED Indicators
LED indicators are on the front panel of the μPAC-5000, their functions are
summarized in the table below.
Indicator
State
Meaning
L1
Flashing
User programmable LED
L2
OFF
User programmable LED
Link (G)
ON
Ethernet link detected
OFF
No Ethernet link detected
Flashing Green
Ethernet packet received
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128

ICP uPAC-5001PD User manual

Category
Software
Type
User manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI