Home
iPAC-8000 User Manual
Contents
1. Struct Member Byte Alignment 2 Bytes iPAC 8000 User Manual Version 1 0 beta2 November 2008 128 Step 5 Change the Memory model large for 8000e lib CAC Compiler Ophons x Build Options C Debug Specific Release Specific C Common to Both Options String Cancel nologo Gs G7 W S AL Os 7D NDEBUG YD DOS FR Help Use Project Defaults Category Category Settings Memon Model Code Generation a Custom Options ee Model aaa nent Setup Custom Options C Debug Options Listing Files a Memon Model Optimizations New Segment Data Size Threshold Po P Code Generation Precompiled Headers Preprocessor Segment Hames Assume extern and Uninitialized Data far Step 6 Remove the xcr afxcr library from the Input Category Linker Options Build Options C Debug Specific Release Specific Common to Both Options String fLIBS wer LIB afec LIB oldnames LIB shbce NOL STACK 5120 ONERROR NOESE OLOGO Help Use Project Defaults Cancel Category Memory Image Miscellaneous Output Remove the xcr and afxer M Distinguish Letter Case iPAC 8000 User Manual Version 1 0 beta2 November 2008 129 Step 7 Remove the OLOGO option from the miscellancous Category Linker Options E3 Build Options C Debug Specific Release Specific C Common to Both Options String LIB scr ALIB ahacr ALIB oldnames
2. int data 0xAA55 data2 char dataptr char amp data InitLib Initiate the 8000a library WriteNVRAM 0 dataptr Write the low byte WriteNVRAM 1 dataptr 1 Write the high byte dataptr char amp data2 dataptr ReadNVRAM 0 Read the low byte dataptr 1 ReadNVRAM 1 Read the high byte gt For more demo program about the NVRAM and RIC please refer to CD NAPDOS iPAC8000 Demo Basic misc http fto icodas com pub cd 8000cd napdos ipac8000 demo basic misc iPAC 8000 User Manual Version 1 0 beta3 February 2009 105 4 6 API for 5 Digit LED o The iPAC 8000 contains a 5 Digit 7 SEG LED with a decimal point on the left hand side of each digit which be used to display numbers IP addresses time and so on API for controlling the 5 Digit 7 SEG LED 1 InitsDigitLed Before using any LED functions the InitsDigitLed must be called to initialize the 5 Digit 7 SEG LED API for displaying a message on the 5 Digit 7 SEG LED 2 Show5DigitLed After the InitsDigitLed is used to initialize the 5 Digit 7 SEG LED the Show5DigitLed must be called to display information on the 5 Digits 7 SEG LED iPAC 8000 User Manual Version 1 0 beta3 February 2009 106 For example use the following code to display 8000E on the 5 Digit 7 SEG LED include lt stdio h gt include 8000A h void main void InitLib Initiate the 8000a libra
3. LIB sibee NOL STACK 5120 ONERROR NOESE OLOGO Help Cancel Use Project Defaults Category Category Settings Miscellaneous Input Memory Image Miscellaneous Output Remove the OLOGO Step 8 Rebuild the project cap Microsoft isual C HELLO MAE File Edit View aja Browse Debug Tool Options Window Help HELLO MAE Compile wild HELLO EXE ap lt 1 gt Output Initializing Compiling c N7 18 8za deno mac gt hellohello c Linking Microsoft iF Segmented Executable Linker Version 5 60 3399 Dec 5 1994 Copyright C Microsoft Corp 1984 1993 All rights reserved Object Modules obj NOI ZSTACEK 5120 ONERROR NOEEE HELLO OBJ Ohject Modules obj Fun File HELLO exe HELLO EXE List File c HELLO map nul Libraries lib c meveo libyt Libraries lib c smeave michli b Libraries lib LIB 7188EAL LIB Libraries lib oldnames Libraries lib llibce Creating browser database HELLO EXE 0 error s 0 warning s iPAC 8000 User Manual Version 1 0 beta2 November 2008 130 Appendix H Application of RS 485 Network The RS 485 length can be up to 4000 ft or 1 2 km over a single set of twisted pair cables if the RS 485 network is over 4000 ft or 1 2Km the RS 485 repeater must be added to extend the RS 485 network H 1 Basic RS 485 network The basic component of the RS 485 network consist of
4. include 8000A h void main void Unsigned long time iTime InitLib Initiate the 8000a library TimerOpen While quit If Kbhit TimerResetValue Reset the main time ticks to O iTime TimerReadValue Read the main time ticks from 0 TimerClose Stop using the 8000e timer function gt For more demo program about the timer please refer to CD NAPDOS iPAC8000 Demo Basic timer http fto icodas com pub cd 8000cd napdos ipac8000 demo basic timer iPAC 8000 User Manual Version 1 0 beta3 February 2009 109 4 8 API for WatchDog Timer WDT o The default WatchDog timer WDT value for the iIPAC 8000 module is fixed at 0 8 seconds for MiniOS7 version 2 0 o When the iPAC 8000 is first powered on the WatchDog Timer will always be enabled o The MiniOS7 for the iPAC 8000 will automatically refresh the WatchDog Timer after being powered on The software driver can be called by a user program to prevent the MinOS7 from refreshing the WatchDog Timer API for refreshing WDT 1 EnableWDT The WDT is always enabled before user s programming to refresh it the EnableWDT must be called to stop refreshing WDT 2 RefreshWDT After EnableWDT stop refreshing WDT the RefreshWDT must be called to refresh the WDT 3 DisableWDT After user s programming to refresh WDT the DisableWDT should be called to automatically refresh the WDT i
5. lO_in_ Slot 87K DI This demo program is used by 87K series DI modules in ComO such as 87040 87051 etc 87024 This demo program is used by the 87024 AO module more demo programs gt I 7K and l 87k series modules for RS 485 Network Applications Folder Demo Explanation 7K87K_DI_for_Com COM Port can be used to connect and 7K87K_DO_for_Com control I 7k or l 87k series modules 7K87K Al for Com For iPAC 8000 module and can use 7K 87K_for_ Com AO_22 26 for Com OMe OMS For iPAC 8000 module and CPU 40 and AO_024_for_Com 80M can use COM3 COM4 For more information about these demo programs please refer to CD NAPDOS iPAC8000 Demo Basic iPAC 8000 User Manual Version 1 0 beta3 February 2009 82 4 1 API for COM port o The iPAC 8000 includes five COM ports iPAC 8000 User Manual Version 1 0 beta3 February 2009 83 4 1 1 Types of COM port functions o There are two types of functions below for using COM port 1 MiniOS7 COM port functions 2 C style Standard COM port functions You have the alternative of MiniOS7 COM ports functions or C style AN Standard COM port functions If you choose the ones then the another can not be used o Summarize the results of the comparison between MiniOS7 COM port functions and C style Standard COM port functions Kinds of Functions i Check Send Read Show Functions RX TX data data
6. J re Figure B 1 gore Connect to the Earth Ground iPAC 8000 User Manual Version 1 0 beta3 February 2009 112 Figure B 2 Appendix B Redundant Power The WinPAC 8000 provides two power inputs that can be connected simultaneously to live DC power sources If one of the power inputs fails the other live source acts as a backup to automatically support the the WinPAC 8000 s power needs The WinPAC 8000 provides relay contact outputs to warn technicians on the shop floor when the power fails Back up Power Supply Rela y utput 24 VDC Power Supply iPAC 8000 User Manual Version 1 0 beta3 February 2009 113 Appendix C I 8k and I 87k serial modules There are 1 4 8 slot options to expand local I O And the I O modules can be parallel bus type high profile I 8k series and serial bus type high profile l 87k series The difference between them is tem 8 Series 87k Series Microprocessor No es 8081 Communication interface Parallel bus Communication speed Fast Slow DI latched function No Yes Counter input for digital input module Yes 100 Hz Power on value ven Programmable slew rate for AO module Nooo ds Yes iPAC 8000 User Manual Version 1 0 beta3 February 2009 s 114 Appendix D What is MiniOS7 MiniOS7 is an embedded ROM DOS operating system design by ICP DAS It is functionally equivalent to other brands of DOS and can run programs that are exec
7. Step 10 Installation is complete iPAC 8000 User Manual Version 1 0 beta3 February 2009 61 3 1 2 Setting up the environment variables After installing the compiler several compilers will be available from the Windows Command line You can set the path environment variable so that you can execute This compiler on the command line by entering simple names rather than by using Their full path names Step 1 Right click on the My Computer icon on your desktop and select the Properties menu option PE r EE Right click My Computer Open and then select Properties Explore Search Manage Map Network Brive Disconnect Wekwork Drive Create Shortcut Delete Rename System Properties Properties System Restore Automatic Updates Remote General ComputerName Hardware Advanced Sister Microsoft Windows sF Professional Version 2002 Registered to pthuang icp ABS 4 640 0000356 23006 Computer AMD F6 tm 30 processor 451 MHz 192 MB of RAM iPAC 8000 User Manual Version 1 0 beta3 February 2009 62 Step 2 On the System Properties dialog box click the Environment Variables button located under the Advanced sheet Step 3 On the Environment Variables dialog box click the Edit button located in the System variables option System Properties 1 System Restore Automatic Updates Remot General Computer Mane
8. settings and then click the Set button DHCP Disable Enable Cancel Step 7 On the Confirm dialog click the Yes button to exit P TP setting seces u Do you want to leave IF tting dialog iPAC 8000 User Manual Version 1 0 beta3 February 2009 43 Step 8 Click the New connection from the Connection menu MiniOS7 Utility Verion 3 1 7 3 Jy File gt Connection i Command Configuration New connection Lookie Last Connection AI F2 d T Disconnect Ctrl F2 p Name i w bin Search Fiz fer FIRMWARE File Folder 5 0S_IMAGE File Folder a 1K68 Intemet Shortcut evnilication F whe Step 9 On the Connection dialog box select TCP from the drop down list and enter the IP which just assigns es Connection Connection History TCF senal Port Baud Rate 115200 Data Bit Parity OM one Stop Bit iIPAC 8000 User Manual Version 1 0 beta3 February 2009 44 Step 10 The connection has already established P MiniOS Utility Verion 3 1 7 3 G File lj Connection de Command F Sanaa T Tools Help Disconnected Connected IPAC 8000 User Manual Version 1 0 beta3 February 2009 45 2 3 1 3 Steps to establish a USB connection using a l 7560 converter Step 1 Connect iPAC 8000 to the PC or Laptop using a l 7560 converter For more information about l 7560 converte
9. Utility Verion 3 1 7 3 G File lj Connection de Command F Sanaa T Tools Help Disconnected Connected IPAC 8000 User Manual Version 1 0 beta3 February 2009 48 2 3 1 4 Steps to configure dual Ethernet using a COM1 connection Step 1 Establish a connection using the COM1 connection For more detailed description on how to establish a connection using the COM1 connection please refer to section 2 3 1 1 Steps to use a COM1 connection b r UN 7 Pa gt AN e i Power supply Step 2 Run the MiniOS7 Utility zf Mms Utility Yer 3 18 iPAC 8000 User Manual Version 1 0 beta3 February 2009 49 Step 4 Click the IP Address from the Configuration menu P MiniOS7 Utility Yerion 3 1 8 Fie gt Connection e Command Z Configuration Tj Tools Help Look in Mini0S7_Ultility oe a Date Time Name Obin COM Port baud rate OFIRMWARE GiS File Folder R 47312b3e Step 5 On the MiniOS7 IP Address dialog box select Ethernet1 tab to configure LAN1 select Ethernet2 tab to configure LAN2 LAN1 L 22 Minigg KSX LAN2 Gateway P MiniOS7 IP Addy SEE Alias E thero an IP 10 0 5 159 Mask 255 255 255 0 Gateway 255 255 255 2A check sum Reset Minii S Cancel iPAC 8000 User Manual Version 1 0 beta3 February 2009 5
10. Versions 3 1 5 2 x o MSC o MSVC AN ICP DAS suggests that the Borland C version compiler is used as the libraries provided on the companion CD have been created using this compiler Special attention should be paid to the following items before using the compiler to develop custom applications o Generate a standard DOS executable program o Set the CPU option to 80188 80186 o Set the floating point option to EMULATION if floating point computation is required Be sure not to choose 8087 o Cancel the Debug Information function as this helps to reduce program size MiniOS7 supports this feature iPAC 8000 User Manual Version 1 0 beta3 February 2009 56 3 1 1 Installing the Compiler lf there is no compiler currently installed on your system installation of the compiler should be the first step The following section guides you to install Turbo C Version 1 01 on your system Step 1 Go to the Borland web site and download Turbo C version 1 01 i EMBARCADERO FJ TECHNOLOGIES Hore Products Sobtions Support Developer Network Ecc ation Dowiihocds How t CDN gt C Tools Other 0 Submit Translation Author P Antique Software Turha C version 1 01 By David Intersimone stract Turbo LE Click here eWonoted the C language The C How to Download _ winstall Turbo C version 1 01 Click on Turbo C V rsion 1 01 to download the software 2 7mb software use wan Y Zip utility
11. enabled as shown below JP1 Pull Low Enable JP2 Pull High Enable J iPAC 8000 User Manual Version 1 0 beta2 November 2008 137 When iPAC 8000 as a master using COM3 communication interface the pull high pull low resistor located on the power board must set to Master as shown below COM3 RS 485 Hea a Ll iPAC 8000 User Manual Version 1 0 beta2 November 2008 138 H 5 2 IPAC 8000 as a slave For most of application when using one 7520 series as RS 232 485 converter its pull high pull low resistors are set to enabled Then the iPAC 8000 and all the other devices on this network must be slave mode the pull high pull low resistors must be disabled lf there are repeaters on the RS 485 network there will be pull high pull low resistors on both sides of the repeaters l 7510 292 485 Converter 7520 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 139 When iPAC 8000 as a master using COM2 communication interface the pull high pull low resistor located on the power board must adjust to disabled as shown below JP1 Pull Low Disable Default JP2 Pull High Disable Default iPAC 8000 User Manual Version 1 0 beta2 November 2008 140 When iPAC 8000 as a master using COM3 communication interface the pull high pull low resistor located on the power board must set to Slave as shown below COM3 RS 48 Mast er 4 iPAC 8000 User M
12. iIPAC 8000 User Manual Version 1 0 beta3 February 2009 Step 13 Use the MiniOS7 Utility to connect the iPAC 8000 For more detailed information about this process please refer to section 2 3 1 Establishing a connection Minis Utility Ver al Bee pars ae A MiniOS Utility Verion 3 1 7 R File lb Connection gt da Command Configuration L New connection F F Y ni Last Connection Alt F2 Disconnect Ctrl F2 Name ce fer Folder Folder emet Shortcut nication Estas Z Connection e 5 x Connection TLPAUBP Lock in Disk 4 Name Type No Name S Modified bin File Falder FIRMWARE File Folder 05_IMAGE File Folder icpdas TRE Internet Shortcut X load 232 dll SEKE Application Extens 2 Mini0S7_Utility chm 1 025KB Compiled HTML H A Mini0S7_Utilty exe 2 055KB Application l uart dll BEKE Application Estensi unini dat ORB DAT File iSl unins000 exe BORE Application iPAC 8000 User Manual Version 1 0 beta3 February 2009 78 Step 14 Upload and execute files For more detailed information about this process please refer to section 2 3 2 UPloading and executing programs on iPAC 8000 Lis oh FF PL dasdetir tie oO re ee MINIS S Unb Teron 3 1 7 3 BF File gt Connection de Command Configuration Tools 4 Help Look in C Hello Lock in Disk A a Mame Size Mame Size Modif
13. like PKZIP or WinZip to f conformed to i l l tools ran und drive Turbo C vers A 1 01 shipped on 4 floppy disks The zip Era ita e release of tht How to Download and _ f il Turbo C version 1 01 Click on Turbo C version 1 01 to download the software 2 7mb When you are finished downloading the software use your favorite zip utility like PKZIP or Winzip to decompress the zip file to a folder on your hard drive Turbo C version 1 01 shipped on 4 floppy disks The zip fle contains all the files that were on the 4 floppy disk images nn n neal drive Run the Install ex program and follow the _ iets a A N Free versions of the Turbo C version 1 01 and Turbo version 2 01 Compilers can be downloaded from the Borland web site o Turbo C version 1 01 http dn codegear com article 21751 o Turbo C version 2 01 http dn codegear com article 20841 iPAC 8000 User Manual Version 1 0 beta3 February 2009 57 Step 2 Unzip the downloaded zip file to the temporary folder tepplol Step 3 Double click the executable file to start setup wizard INSTALL Step 4 Press Enter to continue o CADOCUME 1 VWser mtcpp101 UNS TALL EXE Turbo G 2nd Edition Installation Utility Copyright lt c 1991 by Borland International Inc Install Utility Welcome to the Turbo G installation program This program will copy the files needed to install Turbo G on your system You will need about 7 5
14. program about the Flash memory please refer to CD NAPDOS iPAC8000 Demo Basic misc http fto icodas com pub cd 8000cd napdos ipac8000 demo basic misc iPAC 8000 User Manual Version 1 0 beta3 February 2009 103 4 5 API for NVRAM and RTC o The iPAC 8000 is equipped with an RTC Real Time Clock and 31 bytes of NVRAM memory can be used to store data o NVRAM is the same as SRAM but it uses a battery to retain the data so the data store in the NVRAM is not lost when the module is powered off and can be used for 10 years o NVRAM has no limit on the number of times the data can be written Both Flash and EEPROM both have a limit on the numbers of data can be re written API for writing data to the NVRAM 1 WriteNVRAM The WriteNVRAM must be called in order to write data to the NVRAM API for reading data from the NVRAM 2 ReadNVRAM The ReadNVRAM must be called in order to write data to the NVRAM iPAC 8000 User Manual Version 1 0 beta3 February 2009 104 For example use the following code to write data to the NVRAM address 0 include lt stdio h gt include 8000A h void main void int data 0x55 data2 InitLib Initiate the 8000a library WriteNVRAM 0 data data2 ReadNVRAM 0 Now data2 data 0x55 For example the following can be used to write an integer two bytes to NVRAM include lt stdio h gt include 8000A h void main void
15. rights reserved Hello c C 188xXA Demo MSc Hello gt link MA NOE NOI Hello 1l1b 188xal 683 Segmented Executable Linker Version 5 10 C Microsoft Corp 1984 1990 All rights reserved C 7188XA Demo MSC Hello gt del obj C 7188XA Demo MSC Hello gt del map C 7188XA Demo MSC Hel lo gt m IPAC 8000 User Manual Version 1 0 beta3 February 2009 Step 3 A new executable file will be created if it is successfully compiled cy C FINDOWS S ystem32 cmd exe c 7188XA Demo MSC Hel lo gt dir Volume in drive C has no label Volume Serial Number is 1072 89A3 Directory of C 7188xXA Demo MSC Hel lo 17 08 17 08 17 03 16 47 17 08 l Ianni 3 Files 7 496 bytes 2 Dir s 22 041 571 328 bytes free C 7188XA Demo MSC Hel lo gt _ iPAC 8000 User Manual Version 1 0 beta2 November 2008 126 G 4 MSVC 1 50 Step 1 Run MSVC exe Microsoft Visual C DEMOA MAK Wiew Project Browse Debyg Toole Options Window Help lt 2 gt DATISBE ICPLESER YER DEMO MSYC1 S DEMOD4 USER C anclude catrina h gt include include void Use oe List Files of Type O KRBU voii Project mak E E a ICPDATA T Step 2 Create a new project mak by entering the name of the project in the Project Name field and then select MS DOS application EXE as the Project type Hew Project h Project Name Project Type windows application EE j M Use Mic
16. to make the program hello run on start up MiniOS Utility Verion 3 1 DJ Fie Connection Command coghouration T Tools E Help hi RAER E EEEE a a er a a ee aaa a a aaa a a a a aaa eel O01 T0000 000000000 00000000000 00000000000 000 0000 00 000 0 0 0 000 000 000 000 000 000 000 0 00 0 00 0 0 0 0 0 000 000 0 0 0 0 0 000 00 10 i Hii J z Look m Name nize Type No Name Size Modified bn File Folder 0 hello exe 138 928 2008 6 9 iO FIRMWARE File Folder AUIOGHEC 25 2005 8 9 9 05_IM4Ge File Folder Icpdas load One is the Hello application file and the other is the autoexec bat batch file P autoexec Note Pad Files Edit options O View Help hello exe autoexec bat batch file iPAC 8000 User Manual Version 1 0 beta3 February 2009 52 2 4 MiniOS7 Utility for updating OS image ICP DAS will continue to add additional features to MiniOS7 in the future we advise you periodically check the ICP DAS web site for the latest update to MiniOS7 Step 1 Get the latest version of the MiniOS7 OS image The latest version of the MiniOS7 OS image can be obtain from CD NAPDOS IPAC8000 0S_Image http ttp icodas com pub cd 8000cd napdos ipac8000 os image Number of MAC img Type CPU Type Step 2 Establish a connection For more detailed information about this process please refer to section 2 3
17. 0 2 3 2 Uploading and executing programs on iPAC 8000 Step 1 On the host pc file list Right click on the file name that you wish to upload and then select the Upload option P MiniOS 7 Utility Yerion 3 1 7 EF File gt Connection Command Configuration Tools 3 Help sd Look ir O Hello k Lock in Disk A ka aP Size Type Mo Mame Size Modified 18KB Application Upload Upload amp Execut RAM Update Mauls Image Die F11 Host PC file list aaa Controller file list Step 2 On the controller file list Right click on the file name that you wish to execute and then select the Run option Look in C Hello E Lock in Disk a Mame Size Ty Name Size Modified P Hello 18 KB Ap bea 220 hello exe cx FI88E HW 1 31 COM1 115200 4 8 1 FC 0 C TS 1 DIR C Document4 Ps User Hello__ a x E Evn with parameters Begin Key Thread Reset Minus F4 Erase Disk C837_U2 2_UDP gt run 6 Hello 8606 lt Flash memory is 512 E gt C83 7 _U2 2_UDP gt _ a _ iIPAC 8000 User Manual Version 1 0 beta3 February 2009 2 3 3 Making programs start automatically After upload programs on the iPAC 8000 if you need programs to start automatically after the iPAC 8000 start up it is easy to achieve it to create a batch file called autoexec bat and then upload it on the iPAC 8000 the program will start automatically in the next start up For example
18. 0 module contains 512K bytes of Flash memory o MiniOS7 uses the last 64K bytes the other parts of the memory are used to store user programs or data o Each bit of the Flash memory only can be written from 1 to 0 and cannot be written from 0 to 1 o Before any data can be written to the Flash memory the flash must be erased first which returns all data to OxFF meaning that all data bits are set to 1 Once their is completed new data can be written API for writing data to the Flash Memory 1 FlashWrite The FlashWrite must be called to write data to the Flash Memory API for reading data from the Flash Memory 2 FlashRead The FlashRead must be called to read data from the Flash Memory iPAC 8000 User Manual Version 1 0 beta3 February 2009 102 For example to write an integer to segment OxDO00 offset 0x1234 of the Flash memory include lt stdio h gt include 8000A h void main void int data 0xAA55 data2 char dataptr int dataptr2 InitLib Initiate the 8000a library dataptr char amp data FlashWrite 0xd000 0x1234 dataptr FlashWrite 0xd000 0x1235 dataptr Read data from the Flash Memory method 1 dataprt char amp data2 dataptr FlashRead 0xd000 0x1234 dataptr 1 FlashRead 0xd000 0x1235 Read data from the Flash Memory method 2 dataptr2 int far MK_FP 0xd000 0x1234 data data gt For more demo
19. 009 30 For example Pin Assignments and Wiring connections for the i 87054 module are as follows 87054 DI COMO DIO Dit DI2 DI3 Did DIS DIG DI7 Doo Dot po2 D03 DO4 D05 DO6 D07 DO GND DO GND DO PWR DO GND DO GND DO PNRA 20 ARAAAAAAAAA p Esla E08 Anaien 1S Rely Close me el TTL CMOS Logic Oo DI COM as 8S ocom DS 08 ox ps 08 pix NPN Output Wiring con Open Collector Off 08 DI com A oS DI com Fal a ae Ea nections us Dx s H 06 pI com ma om 1S erg HSE n 16 iPAC 8000 User Manual Version 1 0 beta3 February 2009 31 Step 2 Connect the wires Step 3 Insert the I O module IPAC 8000 User Manual Version 1 0 beta3 February 2009 32 2 2 Software installation All software resources are included on the companion CD the following steps will help you to install the resources and software from the companion CD Step 1 Copy the Demo folder from the companion CD to the Host PC The folder is an essential resource for users developing custom programs which contains libraries header files demo programs and more information as shown below CD Napdos 1AN 010100 DI 140 Basic 7K8 7K_for_ COM O10 V i mxe ars _ Timer Framework FW_Demo01_ Client FW_Demo02_Server Ejo Xserver X
20. 024yy 8024 WEW j 803 yy 803r e B040 a040 MEW j 8040P MEW j 804744y o044 j o047 A b j S042yy 8042 l 87K series I O modules High Profile i37K series V0 modules The communication interface is serial bus RS 465 and the protocol is OCON 87K series modules are classed as High profile tcan be plugged in incon Lingon e000 WinPAC LinPAC and iPAC 8000 controllers and RU 87 Pn USB 87Pn I 67 RF 87E KO expansion units Low profile It can be plugged in ingon Lingon 8000 controllers and i e K RF 8 7K KO expansion units Type High Profile j 87005Vy NEW j 87013Vy MEW j 87015 MEW j 87015P b j 8701 by MEW j 8701 yy MEW j 87017 AS5 j Maloglo Modules Nes ETOR Selection Guidej MEW i 87018 iPAC 8000 User Manual Version 1 0 beta3 February 2009 Low Profile Max baudrate Description FoF OTS FoF ot Slew rate of AQ channels 115 2 Kops are programmable 29 Step 1 Read the relevant documentation Y Manual o The document for I 8k series I O modules High Profile is located at CD NAPDOS DCON IO_ Module fto ftp icodas com pub cd 8000cd napdos dcon io module o The document for l 87k series I O modules High Profile is located at CD NAPDOS DCON IO_ Module ftp ftp icodas com pub cd 8000cd napdos dcon io_ module All documents includes the I O module specifications pin assignments and wire connections IPAC 8000 User Manual Version 1 0 beta3 February 2
21. 1 Establishing a connection iPAC 8000 User Manual Version 1 0 beta3 February 2009 53 Step 3 Click on the Update MiniOS7 Image from the File menu PA MiniOS7 Utility Verion 3 1 Update Minis Image Hot List Ctr O Exit Alt Y FIRMWARE Q0S_IMAGE 2 icpdas X load232 al J ie b pal T Tools Help Lack in Disk fh Mame Step 4 Select the latest version of the MiniOS7 OS image Select MimOS7 Image file May Recent Documents My Computer mm File name My Network Save as type IPAC 8000 User Manual Version 1 0 beta3 February 2009 Save in O OS_Image O p e g Size VVVITITT Modifie Step 5 Click on the Update MiniOS7 Image from the File menu MiniOS Utility Ferion 3 X Please weit a while for rebooting Step 6 Click on the Info buttion to check OS image version IPAC 8000 User Manual Version 1 0 beta3 February 2009 99 3 Your First Program on iPAC 8000 Before writing your first program ensure that you have the necessary C C compiler and the corresponding functions library on your system 3 1 Setting up the compiler The following compilers are available for iPAC 8000 o Turbo C Version 1 01 Freeware o Turbo C Version 2 01 Freeware o Borland C
22. 1 4 1 ma e7 41 oc ccccccceeeeeeeeeeeeeeeeeeeeseeeeeeseeeeeesseeeeeseeeeeeseeeeeesseaeeeeseeeees 20 UA WOO accent cect aiaeat ct E 21 Tos COMPANION D eee Ere E e E EE ere ee eee ee eee 22 PE EE E A E E EE 23 2 1 Hardware installation cccccccccceccceceseeeeeceeseeeseeeeeeeeeeeeeseeeseeeseeesueeseeseeeseeeaes 23 Zelela WASTAUINIG IC MeO O00 ixct ar stes cies acetatasataratasatesctetaiatelaracctatesaietaretaazeterane 23 2 1 2 Operation modes of iIPAC 8000 ccccecccceeeeeceeeeeseeeesseeeesseeeesaeeeesaees 25 eles MASCIUING 16 WO MOGUIC ee E E EE 28 Pee SOWIE IMSlal AON acarcace cacveeah aaceuearsacvanssaaavaiaiuadvseaicadvaeahaadesecicavunesaaaiaaaeaaeees 33 2 3 MiniOS7 Utility for downloading Programs cccccccseeeeceeeeeseeeesseeeeeseeeesaeeeeeas 35 2 3 1 Establishing a connection between the PC and the iIPAC 8000 36 2 3 2 Uploading and executing programs on iPAC 8000 cccceseeeeeeeeees 51 2 3 3 Making programs start automatically cc cceececseeeeeeeeeeeeeseeeeeseeeeeeeeens 52 2 4 MiniOS7 Utility for Updating OS IMAaQE ccecceceeeeeceeeeeseeeeeeeeesseseeeseeeesaeeeees 53 3 Your First Program On IPAC 8000 cccccccceeeeceeeeceeeseeeeseeeeseueeseueeseeseseueeseueeseusesaees 56 3 1 Setting up the compiler 0 0 cece ceeeecaeeeeceeeeeceeeeeceeeeeseusesseeesseeeesseeesaeeeeas 56 Ski MSANE COMPING ssania 57 3 1 2 Setting up the envir
23. 16 Si EHIS 2 COM Ports Functions 4 Pages i Layers Y Bookmarks Bookmarks DS 2 1 9 DataSizelnCom T 2 1 10 GetTxBufferFreeSize DS 2 1 11 GetCtsStatus By 2 1 12 InstallComlnputData l 7188 serieg FE 2 g CurlTo X DS 2 1 13 IsCom 7180 F 344 CurpTE T 2 1 14 IsTxBufEmpty ski UF A o DY 2 1 15 IsComOutBufEmpty l 7188EN__ l Foie lebeteciBeeak IS 2 1 5 fCtsContralMode x ee a l 8000 series S 2 1 6 RtsContralhode x i WA 2 1 18 RestoreCom BrT T 2 1 19 ReadCom Fe 317 ClearComm DY 2 1 20 ReadComn a 5 D 2 1 21 SetComTimeout FE 242 Clearl Buffer m 9 2 1 22 SetComPortBufferSize T 2 1 23 SetCtsControlMode v introduction FE Aa L DataSsizelnloam lt gt a a g FE 2 1 10 GetlsBufferF reeSize A 2 1 11 GetCtsStatus D 2 1 12 InstallComlnputData IS 2 1 13 IsCom A 2 1 14 lsTxBufEmpty A 2 1 15 IsComOutBufEmpty IS 2 1 16 IsDetectBreak 5 2 1 17 printCom Fe 2 1 18 RestoreCom A 2 1 19 ReadCom A 2 1 20 ReadComn A 2 1 21 SetComTimeout A 2 1 22 SetComPortBufferSize A 2 1 23 SetCtsControllode 4 il gt A Attachments a T o rt iPAC 8000 User Manual Version 1 0 beta3 February 2009 66 o System Structure Usars yearver Areata asic ooolu uton ae ramewor Solution Solution Library V8A_ 3230 Lib MFW09313 Lib Loval VxComm h MFW h TCPDM32 Lib TCPIP32 h a N 1 8000A Lib 8000A h LAI iPAC 8000 User Manual V
24. 2 x 111 mm o IP 8811 354 x 1382 x 111 mm Operating Environment o Operating Temperature 250 5C o Storage Temperature 30C 85 C o Humidity 5 95 Non condensing IPAC 8000 User Manual Version 1 0 beta3 February 2009 1 3 Overview 1 3 1 IP 8441 comrae Bream 10 s nigrareos BRE Fame Ground 12 4 Push button IEEE Slot 0 3 PWR1 T COM4 RS 232 PWR Netw 1 2 3 4 6 5 8 iPAC 8000 User Manual Version 1 0 beta3 February 2009 18 1 3 2 IP 8841 COM3 RS 232 RS 485 SFT Relay Alarm COM1 RS 232 if COM2 RS 485 12 3 Programmable D ricors BE a 1 2 cictaeos RM ramecround A 5 iPAC 8000 User Manual Version 1 0 beta3 February 2009 19 1 4 Dimension 1 4 1 iP 8444 230mm p l Top View Front View Left Side View Right Side View iPAC 8000 User Manual Version 1 0 beta3 February 2009 20 1 4 2 iP 8841 994mm amp i d Top View j VIPON Front View Left Side View Right Side View iPAC 8000 User Manual Version 1 0 beta3 February 2009 1 5 Companion CD This package comes with a CD that includes the following software and documention CD Napdos iIPAC8000 Demo Basic Framework Xserver Document Firmware DCON_Firmware VxComm_ Firmware OS_Image PC_ Tool MiniOS7 Studio MiniOS7_Utility PC_Test_Program Vxcomm_ Utility iIPAC 8000 User Man
25. 60 converter to establish a USB connection please refer to section 2 3 1 3 Steps to establish a USB connection using a l 7560 converter iPAC 8000 User Manual Version 1 0 beta3 February 2009 36 2 3 1 1 Steps to use a COM1 connection Step 1 Connect the iPAC 8000 to the host PC using a COM1 connection J We asenn saa coma i ae Power supply Step 2 Reboot the iPAC 8000 at Init mode iPAC 8000 User Manual Version 1 0 beta3 February 2009 3 7 Step 3 Run the MiniOS7 Utility MiniOS Utility Yer 3 18 Step 4 Click the New connection from the Connection menu 7A MiniOS7 Utility Verion 3 1 7 3 33 File p Connection 7 a Command Configuration New connection Fz Looki Last Connection AR F2 Disconnect Ctrlt F2 y E bin Search Fi jer LO FIRMWARE File Folder 5 0S_IMAGE File Folder a 1KB Internet Shortcut enmlication Este Step 5 On the Connection dialog box select COM1 from the drop down list HA Connection Connection History Data Bit Parity UN one a StopBt I o iPAC 8000 User Manual Version 1 0 beta3 February 2009 38 Step 6 The connection has already established P MiniOS Utility Verion 3 1 7 3 G File lj Connection de Command F Sanaa T Tools Help Disconnected Connected IPAC 8000 User Manual Version 1 0 beta3 February 2009 39 2 3 1 2 Steps t
26. 88KW b 7188EU c 188E d SendTCP e Send232 f VxComm Utility PC System Requirements 1 IBM compatible PC 2 Windows 95 98 NT 2000 XP Supported Products 1 7188XB 7188XC 7188EX series All i 8000 series iView100 UPAC 7186XB UPAC 7186EX ET 6000 series ET 7000 series O O ON O OF A W PY s 7188XA iPAC 8000 User Manual Version 1 0 beta3 February 2009 116 Appendix F What is VxComm Utility The VxComm Driver creates COM port s and maps them to the Ethernet port s of the PDS 8000E 7188E The user s RS 232 client programs need driver amp utility only to change to the different COM port to get the access of serial devices that are allocated in the Internet or Ethernet network via the PDS 8000E 7188E Where remote ser become part of your The VxComm Driver supports Windows NT 4 0 2000 XP 2003 and 32 bit Vista Vista32 and is totally free for users using ICP DAS PDS 8000E 7188E series products For downloading and more information please refer to the following link http Awww icodas com products Software VxComm vxcomm htm iIPAC 8000 User Manual Version 1 0 beta3 February 2009 117 Appendix G More C Compiler Settings This section describes the setting of the following compilers o Turbo C 2 01 Compiler o BC 3 1 IDE o MSC 6 00 Compiler o MSVC 1 50 Compiler G 1 Turbo C 2 01 You have a couple of choices here you can 1 Using a command li
27. Demo04_Basic XDemo07_printCom1 XDemo14_ 7Seg_LED Readme txt iPAC 8000 User Manual Version 1 0 beta3 February 2009 33 Step 2 Install the MiniOS7 Utility The MiniOS7 Utility is a tool that can be used to configure and upload files to the controller and is located at CD Napdos minios utility minios7_utility fto ftp icodas com pub cd 8000cd napdos minios 7 utility minios7 utility iPAC 8000 User Manual Version 1 0 beta3 February 2009 34 2 3 MiniOS7 Utility for downloading programs Before you begin using the MiniOS7 Utility to download programs ensure that the controller is connected to the Host PC The download process has the following main steps 1 Establishing a connection 2 Download and executing programs on the controller 3 Making programs start automatically All of these main steps will be described in detail later IPAC 8000 User Manual Version 1 0 beta3 February 2009 35 2 3 1 Establishing a connection between the PC and the iPAC 8000 Connect the PC to the iIPAC 8000 with the following connection types 1 COM1 connection 2 LAN1 connection Both of the connection types will be described in detail later lf PC or Laptop do not have a native COM port can be used making a connection There is a simple way to use one l 7560 a USB to RS 232 converter to convert any standard USB port into a RS 232 port For more detailed description on how to add a l 75
28. EIWOIK ercran E E E sae 132 H 3 Star type RS 485 NetWOlK isivsnivesevamavenivinaveninenuyeivanursoinimavswivebaniadvenaureivyemareeusny 133 H 4 Random RS 485 network cccccccseccceeeeeseeeeseeeeeeeeeeeeesseeesseeeseeesseeeseeeesseeesaeeeeas 135 Pos PURON PF UIFEOWIROSISTOTS casini E 136 MO TJPA 8000 AS i MIS le ese I ERE E E ENE TOR SERAS 137 HS2 NN OOOO 35a SIA Ca cts cata cheetah tte 139 iPAC 8000 User Manual Version 1 0 beta3 February 2009 5 1 Introduction IPAC 8000 is compact size PAC Programmable Automation Controller It equips a 80186 CPU 16bits and 80MHZz running a MiniOS7 operating system several communication interface Ethernet RS 232 485 and 4 8 slots to expand I O modules The operating system MiniOS7 can boot up in a very short time 0 4 0 8 seconds It has a built in hardware diagnostic function and supports the full range of functions required to access all high profile l 8k and l 87k series I O modules such as DI DO DIO Al AO Counter Frequency motion control modules etc And to simplify the TCP IP software developing process a software development template X Server is provided It implements 90 functionalities of Ethernet communication Software engineer can easily finish the 10 remaining functionalities and greatly shorten the developing time The iPAC 8000 is designed for applications to industrial monitoring measurement and controlling therefore we made it with redundant pow
29. Hardware Advanced J SPEER TEE EEE EEE EEE EEE Tou must be logged on as an Administrator to make most of these changes Performance Visual effects processor scheduling memory usage and virtual memory Settings User Profiles Desktop settings related to your logon Settings Startup and Recovery System startup system fail A and debv Environment Variables User variables for Administrator variable Value LE vironment Variables TEMP C Documents and Settings Administra TMF C Documents and Settings 4adrministrat System variables Variable Value ComSpec CUWINDOW Sisystem32 cmd exe NUMBER OFF 1 D5 Windows MT CoWINDOW Sisystemse PATHEST OORT ESE BAT CMO Ves VBE Sy 1 iPAC 8000 User Manual Version 1 0 beta3 February 2009 63 Step 4 Add the target directory to the end of the variable value field A semi colon is used as the separator between variable values For example c TC BIN c TC INCLUDE Edit System Variable Variable name Variable value Step 5 Restart the computer to allow your changes to take effect IPAC 8000 User Manual Version 1 0 beta3 February 2009 64 3 2 API for iPAC 8000 To develop a custom program ensure that the files below are installed the Host PC lf they are not installed refer to
30. IPAC 8000 User Manual Version 1 0 beta3 February 2009 service and usage information for iP 8441 iP 8841 Written by Hans Chen Edited by Anna Huang iPAC 8000 User Manual Version 1 0 beta3 February 2009 1 Important Notices 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 iIPAC 8000 User Manual Version 1 0 beta3 February 2009 2 Table of Contents My WMO GUC TO sess acess eco sree ce cence R 6 Wate ROIU crccctaceecastaccoccaredascestaceoncetacecccetadeaccatadaecanteaseeaceecanteatateacactacuestebndecaaceaceoatas 7 Te OPEL ON ea eE EA E ee i eee ee eens 12 leas 61 21 e E E ee ee een 18 RS Ss co eee ee eee ee 18 Ms carer rn ee eee eee 19 Mist LUIS TAS I OI E A A TAT O T TO TE 20
31. OM 16K bytes Data retention 40 years 1 000 000 erase write cycles o NVRAM 31 bytes battery backup data valid up to 5 year o RTC Real Time Clock Year 2000 compliance seconds minutes hours date of the month year valid up from 1980 to 2079 o 64 bit Hardware Serial Number Yes o Watchdog Timer Yes 0 8 second o 5 Digit LED Display Yes o 3 Programmable LED indicators Yes o 4 Push Buttons Yes Communication Interface o Ehternet Port RJ45 2 Auto negotiating auto MDI MDI X connection LED indicator 10 100 Base TX Ethernet Controller iPAC 8000 User Manual Version 1 0 beta3 February 2009 13 Communication Interface Continue o COMO Internal RS 485 interface that can communication with I 87k I O modules Non isolation Baud Rate 115200 bps Data bit 8 Parity None Even Odd Stop bit 1 FIFO 1 byte Note CPU internal uart o COM1 RS 232 used to update firmware Non isolation Baud Rate 115200 57600 38400 19200 9600 4800 2400 1200 bps Data bit 7 8 Parity None Even Odd Stop bit 1 FIFO 1 byte Note CPU internal uart o COM2 RS 485 3000 Vpc Isolation self tuner ASIC inside Baud Rate 115200 57600 38400 19200 9600 4800 2400 1200 bps Data bit 5 6 7 8 Parity None Even Odd Mark Always 1 Space Always 0 Stop bit 1 2 FIFO 16 byte Note 16C550 compatible iIPAC 8000 User Manual Version 1 0 beta3 Febru
32. PAC 8000 User Manual Version 1 0 beta3 February 2009 110 For example to refresh the Watchdog Timer include lt stdio h gt include 8000A h void main void Unsigned long time iTime InitLib Initiate the 8000a library Enable WDT While quit RefreshWDT User_function DisableWDT gt For more demo program about the WatchDog Timer please refer to CD NAPDOS iPAC8000 Demo Basic Misc http fto icodas com pub cd 8000cd napdos ipac8000 demo basic misc IPAC 8000 User Manual Version 1 0 beta3 February 2009 111 Appendix A Frame Ground Electronic circuits are constantly vulnerable to Electro Static Discharge ESD which become worse in a continental climate area Some l 7000 M 7000 and l 8000 series modules feature a new design for the frame ground which provides a path for bypassing ESD allowing enhanced static protection ESD capability and ensures that the module is more reliable The following options will provide a better protection for the module The iPAC 8000 controller has a metallic board attached to the back of the plastic basket as shown in the Figure 2 1 below When mounted to the DIN rail connect the DIN rail to the earth ground because the DIN rail is in contact with the upper frame Attach to Din Rail ground as shown in the Figure 2 2 below iM E SSS SSS SSS U U SSS L eS E a el o Aeda u m
33. PREW iPAC 8000 User Manual Version 1 0 beta3 February 2009 122 Step 6 Set the Entry Exit Code Generation option and setting the DOS standard so Ject Window He o pplication Application i E uancad i iy PRE Lon gt ot el a nl Gees Hestages Ce DOS standard ie Convention Stack tandard Step 7 Choosing the Debugger and set the Source Debugging to None Gy 5 x File Edit Search Run Compile Debug Project Window Help C DOCUNE 1 ADMINI 1 MOMANESS Application Compiler Transfer Make i WPibrarian Directories Inspectors rogram Heap Size EZME K bytes iPAC 8000 User Manual Version 1 0 beta3 February 2009 G 3 MSC 6 00 Step 1 In the source file folder create a batch file called Gomsc bat using the text editor Untitled Notepad cl fe Gs FPa Fm G1 AL HELLO c link M NOE NOI HELLO 4 1i1b 7156xb1 del obq del map C2 1 The source code 2 The object file name 3 The path of the functions library Note C Don t strip comments GS_ No stack checking Fpa Calls with altmath Fm map file G1 186 instructions AL Large model Step 2 Run the Gomsc bat file o CARIN DOSS ystem32tcmd exe C 7188XA Demo MSC Hel 1lo gt Gomsc C 7188XA Demo MSC Hello gt cl c Gs FPa Fm G1 AL Hello c icrosoft R C Optimizing Compiler Version 6 00 Copyright c Microsoft Corp 1984 1990 All
34. a Master Controller or using a PC as a host controller and some RS 485 devices a j Ta i a is i a 232 485 Converter 7520 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 131 H 2 Daisy chain RS 485 network There are branches along the main network In this case it is better to have a repeater to isolate or filter the noise that is made by devices There is a better choice to use 7513 as a RS 485 hub on start type network e 12Km y 1 2 Km _ i ga 485 Repeater 485 Repeater 7510 Series 7510 Series 232 485 Converter T520 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 132 H 3 Star type RS 485 network All RS 485 devices are wired directly to the main network If the network is up to 1 2 Km it will need a repeater 7510 series to extend the network length 232 485 Converter 7520 Series E ee 485 Repeater 485 Repeater 7510 Series 7510 Series 7510 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 133 There is a better choice to use 7513 as a RS 485 hub on start type network SS 232 485 Converter 7520 Series f A 485 Hub 7513 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 134 H 4 Random RS 485 network There are branches along the main wire In this case it is better to have a repeater to isolate or f
35. alled to write enable the EEPROM 2 EE WriteProtect After the data has finished being written to the EEPROM the EE_WriteProtect must be called to in order to write protect the EEPROM 3 EE MultiWrite After using the EE_WriteEnable to write enable EEPROM the EE_MultiWrite must be called to write the data 4 EE MultiRead The EE_WriteEnable must be called to read data from the EEPROM no matter what the current mode is iPAC 8000 User Manual Version 1 0 beta3 February 2009 100 For example to write data to block1 address 10 of the EEPROM include lt stdio h gt include 8000A h void main void int data 0x55 data2 InitLib Initiate the 8000a library EE WriteEnable EE MultiWrite 1 10 1 amp data EE WriteProtect EE MultiRead 1 10 1 amp data2 Now data2 data 0x55 A To write an integer to the EEPROM the EE_WriteEnable function must be called twice in the same manner as writing data to the NVRAM gt For more demo program about the EEPROM please refer to CD NAPDOS iPAC8000 Demo Basic misc http fto icodas com pub cd 8000cd napdos ipac8000 demo basic misc iPAC 8000 User Manual Version 1 0 beta3 February 2009 101 4 4 API for Flash Memory Free 448 K bytes MiniOS7 64 K bytes Total Size 512 K bytes 0 x 8000 0 x 9000 0 x A000 0 x B000 0 x C000 0 x D000 0 x E000 MiniOS7 0 x F000 aa o The iPAC 800
36. anual Version 1 0 beta2 November 2008 141
37. ary 2009 14 Communication Interface o COM3 RS 232 RS485 Baud Rate 115200 57600 38400 19200 9600 4800 2400 1200 bps Data bit 5 6 7 8 Parity None Even Odd Mark Always 1 Space Always 0 Stop bit 1 2 CTS FIFO 16 byte RTS Note 16C550 compatible Data A COM3 can be configured as either RS 232 or RS 485 and the configuration depends on the pin connections as follows RS 232 RXD TXD CTS RTS and GND RS 485 Data and Data There is no software configuration or hardware jumper needed o COM4 RS 232 Non isolation Baud Rate 115200 57600 38400 19200 9600 4800 2400 1200 bps Data bit 5 6 7 8 Parity None Even Odd Mark Always 1 Space Always 0 DSR Stop bit 1 2 sha FIFO 16 byte RI Note 16C550 compatible iPAC 8000 User Manual Version 1 0 beta3 February 2009 15 I O Expansion Slots o IP 8441 4 Slots o IP 8811 8 Slots o Hot Plug Yes o Data Bus 8 16 bits o Address Bus Range 2K for each slot Power Supply o Input Range 10 30 V o Isolation 1KV o Capacity IP 8441 0 85A 5V supply to CPU 5 51A 5V supply to I O expansion slots total 30W iIP 8841 0 9A 5V supply to CPU 5 51A 5V supply to I O expansion slots total 30W iPAC 8000 User Manual Version 1 0 beta3 February 2009 16 Power Supply o Power consumption IP 8441 6 7W 0 28A 24V IP 8841 7 2W 0 3A 24V o IP 8441 230 x 18
38. ata in the COM port input buffer data ReadCom 1 Read data from COM1 port ToCom 1 data Send data via COM1 port if data q quit 1 If q is received exit the program RestoreCom 1 Uninstall the COM1 driver iPAC 8000 User Manual Version 1 0 beta3 February 2009 86 API for showing data from COM ports 7 printCom Functions such as printfCom in the C library allow data to be output from COM ports For example show data from the COM1 port include lt stdio h gt include 8000A h void main void int i Initiate the 8000a library InitLib InstallCom 1 115200 8 0 1 Install the COM1 driver for i 0 1 lt 105i printCom 1 Test d n r i Delay 10 Wait for all data are transmitted to COM port RestoreCom 1 gt For more demo program about the COM port please refer to CD NAPDOS iPAC8000 Demo Basic com_port http fto icodas com pub cd 8000cd napdos ipac8000 demo basic com port iPAC 8000 User Manual Version 1 0 beta3 February 2009 8 7 4 1 3 API for standard COM port o The standard COM port is used to upload program from PC to the iIPAC 8000 The following configurations of the standard COM port are fixed AN Baudrate 115200 bps Data format 8 bits Parity check none Start bit 1 Stop bit 1 API for checking if there is any data in the input buffer 1 Kbhit Before reading
39. be used to implement redundant Ethernet communication and separate Ethernet communication one for global Internet one for private Ethernet o Redundant Power Input To prevent theiPAC 8000 from failing by the power loss the power module is designed with two inputs The iPAC 8000 can keep working even one power input fails and mean while there is a relay output for informing the power failure iPAC 8000 User Manual Version 1 0 beta3 February 2009 10 o Ventilated Housing Design Allows Operation Between 25 C 75 C Each iPAC 8000 is housed in a plastic based box with a column like ventilator that can help to cool the working environment inside the box and allow the IPAC 8000 operating between 25 C and 75 C iPAC 8000 User Manual Version 1 0 beta3 February 2009 1 2 Specifications System Software o OS MiniOS7 DOS like embedded operating system o Program download interface RS 232 COM1 or Ethernet o Programming language C language o Compilers to create exe files TC 1 01 Freeware TC 2 01 Freeware BC 3 1 5 2x MSC 6 0 MSVC before version 1 5 2 CPU Module o CPU 80186 or compatible 16 bit and 80MHz o SRAM 768K bytes o Flash 512K bytes 100 000 erase write cycles with Flash protection switch o Dual battery backup SRAM 512K bytes for 5 years data retain iIPAC 8000 User Manual Version 1 0 beta3 February 2009 12 CPU Module Continue o EEPR
40. begin the install process Step 8 Press any key to continue es CADOCUME 1W r f icpp101 MNSTALL EXE Turbo G 2nd Edition Installation Utility Turbo G is now installed on your system All the necessary files have been copied to your hard drive and a configuration file has heen created for the command line version of the compiler You should now read the README file hy typing README and pressing ENTER in your Turbo G directory Mext make sure the line FILES 28 CG 5SICN5EBI is in your COMFIG SYS file and C TC BIN is in STOSBGI Executing your path For example CG 5TITCNBI PATH C BIN C TC BRIN Executing Peess any key to continue CG 5TCNBI Executing C 5IC EIH UHZI F EZE Executing GC TG BINS THELS EE Press any key to continue iPAC 8000 User Manual Version 1 0 beta3 February 2009 60 Step 9 Press any key to continue ces CADOCUME 1 V ser eppil INSTALL EXE Turbo G 2nd Edition Installation Utility Turbo C Directory ConTc Binary Files Subdirector C TC BIN Header F Library For a tutorial on the Turbo C integrated EGI Subd Be eee ee ee ed a Pa a a LEA S directory and run the Turbo G Tour For example Change to C TC TOUR G 5ITCNBI And type TCTOUR STOSBGI Executing C TC BI Press any key to continue Executing C 2 TO BINSTHELP COM WU FOC Executing C 5SIC EINSUHNHZIF EZE TC a Executing CG 5ITC EBEIHNTHELF COM Any Key Continue Press any key to continue
41. cation protocol as table below you can refer to slave com demo For a request response application lease refer to slave_com demo Request Response Request Response GetCounter gt 1234 SetDO1 gt OK ResetDO2 gt OK GetVersion gt V1 0 0 For more demo program about the COM port please refer to CD NAPDOS iPAC8000 Demo Basic com_port iPAC 8000 User Manual Version 1 0 beta3 February 2009 92 4 2 API for I O modules o The iPAC 8000 is equipped with 4 8 I O slots to access the I 8k and I 87k series I O modules High profile as shown the point 1 and point 2 in the figure below o The iPAC 8000 is equipped with multi serial ports to access the I 7K series I O modules for a wide range of RS 485 network application as shown the point 3 in the figure below The iPAC 8000 can connect to RU 87P2 4 8 to access the I 87k I O series modules through RS 485 as shown the point 4 in the figure below GD LSE module 7K module _ gs ood iPAC 8000 User Manual Version 1 0 beta3 February 2009 93 The demo programs used for I 7K l 8k and l 87k can be divided into the following gt For 8k and I 87k I O modules in slots please refer to CD NAPDOS iPAC8000 Demo Basic lO_in_ Slot http ttp icodas com pub cd 8000cd napdos ipac8000 demo basic io_in_ slot gt For l 7K and l 87k I O modules is connected to the COM ports please r
42. data data MiniOS7 IsCom ToCom ReadCom printCom COM port C style 1 512 256 Puts l Standard Kbhit Getch Print Bytes Bytes Putch COM port iPAC 8000 User Manual Version 1 0 beta3 February 2009 84 4 1 2 API for MiniOS7 COM port API for using COM ports 1 InstallCom Before any COM Port can be used the driver must be installed by calling InstallCom 2 RestoreCom lf the program calls InstallCom the RestoreCom must be called to restore the COM Port driver API for checking if there is any data in the COM port input buffer 4 lsCom Before reading data from COM port the IsCom must be called to check whether there is any data currently in the COM port input buffer API for reading data from COM ports 5 ReadCom After IsCom confirms that the input buffer contains data the ReadCom must be called to read the data from the COM port input buffer iPAC 8000 User Manual Version 1 0 beta3 February 2009 85 API for sending data to COM ports 6 ToCom Before sending data to COM ports the ToCom must be called to send data to COM ports For example read and receive data through the COM1 include lt stdio h gt include 8000A h void main void int quit 0 data InitLib Initiate the 8000a library InstallCom 1 115200 8 0 1 Install the COM1 driver while quit if lsCom 1 Check if there is any d
43. data from standard I O port the kbhit must be called to check whether there is any data currently in the input buffer API for reading data from standard I O port 2 Getch After kbhit confirms that the input buffer contains data the Getch must be called to read data from the input buffer API for sending data to standard I O port 3 Puts For sending a string Before sending data to standard I O port the Puts must be called to send data to COM Port iPAC 8000 User Manual Version 1 0 beta3 February 2009 88 4 Putch For sending one character Before sending data to standard I O port the Putch must be called to send data to COM Port API for showing data from standard I O port 5 Print Functions such as Print in the C library allow data to be output from the COM Port For example read and receive data through COM1 include lt stdio h gt include 8000E h void main void int quit 0 data InitLib Initiate the 8000a library while quit if Kbhit Check if any data is in the input buffer data Getch Read data from COM1 Putch data Send data to COM1 if data q quit 1 If q is received exit the program iPAC 8000 User Manual Version 1 0 beta3 February 2009 89 For example show data through COM1 include lt stdio h gt include 8000A h void main void int i Initiate th
44. e 8000a library InitLib for i 0 i lt 10 i Print Test d n r i IPAC 8000 User Manual Version 1 0 beta3 February 2009 90 4 1 4 Comparing with MiniOS7 COM port function and Standard COM port function For example learn to show the ASCII code MiniOS7 COM port functions include lt stdio h gt include 8000a h void main void unsigned char item InitLib InstallCom 1 115200 8 0 1 printCom 1 Hits any key n printCom 1 Hit the ESC to exit n for if IsCom 1 item ReadCom 1 if item q return else printCom 1 n r printCom 1 char ToCom 1 item printCom 1 n rASCII c n r item printCom 1 Hex 02X n r item Delay 10 RestoreCom 1 Standard COM port functions include lt stdio h gt include 8000a h void main void unsigned char item InitLib Print Hits any key n Print Hits the ESC to exit n for if kbhit item Getch if item q return else Print n r Print char Putch item Print n rASCII c n r item Print Hex 02X n r item iPAC 8000 User Manual Version 1 0 beta3 February 2009 91 4 1 5 Request Response protocol define on COM port Request Response communication is very typical protocol architecture if you want to design a command set of communi
45. e the header file that allows 8000a lib functions to be used void main void InitLib Initiate the 8000a library Print Hello world r n Print the message on the screen Step 5 Save the source file i Select Save from the File menu ii Type the file name Hello iii Select OK of CAWINDOWS System 3 tcmd exe tc gt gile Debug Project A r ie hug Opt ions HELLO CPP Compile Debus Project Options HOHAMEH CPP Window Hely 1 tI gt S ee eS ee a IPAC 8000 User Manual Version 1 0 beta3 February 2009 AN If there is a text editor you are familiar with or prefer to use such as Notepad or edit you may use it to write the code shown above It should be noted that a word processor application cannot be used for this purpose as the application must save the file as plain text C language program files should always have a C extension name Step 6 Create a project prj i Select Open project from the Project menu li Type the project name Hello iii Select OK cx Command Prompt te LL i d Edit Search Run Cor ile aV Options Window Helg Close project Edit Search Run Compile Debug Project Options Window 0 G sIC Hello PRJ a iles iPAC 8000 User Manual Version 1 0 beta3 February 2009 7 1 Step 7 Add the necessary source files to the project CPP i Selec
46. efer to CD NAPDOS iIPAC8000 Demo Basic 7K87K_for_ COM http ttp icodas com pub cd 8000cd napdos ipac8000 demo basic k87k for com iPAC 8000 User Manual Version 1 0 beta3 February 2009 94 4 2 1 Steps to use I 8k series I O modules in slots API for reading DI modules DI_8 DI_16 DI 32 The DI_8 DI _16 DI32 must be Sending commands to called to read input value of DI modules i 8K series I O modules For example read the input value of slot 3 DI modules include lt stdio h gt include 8000A h void main void int Di_data iSlot 3 InitLib Initiate the 8000a library for Read the input value of Slot 3 DI module DI_data DI_8 iSlot Print DI Status x n r DI data iPAC 8000 User Manual Version 1 0 beta3 February 2009 95 4 2 2 Steps to use l 87k series I O modules in slots You must perform the following steps Step 1 Use Installcom to install the COM port driver Step 2 Use ChangeToSlot to assign the slot which the I 87k I O module plugged in Step 3 Use SendCmdTo7000 0 to send commands Step 4 Use ReceiveResponseFrom7000_ms to get the response Step 5 Use RestoreCom to restore the COM port driver Sending commands to i 87K series I O modules A N The following settings of the COMO are fixed Baudrate 115200 bps Data bit 8 bits Parity check None Stop bit 1 The following settings of l 87k series I O module
47. er inputs with 1KV isolation from noise and surges and a wild range of operating temperature 25 C 75 C It is toughly enough to survive the harsh and rough environment iPAC 8000 User Manual Version 1 0 beta3 February 2009 6 1 1 Features Software Features o MiniOS7 embedded operating system MiniOS7 was introduced in 1996 as an MS DOS like operating system for embedded controller developers The features of MiniOS7 include A Small kernel size 64KB B Fast boot speed 0 4 0 8 second C Hardware diagnostic functions D Simple command line operation over RS 232 or Ethernet E Load files via RS 232 or Ethernet o VxComm Technique Supported VxComm technique is used to create virtual COM ports on PC for windows 2K XP to map remote COM ports of PDS 700 I 7188E l 8000 and iPAC 8000 over the Ethernet Using the technique RS 232 485 software can access devices locally via the physical RS 232 485 bus or remotely via the Ethernet The RS 232 485 software only needs to change COM port number from the physical COM port to virtual COM port o Redundant Ethernet Communication With the dual LAN features of iPAC 8000 user s software on PCs or other controllers can implement redundant Ethernet communication With VxComm technique the redundant Ethernet communication is ready One virtual COM port on PC can map to one COM port of IPAC 8000 via two IP address When the communication is failed or timeout the VxC
48. ersion 1 0 beta3 February 2009 67 3 3 Build and run your first program If you don t using the TC Turbo C to write a program please take the following steps Step 1 Open a MS DOS command prompt i Select Run from the Start menu li On the Run dialog box type cmd iii click the OK button 3 Windows Catalog Windows Update Programs b ce eg A Documents m Settings d 2 a 1 a sa t Mart Ty gt Run 4 Ep O Shut Down i F C n i if Run x Type the name of a program Folder document or 66 2 Type cmd Internet resource and Windows will open it For vou Open w 3 Ce eer iPAC 8000 User Manual Version 1 0 beta3 February 2009 68 Step 2 At the command prompt type TC and then press Enter Microsoft Windows AP Version 5 1 2606 CCG Copyright 1985 2001 Microsoft Corp C o Documents and Settings Administrator I Step 3 Select New from the File menu to create a new source file Ser L S o Edit Gy Open IG File Edit Search Run Compile Debug Project Options Window Help Lil F Make Fi Menu Fi Help A1t FE Mext Msg Alt F Prev Msg ALt F Compile IPAC 8000 User Manual Version 1 0 beta3 February 2009 Step 4 Type the following code Note that the code is case sensitive include 8000A h Includ
49. eset Resets the software Runprog Illustrates how to select an item and run it Misc Serial Illustrates how to retrieve 64 bit hardware unique serial number Watchdog Enables the WDT or bypasses the enable WatchDog function Smmi SystemKey Shows how to operate the systemkey function simply and easily Led Shows how to control the red LED and 7 segment display iPAC 8000 User Manual Version 1 0 beta3 February 2009 80 Folder Demo Explanation S256 Shows how to read or write to the 256K 512K byte battery backup DateTime Shows how to read and write the date and time from the RTC C_Style_IO 1 Shows how to write a function to input data 2 Shows how to receive a string 3 Shows how to use a C function sscanf or just use Scanf Receive Receives data from COM port Slv_COM c is in non blocked mode Receive c is in blocked mode Slv_COM A slave COM Port demo for request reply or command response applications ToCom_ In Out Illustrates how to Read Write byte data via COM Port For more information about these demo programs please refer to CDA NAPDOS iIPAC8000 Demo Basic iPAC 8000 User Manual Version 1 0 beta3 February 2009 81 gt 8k and l 87k I O series modules for I O Slot Applications Folder Demo Explanation This demo program is used by 8K series DI modules 8K_DI such as 8040 8051 etc This demo program is used for 8073 General 8073 Functions
50. g programs o 64 bit Hardware Serial Number The 64 bit hardware serial number is unique and individual Every serial number of IPAC 8000 is different Users can add a checking mechanism to their AP to prevent software from pirating o Dual Battery Backup SRAM 512KB To maintain important data while power off non volatile memory is the ideal design The iPAC 8000 equips a 512KB SRAM with two Li batteries to maintain data while power off The two Li batteries can continually supply power to the 512KB SRAM to retain the data for 5 years and the dual battery design can avoid data lost while replacing a new battery o I O Module Hot Swap Ability Plug amp Play The iPAC 8000 features hot swap which means that there is no need to power off the iPAC 8000 for replacing modules And the OS provides a function sending plug in and removing messages to user s applications Using this feature users can design its own plug and play applications iPAC 8000 User Manual Version 1 0 beta3 February 2009 9 o Rich I O Expansion Ability RS 232 485 Ethernet FRnet CAN WR KER RKAP i Beside the local I O slots iPAC 8000 also equips several RS 232 485 ports two Ethernet ports to connect serial I O and Ethernet I O And with FRnet and CAN communication module in local slot FRnet I O and CAN devices are easy to be integrated o Dual Ethernet Ports iIPAC 8000 provides two Ethernet ports The two Ethernet ports can
51. ied elo ISEB E aarue Fun with parameters Begin Key Thread l Current set Use COM1 115266 N 8 1 aew AutoRun Reset Minit F4 Autodownload files None Cu Documents and Settings Wser Hello Hello_C Erase Dick C837_U2 2_UDP gt run 6 Hello 8666 lt Flash memory is 512 K gt C83 7_U2 2_UDP gt _ Fe MIMS s Utility vernon 3 1 7 3 File gt Connection ae Command F Configur Lock in Disk 4 7 I Look in C Mini 7 Utility Name Size Type No Mame Size Modified bin File Folder J0 hello ere 138 928 2008 6 9 O FIRMWARE File Folder aULOEHEC 25 2005 8 9 O 0S_IMAGE File Ego icpdas EDE Current set Use COM1 115266 N 8 1 NDocuments and Settings WUser Hello Hello_C t C837_U2 2_UDP gt run 6 Hello 8000 lt Flash memory is 512 K C83 7_U2 2_UDP gt _ iPAC 8000 User Manual Version 1 0 beta3 February 2009 79 4 APl and Demo Program Reference There are several demo programs that have been designed for iPAC 8000 You can examine the demo source code which includes numerous comments to familiarize yourself with the MiniOS7 API This will allow to quickly develop your own applications quickly by modifying these demo programs o Basic Explanation Folder Demo File Config_1_Basic Reads information from a text file basic Config_2 Advanced Reads a config file text file advanced Hello Hello C Reads the library version and flash memory size Hello C R
52. ilter the noise that is made by devices 232 485 Converter 7520 Series 7 510 Series 485 Repeater 7 510 Series iPAC 8000 User Manual Version 1 0 beta2 November 2008 135 H 5 Pull High Pull Low Resistors The RS 485 network based on master slave architecture consist of a single master device and one or more slave devices The iPAC 8000 provides two RS 485 communication interface based on the master slave system architecture all of which have a pull high pull low resistor user can set it to master or slave for implementing an RS 485 multi drop network One of the RS 485 communication COM2 its pull high pull low resistor located on power board the other COM3 located on the right side and its pull high pull low resistor located on the bottom of the right side as shown below JP1 and JP are the jumpers settings of the pull high pull low resistor iPAC 8000 User Manual Version 1 0 beta2 November 2008 136 H 5 1 IPAC 8000 as a Master When one of iIPAC 8000 Is set to master then all the other devices on the same network must be slave mode If the network is up to 1 2 KM it will need a repeater 7510 series to extend the network length 8 485 Repeater 7510 Series 485 Repeater 7510 Series Slave Mode Slave Mode When iPAC 8000 as a master using COM2 communication interface the pull high pull low resistor located on the power board must adjust to
53. megabytes of available disk space if you wish to install all the memory models unpack the examples and copy the Tour files Press ENTER to continue ESC to quit 74 3y 7 ENTER Cont i Press Enter to continue iPAC 8000 User Manual Version 1 0 beta3 February 2009 58 Step 5 Enter the letter of the hard drive you wish to install the software ey O x Turbo G 2nd Edition Installation Utility Enter the letter of the hard drive you wish to install the software Step 6 Enter the path to the directory you wish to install files to SEE Turbo C 2nd Edition Installation Utility STOCPP141_ Enter the path to the directory you wish to install files to iPAC 8000 User Manual Version 1 0 beta3 February 2009 59 Step 7 Select Start Installation to begin the install process es CADOCUME 1 VWeserlg eppil INSTALL EXE Turbo G 2nd Edition Installation Utility Turbo C Directory C TC Binary Files Subdirectory C o TC BIN Header Files Subdirectory CoxTO INCLUDE Library Subdirectory GCe Tco LIE EGI Subdirectory C TC BGI Tour Subdirectory C TC TOUR Class Library Subdirectory C TC CLASSLIB Examples Subdirectory C2 TC ERAMPLES Install Tour Yes Unpack Examples Yes Memory Models TS HACLH J Start Installation a m LOD Selecting thig a UO hard drive into the director Select Start Installation to
54. memory unless an unlock sequence precedes the loading of the data that is to be programmed into the memory iPAC 8000 User Manual Version 1 0 beta3 February 2009 26 2 1 2 3 Running mode The running mode represents there is the program running on the iPAC 8000 and the 5 digits 7 SEG LEDs will show the message according to the running program but if during this time there is another program running on iPAC 8000 the 5 digits 7 SEG LEDs isn t managed with this program it will stop motion at the present state Download files iPAC 8000 User Manual Version 1 0 beta3 February 2009 2 2 1 3 Inserting the I O module A NR a For more information about expansion module that are compatible with the iPAC 8000 please refer to htto www icodas com products PAC i 8000 8000 IO modules htm A By l 8K and l 87K series expansion modules support is provided only in High Profile series iPAC 8000 User Manual Version 1 0 beta3 February 2009 28 l 8K series I O modules High Profile iK series I O modules he communication interface is parallel bus igh profile It can be plugged in vWWinPAC LiInPAC and iPAC s000 controllers ow profile It can be plugged in vWinCon Linton and i 8000 controllers 1 Type High Profile Low Profile Description Analog il Modules oe oe pees Al modules have high sampling rate from Selection Guides EEE EEE TE to 100Ksps depends on software b j 8
55. ne For more information please refer to CD 8000 NAPDOS 8000 841 x881x Demo hello Hello_C gotc bat tcc Ic tc include Lc tc lib hellot c lib 8000e lib 2 Using the TC Integrated Environment Step 1 Executing the TC 2 01 Step 2 Editing the Project file Adding the necessary library and file to the project cy CAWINDO WSS ystem32temd exe d Vic20 c ite Run Compile Project Options Debus Break watch Edit ee Cob 19 Insert Indent Tab Fill Unindent D NOMAME C Message Fi Help F5 Zoom F 6 Switch F Trace F8 Step F9 Make Fi Menu Willy iPAC 8000 User Manual Version 1 0 beta3 February 2009 118 Step 3 Save the project and entering a name such as LED prj ey CURTIN DO WSS vstem32 cmd exe d ttce20 tec File Edit Run Compile Project Options De bug Break watch p ee col 19 Insert Indent Tab Fite vcindent D MOMAME C OS shell Quit Alt A Step 4 Load the Project ec CAWINDO WS ystem32 emd exe d tic 20 File Edit Run Col i In cert Project name LED PRI Break nals on Step 5 Change the Memory model Large for 8000e lib and set the Code Generation to 80186 80286 iPAC 8000 User Manual Version 1 0 beta3 February 2009 119 File Edit Line i Run Compile Fro ject Opt ions De bug Col i Insert Indent Ta Model Defines Code generation Calling convention Instruction set Floating point Default char type Alignment Generate underbars Merge ere eRe i
56. ne mniboee 1 OBJ debug information k Step 6 Building the project HINDOWS Sy Edit Line i yo L a 1 File ompile Project Options Run De bug Build all Primary C file OF Ri a Edit Line i WIND File Run Compile Pro ject Opt ions Debuc Col i Edit Insert maene Teh Fill Unindent Linking LED EXE STC2H LIESCL LIE Total compiled 1335 Warnings amp Errors Available E 235K Message ERE file Linking Lines Fi Help F5 Zoom Fo Switch F Trace F8 Step F Make IPAC 8000 User Manual Version 1 0 beta3 February 2009 Fi Menu Breakrwatch HONAME C Large C 661867860266 Emulation Signed Ol x Break watch D NONAME C El EBreakrwatch D NONAME C MUM 120 G 2 BC 3 1 IDE Step 1 Executing the Borland C 3 1 Step 2 Creating a new project file prj co Command Prompt be File Edit Search Run Compile Doug C DOCUME LS ADMIAN MIN Step 3 Add all the necessary files to the project co Command Prompt be File Edit Search Run Compile Options Window Hel iIPAC 8000 User Manual Version 1 0 beta3 February 2009 121 Step 4 Change the Memory model Large for 8000e lib File Edit Search Rui Compile Step 5 Set the Advanced code generation options and Set the Floating Point to Emulation and the Instruction Set to 80186 Opt inion ae ove Source Fi Help View f Far Data hreshold E
57. o 104 BOs ARFOro DINLE Derese e e R 106 4 7 API for Timer and WatchDOgQTiMet ccccccccececeecceeeeseeeceeeeeeeeceeesaeeeeeeensess 108 4 8 API for WatchDog Timer WDT cece cccceecceeeceeeseeeseeeeeeeeeeseeeseeeaeeeaeeeaess 110 FANG 1210 0 Ac Frame GrOUNO serana ree cranes ee eee te nn nn eevee rey er 112 Appendix B FEGUNOANTIP OWCN cccrinnnentna i enon a 113 Appendix C l 8k and l 87k serial modules n nnnennnonnnnennnsnnssnnensnrnsrrrnrrrrsrrrsrrersrersrrereree gt 114 Appendix D Whatis MINOS Fariseo aeni E E E A TE T 115 Appendix E Whatis MINOS 7 OUI sts cisettswireoidumidonidiohdvoidmsdonbsuatawideeieoldonnmbdveidwsiveioes 116 Appendix F What is VXCOMmmM UtIIty serresrosiniieiiii inia ea EREE 117 Appendix G More C Compiler SettingS cccccsccccssseeeceeeeeeeeeeseesseseesseaeseeseeeesseegeessnas 118 ae DOG e O UR eence enone On ones anes peennr con Ener Or emer ne ner Cn te Rte aeons oe ee rerr er heen Ormeene 118 G2 a a cone ee eee ee Re ere en ee en ee er 121 G MSG G OO ecto ease et Gaeseatene E TET Gel Geen Gleaner 125 iIPAC 8000 User Manual Version 1 0 beta3 February 2009 4 EMV lis eres theese aga ese esac cee acm tec cua steed eeapateech enum aloedaecacnedencmeloedeneneeedancesncdarceastas 127 Appendix H Application of RS 485 Network ccccccseceecseeeeeeeeeeseeeeeseneesseseessaeeesaeeeesaaes 131 H 1 BaSe ACO NEIWOK u ericeira 131 H2 Dasyv Cnain AS 465 N
58. o use a LAN1 connection Step 1 Connect iPAC 8000 to the host PC using a LAN1 connection A Si Power supply Step 2 Reboot the iPAC 8000 at Init mode iPAC 8000 User Manual Version 1 0 beta3 February 2009 40 Step 3 Run the MiniOS7 Utility MiuOs Utility Ver 3 18 A If you have a DHCP server to automatically configure IP address then you don t have to manually configure IP address you can skip directly skip to step 8 Step 4 Click the Search from the Connection menu T MiniOS Utility Ferion 3 1 8 3 3 File gt Connection A Command Lonticurat New connection F2 ye EEEE LastConnection Al HG Name SIZE O Mini pearch autoexec bat J E100_400 E1E 33 FA Mini0 S7_utility zip 47 Ev PL2303_ ICPDAS IPS000_Alll 3 0 g PL2303 ICPOAS IPS000_Alll 2 ab gs Upda Version LAB 4 n e a iPAC 8000 User Manual Version 1 0 beta3 February 2009 41 Step 5 On the MiniOS7 Scan dialog box select 192 168 255 1 from the list gt MiniOS 7 Scan ROAD a a Gesch Ophons IP petting Heap Est es 7 a N vor Hrosdlasl 132 168 255 1 Cea VW22 UDF Step 5 Select IP setting button from the toolbar T MiniOS Scan a aei Seach Option IF prir Mame Aks h 7 v22 UDP I UDP Brosd asi iPAC 8000 User Manual Version 1 0 beta3 February 2009 42 Step 6 On the IP Setting dialog set the IP
59. odules iPAC 8000 User Manual Version 1 0 beta3 February 2009 98 For example send a command 00M to the I 7K or I 87k I O module that connected on the COM2 of the iPAC 8000 for getting the module name include lt stdio h gt include 8000A h void main void unsigned char InBuf0 60 InitLib Initiate the 8000a library InstallCom 1 115200 8 0 1 Install the COM1 driver InstallCom 2 115200 8 0 1 Install the COM2 driver SendCmdTo7000 2 00M 0 Send a command to COM2 Timeout 50ms check sum disabled ReceiveResponseFrom7000_ms 2 InBuf0 50 0 printCom 1 Module Name s InBuf0 Delay 10 Wait for all data are transmitted to COM port RestoreCom 1 Uninstall the COM1 driver RestoreCom 2 Uninstall the COM2 driver iPAC 8000 User Manual Version 1 0 beta3 February 2009 99 4 3 API for EEPROM o The EEPROM contains 64 blocks block 0 63 and each block has 256 bytes address 0 255 with a total size of 16 384 bytes 16K capacity o The default mode for EEPROM is write protected mode o The system program and OS are stored in EEPROM that are allocated as shown below Block 6 Block 7 Reserved system jen Block 31 Block 32 l Block 63 API for reading data from the EEPROM API for writing data to the EEPROM 1 EE WriteEnable Before writing data to the EEPROM the EE _WriteEnable must be c
60. omm driver can automatically and quickly switch the virtual COM port mapping to another IP address to keep the Communication iIPAC 8000 User Manual Version 1 0 beta3 February 2009 o Easy Use Software Development Template Xserver for TCP IP Application To simplify the TCP IP software developing process we designed a software develop template called XServer It is a reliable opened expandable all purposed and easily to be used library The Xserver implements 90 functionalities of Ethernet communication Refer the rich demo programs we provided software engineer can easily finish the 10 remaining funtionalities and greatly shorten the developing time o Slave I O firmware options for DCON or Modbus TCP protocol In some simple Ethernet I O applications users just want to know how to send a command to the I O to get back a response They don t want to develop a firmware That is too difficult to them Thus we also provide two firmware for this purpose A DCON firmware DCON firmware supports an ASCII string based command set called DCON protocol B Modbus firmware Modbus firmware supports the standard Modbus TCP protocol SCADA software can easily access the I O module plugged in the iPAC 8000 iPAC 8000 User Manual Version 1 0 beta3 February 2009 8 Hardware Features o 80186 CPU 16bit and 80MHz with 512KB Flash and 768KB SRAM The 512KB flash is for storing files and the 768KB SRAM is for runnin
61. onment Variables ccccccseeceeseeeeeeeeesaeeeesaeeeeeaees 62 32 PATOL MPO eE 65 3 3 Build ANd run your first PrOQFAM ccceeccseeeceeeceeeeneeeseeeceueeseeeseeseeeeseeeseeeeeeeens 68 iPAC 8000 User Manual Version 1 0 beta3 February 2009 3 A API and Demo Program Reference sssssincranersasiusawvachasewsaavedaranskedunenabedevensieduecasinadawanshuaton 80 AN ARPRHOFCOM DO einean tyalace thn basin eeaeiat tient deste 83 Alsi Types of COM POM tUNnClONn vicccoictessstectiecctostiersntinoiieneteteeseteaeuedss 84 AAc2 APIO MNOS COM DOM x tspfecnteis level EEEE 85 4 1 3 APITOrStandald COM DOW seco a a ee as 88 4 1 4 Comparing with MiniOS7 COM port function and Standard COM port function 91 4 1 5 Request Response protocol define ON COM Port ccccceeeeeeeseeeeeeeeees 92 Ac ARTON MOGUICS vrtrisicnutensinartnsianstrarieasieupiesitariscubmricitnsl E 93 4 2 1 Steps to use I 8k series I O modules in slots ceeceeeeeeeeeeeeeeeeeeaeees 95 4 2 2 Steps to use I 87k series I O modules in slots ccceeeeeeeeeeeeeeeeeeeeees 96 4 2 3 Steps to use I 7K and I 87k series I O modules that are connected to COM OOM eesesedet tenes ade shidesateb ie a ae lees 98 7 His AROLE E PRON een eee am S TT aT een am NE Rana enero eee ney See eer emer 100 4 4 API for Flash Memory satincaxtcetevantvateriudcrdaccudierlssandiatantaladdaldadendaldadeundalsadascaiuedame 102 A5 APRHOFNVRAM and RTO esae
62. r please refer to http Awww icodas com products Remote_lO i 7000 i 7560 htm i tt tt Li Step 2 Install the l 7560 driver The l 7560 driver can be obtain from CD NAPDOS 7000 756x http ttp icodas com pub cd 8000cd napdos 7000 756x Step 3 Check the port number that is assigned to the l 7560 converter ED Network adapters Ports COM amp LPT The port number can be found Sy Communications Po gf Communications P Y ICPDAS 1 756 Converter COM3 Processors SCSI and RAID controllers iPAC 8000 User Manual Version 1 0 beta3 February 2009 46 Step 4 Run the MiniOS7 Utility MauOS Utility Ver 3 165 Step 5 Click the New connection from the Connection menu Z MiniOS7 Utility Verion 3 1 7 Q File fp Connection a Command Z Configuration tern New connection F2 K Last Connection Alt F2 M Disconnect Ctrl F2 gt bin Search F12 je FIRMWARE File Folder 0S_IMAGE File Folder m IKB Intemet Shortcut Aanlication F utan Step 6 On the Connection dialog box in the drop down list select the COM port number that is assigned to l 7560 converter se A Connection Connection History Baud Rate Data Bit Parity Stop Bit IPAC 8000 User Manual Version 1 0 beta3 February 2009 47 Step 7 The connection has already established P MiniOS
63. rosoft Beta Fi cor leexatdemomnacthello gt ch o gt TIBKA gt DEMO MSc He CAT f HELLO List Files of Type ieee Cv Project ek iPAC 8000 User Manual Version 1 0 beta2 November 2008 127 Step 3 Add the user s program and the necessary library files to the project Edit HELLO MAE x File Hame Directories Close 71 88xal lib cM Bbsademo mec ib 1eoxal lib FS ch Cancel T168Ha5S lib F gt TBE gt DEMO Help gt MSC g lib HE CG Board List Files of Type Drives Library lib Sc Pic ee a demo mecshelloshello c Myc Todnaidemowmeciliby 1odnal lib a Project Type MS DOS application EE OF Cancel Use Microsoft Foundation Classes Customize Build Options Build Mode i Debug CfC Compiler Options x Build Options Debug Specific Release Specific Common to Both Options String fnologo Gs G7 AWS AL Oe D UNDEBUG ZB DOS FA Help Flee Compiler Linker lil Cancel ee Help Deme Use Project Defaults Category Category Settings Code Generation Code Generation Custom Options pee Custom Options C Fi Debug Options 20186 7 80188 Check Pointers Listing Files J Memory Model ees Disable Stack Checking Optimizations Calling Convention Ce C Floating Point Calls Code Generator Segment Names Use Emulator Auto Select
64. ry Init5DigitLed Show5DigitLed 1 8 Show5DigitLed 2 0 Show5DigitLed 3 0 Show5DigitLed 4 0 Show5DigitLed 5 14 The ASCII code for the letter E is 14 gt For more demo program about the 5 digit 7 SEG LEDs please refer to CD NAPDOS iIPAC8000 Demo Basic smmi http fto icodas com pub cd 8000cd napdos ipac8000 demo basic smmi IPAC 8000 User Manual Version 1 0 beta3 February 2009 107 4 7 API for Timer and WatchDogTimer o The iPAC 8000 can support a single main time tick 8 stop watch timers and 8 count down timers o The iPAC 8000 uses a single 16 bit timer to perform these timer functions with a timer accuracy of 1 ms API that can be used to control the Timer 1 TimerOpen Before using the Timer functions the TimerOpen must be called at the beginning of the program API for reading the Timer 2 TimerResetValue Before reading the Timer the TimerResetValue must be called to reset the main time ticks to 0 3 TimerReadValue After the TimerResetValue has reset the main time ticks to 0 the TimerReadValue must be called to read the main time tick API for stopping the Timer 4 TimerClose Before ending the program the TimerClose must be called to stop the Timer iPAC 8000 User Manual Version 1 0 beta3 February 2009 108 For example the following code can be used to read the main time ticks from 0 include lt stdio h gt
65. s that plugged in Slots are fixed Address 0 Check sum Disable Besides the ChangeToSlot function must be called iPAC 8000 User Manual Version 1 0 beta3 February 2009 96 For example send a command 00M to the I 87k I O module that pluged on the slot 7 of the iPAC 8000 for getting the module name include lt stdio h gt include 8000A h void main void unsigned char InBuf0 60 InitLib Initiate the 8000a library InstallCom 0 115200 8 0 1 Install the COMO driver InstallCom 1 115200 8 0 1 Install the COM1 driver Change ToSlot 7 SendCmdTo7000 0 00M 0 Send a command to COMO Timeout 50ms check sum disabled ReceiveResponseFrom7000_ms 0 InBuf0 50 0 printCom 1 Module Name s InBuf0 Delay 10 Wait for all data are transmitted to COM port RestoreCom 0 Uninstall the COMO driver RestoreCom 1 Uninstall the COM1 driver iPAC 8000 User Manual Version 1 0 beta3 February 2009 97 4 2 3 Steps to use I 7K and I 87k series I O modules that are connected to COM port You must perform the following steps Step 1 Use Installcom to install the COM port driver Step 2 Use SendCmdTo7000 0 to send commands Step 3 Use ReceiveResponseFrom7000_ms to get the response Step 4 Use RestoreCom to restore the COM port driver sending commands to i 7K series I O modules Sending commands to i 87K series I O m
66. section 2 2 Software Installation o Functions Library 8000a lib This file contains the MiniOS7 API Application Programming Interface and has hundreds of pre defined functions related to your controller o Header File 8000a h This file contains the forward declarations of subroutines variables and other identifiers used for the MiniOS7 API 9 st A MiniOS7 API Programm Functions able lO and WatchDog Timer iPAC 8000 User Manual Version 1 0 beta3 February 2009 65 For full usage information regarding the description prototype and the arguments of the functions please refer to the MiniOS7 API Functions User Manual located at CD Napdos MiniOS7 Document http ttp icodas com pub cd 8000cd napdos minios 7 document F Adobe Reader MiniOS7_API pdf Sige C Fie Edit View Document Tools Window Help Ea en e 2 Eh swveccony i BBY sern 6 Ds fag fy Be OY Oee com wr eea Fs Options x gt f By 1 Library Selection for All 7188 1 80 EHA 2 COM Ports Functions x HA 2 1 Common Functions Variables zje Options ka x DS 2 1 1 InstallCom DS 2 1 2 bCtsChanged_x D 2 1 3 CurCTS_x DS 2 1 4 CurRTS_x D 2 1 5 fCtsControlMode_x 2 1 6 fRtsControlMode_x sas EHDA 2 1 Common Functions variables 8 2 1 7 ClearCom D 2 1 8 ClearTxBuffer Fe 2 1 1 InstallCorn A 2 1 2 bCtsChanged_ x py 1 Library Selection for All l 7 166
67. t Add item from the Project menu ll Type CPP to display a list of all available source files iii Choose the source files you require iv Select Add v Select Done to exit iIPAC 8000 User Manual Version 1 0 beta3 February 2009 7 2 Step 8 Add the necessary function libraries to the project lib i Select Add item from the Project menu li Type LIB to display a list of all available function libraries iii Choose the function libraries you require iv Select Add v Select Done to exit iPAC 8000 User Manual Version 1 0 beta3 February 2009 73 Step 9 Set the memory model to large i Select Compiler from the Options menu and then select Code generation li On Model option select Large iii Select OK ec Command Prompt te iIPAC 8000 User Manual Version 1 0 beta3 February 2009 74 Step 12 Select Build all from the Compile menu to build the project ec Command Prompt te File Edit Search Run Debug Project Options Window Hely _ 2 t1 gt Compile Alt F Make F Link Infanrpmation _ Compile Debug Project Options Window Help Library HELLO LIB Adding HELLO OBJ Total Lines compiled 1573 Warnings B Errors Available memory i 78K Fi Help A1Lt FG Next Msg lt FY Prev Msg Al1t F Compile F Make Fi Menu
68. ual Version 1 0 beta3 February 2009 22 2 Quick Start This chapter provides users with basic information needed to begin using the iPAC 8000 2 1 Hardware installation 2 1 1 Installing the iPAC 8000 Step 1 Mounting the iPAC 8000 controller The controller can be mounted in two different ways Method 1 DIN rail mounting iPAC 8000 User Manual Version 1 0 beta3 February 2009 23 Method 2 Screw panel mounting a a ot p p Step 2 Power the iPAC 8000 DIN 540A RQ E il b AVD Power Supply 10 30 VDC d e wie Host PC iPAC 8000 User Manual Version 1 0 beta3 February 2009 24 2 1 2 Operation modes of iPAC 8000 After applying power the iPAC 8000 includes the following modes of operating for protecting the operation Each of operation modes will be described in detail later Switch position Mode of operation Operation Mode Switch OS can not execute autoexec bat Flash can be read write OS can execute autoexec bat Flash is read only lock OS can execute autoexec bat Run Flash can be read write iPAC 8000 User Manual Version 1 0 beta3 February 2009 25 2 1 2 1 Init mode The Init mode represents there is no program running on the iPAC 8000 and the 5 digits 7 SEG LEDs will count the number as shown below 0 000 00002 00003 gt 2 1 2 2 Lock mode The lock mode prevents the data from being programmed in the
69. utable under a standard DOS Photo Shop office 2007yj i4 AN DOS whether PC DOS MS DOS or ROMDOS is a set of commands or code that tells the computer how to process information DOS runs programs manages files controls information processing directs input and output and performs many other related functions The following table compares the features between MiniOS7 and ROM DOS T aa Yes No Support for ASIC key Flash ROM pean 05 pds e Yes wo Built in hardware diagnostic functions Yes No iPAC 8000 User Manual Version 1 0 beta3 February 2009 115 LALA EA Functions Supported connection ways 1 COM port connection RS 232 2 Ethernet connection TCP amp UDP Supported since version 3 1 1 Maintenance 1 Upload file s 2 Delete file s 3 Update MiniOS7 image Configuration 1 Date and Time 2 IP address 3 COM port 4 Disk size Disk A Disk B Check product information 1 CPU type 2 Flash Size 3 SRAM Size 4 COM port number Download location http fto icodas com tw oub cd 8000cd napdos minios utility minios7_utility Appendix E What is MiniOS7 Utility MiniOS7 Utility is a tool for configuring uploading files to all products embedded with ICPDAS MiniOS7 with easiness and quickness Note Since version 3 1 1 the Utility can allow users remotely access the controllers 7188E 8000E ect through the Ethernet Including Frequently Used Tools a 1
Download Pdf Manuals
Related Search
Related Contents
DRM029, 3-Phase PM Synchronous Motor Control with Quadrature Mode d`emploi マシンビジョンシステム MYVIS YV260 EX300 Power Recorder USER`S MANUAL アスペルガー症候群を含む発達障がい者自身の理解を深め、周囲への Copyright © All rights reserved.
Failed to retrieve file