Manual CP 486 Order No.: HB73e Rev. 00/14 ____________________________________________________________________________________________ Subject to changes for the purposes of technical progress.
The statements of this manual are subject to changes and without guarantee. Changes of contents can result at each time without preliminary announcement. Hardware and software described in this manual is underlying the conditions of a general or specific licence agreement (single user licence) and may only be used or copied in agreement with the conditions of this licence agreement. Violation obligates to compensation.
Contents Contents Page 7 7 8 8 9 10 1. Introduction 1.1 General 1.2 Application Area 1.3 Structure and Operation 1.4 Block Diagram of CP486 1.5 Special Components 2. Hardware 2.1 Structure of Modules 2.1.1 Structure of the Base Module 2.1.2 Structure of CP486S Module 2.1.3 Structure of CP486M Module 2.1.4 Structure of CP486ML Module 2.1.5 Structure of CP486L Module 2.1.6 Structure of CP486XL Module 2.1.7 Diagram of DIP Switches, Jumpers and Plug Connectors 2.2 Setting of DIP Switches 2.
Contents 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.20 4.
Contents 5. 6. Utility Software for MS-DOS 5.1 MS-DOS Utilities for Silicon Disk Operation 5.1.1 Silicon Disk Driver 5.1.2 Formatting Program for SRAM-DISK 5.1.3 Silicon Disk Generator 5.1.4 Silicondisk-Loader 5.1.5 Examples for Applying the Silicon Disk 5.1.5.1 Example for Generating a SRAM-Disk 5.1.5.2 Example for Generating a FLASH-PROM-Silicon Disk 5.1.5.3 Example for Generating a Program Memory with EPROMs 5.1.5.
Contents 6.3.3.10 6.3.3.11 6.3.3.12 6.3.3.13 6.3.3.14 6.3.3.15 6.3.3.16 6.3.3.17 6.3.3.18 6.3.3.19 6.3.3.20 6.3.3.21 6.3.3.22 6.3.3.23 6.3.3.24 6.3.4 6.4 6.4.1 6.4.2 6.4.2.1 6.4.2.2 6.4.2.3 6.4.2.4 6.4.2.5 6.4.2.6 6.4.2.7 6.4.2.8 6.4.2.9 6.4.2.10 6.4.3 6.4.3.1 6.4.3.2 6.4.3.3 6.4.3.4 6.4.3.5 6.4.3.6 6.4.3.7 6.4.3.8 6.4.3.9 6.4.3.
Contents 6.4.4 6.4.4.1 6.4.4.2 6.4.4.3 6.4.4.4 6.4.4.5 6.4.4.6 6.4.4.7 6.4.4.8 6.4.4.9 6.4.4.10 6.4.5 6.5 7. Interface to Turbo-C (2.0 and C++ from 1.0), Microsoft-C 6.
Contents 6 VIPA GmbH CP486 ⋅ 00/14
Introduction 1. 1.1 Introduction General This manual describes the handling with CP486 modules CP4-BG61, -BG62, -BG63, -BG64, and BG65 of VIPA GmbH started with revision level 1. The revision level 1 comprises the SYSTEMBIOS versions V18 and the VGA-BIOS V13. The CP486 modules are applicable to all automation systems (PLC-115U ...PLC-155U). The CPU486SLC has an internal cache of 1 KB. At the whole, the CP486 with 25Mhz runs faster by an factor 2.5-3 than the CP386 with 16Mhz.
Introduction Linkage with PLC: This chapter describes detailed how to proceed with the linkage between PLC and CP486, that is from the PLC point of view as well as from CP486 point of view. 1.2 Application Area CP486 application within an automation system can be extended to many areas. Feasible application areas are visualisation, measured value processing, production data acquisition, network servicing up to the process control system and management computer.
Introduction 1.
Introduction 1.5 Special Components Interface Modules The four serial interfaces are configurable by plugin modules. As a standard, the following assignment is supplied: COM1 and COM3 as V24 interface, COM2 as 20mA interface and COM4 as RS422/485 interface. Diagnostic Interface All serial communications can be acquired by menas of the diagnostic terminal UPI-FOX via the diagnostic interface. This interface makes available sending and receiving signals of the individual interfaces as TTL signals.
Introduction - Silicon Disk Additional Board The different additional boards are plugged into the slot for the PC bus and thus, have a capacity of up to 7MB. These silicon disk boards are available with FLASH-, SRAM- and EPROM assembly. The different types EPROM, SRAM, FLASH-PROM and OTP-ROM of the silicon disks differ as follows: - OTPROM-Disk is a read-only memory medium in the builtin mode comparable to a disk with write protection.
Hardware 2. 2.1 2.1.
Hardware Structure of the Base Module The module contains a PC-AT486 with: - CPU80486SLC and FPU80387SX base main memory up to 4MB keyboard interface connection VGA graphics slot for interfacing flat displays up to 4 slots for serial interface modules (COM1, COM2, COM3, COM4) up to 2 parallel interfaces (LPT1, LPT2) interface for floppy disk drive interface for hard disk base for silicon disk (2 memory chips) slot for silicon disk (memory card) removable 16bit AT bus 8K Dual Port RAM for PLC as CP interfa
Hardware 2.1.2 Structure of CP486S Module (VIPAOrder-No. CP4-BG61): Controller for analog video signal Monitor connection COM1 (V24 interface) COM2 (20mA interface) Keyboard connection LPT1 (printer interface) 24V socket (ext.
Hardware Structure of CP486S (VIPA Order-No. CP4-BG61): - CPU80486SLC and base for FPU80387SX main memory 4MB (CP4-BG61) keyboard interface connection VGA graphics 2 serial interfaces COM1 (V24), COM2 (20mA) (see also chapter 1.
Hardware 2.1.3 Structure of CP486M Module (VIPA Order-No. CP4-BG62): Controller for analog video signal Monitor connection COM1 (V24) COM3 (V24) COM2 (20mA) COM4 (RS422/485) Keyboard connection LPT1 (printer interface) Floppy disk drive 24V socket (ext.
Hardware Structure of CP486M (VIPA Order-No. CP4-BG62): - CPU80486SLC and base for FPU80387SX main memory 4MB (CP4-BG62) keyboard interface connection VGA graphics slot for interface to flat displays 4 serial interfaces COM1 (V24), COM2 (20mA), COM3 (V24), COM4(RS422/RS485) (see also chapter 1.
Hardware 2.1.4 Structure of CP486ML Module (VIPA Order-No. CP4-BG63): Controller for analog video signal Monitor connection Floppy disk drive COM1 (V24) COM2 (20mA) Keyboard connection LPT1 (printer interface) Opening for AT card 24V socket (ext.
Hardware Structure of CP486ML (VIPA Order-No. CP4-BG63): - CPU80486SLC and base for FPU80387SX main memory 4MB (CP4-BG63) keyboard interface connection VGA graphics slot for interface to flat displays 2 serial interfaces COM1 (V24), COM2 (20mA) (see also chapter 1.
Hardware 2.1.5 Structure of CP486L Module (VIPA Order No. CP4-BG64): Controller for analog video signal Monitor connection COM1 (V24) COM3 (V24) Floppy disk drive COM2 (20mA) COM4 (RS422/485) Keyboard connection LPT1 (printer interface) 24V socket (ext.
Hardware Structure of CP486L (VIPA Order No. CP4-BG64): - CPU80486SLC and base for FPU80387SX main memory 4MB (CP4-BG64) keyboard interface connection VGA graphics slot for interface to flat displays 4 serial interfaces COM1 (V24), COM2 (20mA), COM3 (V24), COM4(RS422/RS485) (see also chapter 1.
Hardware 2.1.6 Structure of CP486XL Module (VIPA Order No. CP4-BG65): Controller for analog video signal Monitor connection COM1 (V24) COM3 (V24) Floppy disk drive COM2 (20mA) COM4 (RS422/485) Keyboard connection LPT1 (printer interface) 24V socket (ext.
Hardware Structure of CP486XL (VIPA Order No. CP4-BG65): - CPU80486SLC and base for FPU80387SX main memory 4MB (CP4-BG65) keyboard interface connection VGA graphics slot for interface to flat displays 4 serial interfaces COM1 (V24), COM2 (20mA), COM3 (V24), COM4(RS422/RS485) (see also chapter 1.
Hardware 2.1.
Hardware PCBs 5012V15, 5012V16 and 5012V17 CP 486 ⋅ 00/14 VIPA GmbH 25
Hardware 2.
Hardware Setting of DIP Switch S2: DIP switches 1-3 determine the system configuration if the system SETUP has been lost. The system configuration is backed up by a Lithium accumulator approx. 6 months. If the module is stored more than 6 months, then the battery is empty and the filed configuration lost. In this case, a configuration can be set by means of switches 1-3 to ensure a module startup. The exact configuration can be loaded by software after the startup.
Hardware 2.
Hardware Overview of the Circuit Diagram of the 5V and 24V Power Supply: +24V VGA socket +5V +5V M5 M5 PLC S5 F2 upper bus plug +24V keyboard socket +24V M24 +5V M5 X3 F1 M24 1 +24V diagnostic socket M24 +5V M5 + 24V M24 PLC S5 lower bus socket + 5V ext.
Hardware 2.4 Installation of Chip Silicon Disk The module contains 2 bases (IC3 and IC4) for special memory chips. The bases for the silicon disk must be respectively assembled and the jumpers set up. Jumper setup differs for the various base PCB (printed circuit board) versions. Battery Backup of the Chip Silicon Disk SRAM: The silicon disk SRAM can be operated battery backed-up.
Hardware Base board 7458V24/7459V24 (PCB 5012V14), base board 7458V25/7459V25 (PCB 5012V15), base board 7458V26/7459V26 (PCB 5012V16), base board 7458V27/7459V27 (PCB 5012V17): Jumper fields X38 and X39 are placed onto sockets of silicon disk chips IC3/IC4.
Hardware 2.5 Installation of the Memory Card Silicon Disk The memory card is installed by inserting the memory card into the provided plugin socket.The memory card silicon disk is always set up to address 800000. 2.6 Installation of an Additional Silicon Disk Board Various additional silicon disk boards are available or in progress. These are provided essentially for the CP486S and CP486M. They are to be plugged into the PC/AT extension bus /X10, X16 - see page 20, 21).
Hardware 2.8. Interface Installation for VGA Flat Displays A module (optional) can be plugged into the pin header X22 having a 15-pin SUBD socket at the module front. VGA flat display with 16 grey levels (EL display, 640*480 pixel) or a color TFT display (640*480 pixel, max. 64 colors) can be connected to this 15-pin SUBD socket. 2.
Hardware 2.10 Slots for CP486 in the PC Following surveys show the possible installation places (signed by x) for the CP486 in the different PLC card cages. Slots in PLC-115U Slots Power supply module X X Central module X X X X X XXXXXX X VIPA-CP486 (in CR 700-1) VIPA-CP486 (in CR 700-2) VIPA-CP486 (in CR 700-3) X X X X CP486 has to be run in the adaptation case in PLC-115.
Hardware Slots in PLC-150U Slots XXXX Central module X Marshalling module 756 XXXXXX Main memory 340, 350 XX XXXX Interfaces 300-5, 301-5 Interfaces 300-3, 301-3 XX PG-interface connections VIPA-CP486 XXX XXXXXXX Slots 3, 11 and 19 are of use for the CP486 only if the marshalling module 756 or the VIPA economy memory are inserted to slot 27. Slots in PLC-155U Slots Coordinator Central modules Communication processors X XXX XXXXXXXXXXXXX XX XXXX Interfaces 300-5, 301-5 Interf.
Hardware Slots in EG-185U Slots X Interfaces 300 Interfaces 314, 318 VIPA-CP486 36 X XXXXXXXXXXXXXXXX VIPA GmbH CP486 ⋅ 00/14
Assignment of Plugs and Sockets 3. Assignment of Sockets and Plugs The figures show plugs or sockets when regarding the module in the card cage. The top in the figure is also the top on the plug. 3.1 15-pin SubD-Socket for Connecting the Monitor 15 5 10 14 4 9 13 3 8 12 2 7 11 1 6 Socket assignment is specified by the DIP switch SW2 (5,6,7,8), (section 2.2). Mode Cab.length PIN-NO.
Assignment of Plugs and Sockets 3.2 9-pin SubD-Plug with V24 Interface (COM1 and COM3) DSR- 6 O RTS- 7 O CTS- 8 O RI 9 O O 1 DCD O 2 RXD O 3 TXD O 4 DTR- O 5 GND The interface contains both types of handshake-signals (RTS/CTS and DSR/DTR). Which type of signals is to be used depends on wiring and programming of the interface.
Assignment of Plugs and Sockets 3.3 9-pin SubD-Plug with 20mA Interface (COM2) This interface can be operated as an active and passive 20mA-interface. The active operation requires a module supply of 24V. The 24V supply is configured by means of the jumper field X3 (cf. section 2.3) TXD- 6 O S1- 7 O RXD- 8 O S2- 9 O O 1 O 2 TXD+ O 3 S1+ O 4 RXD+ O 5 S2+ Passive 20mA-interface: Passive interface operation uses 4 interface signals.
Assignment of Plugs and Sockets 3.4 9-pin SubD-Plug with RS422/485 Interface (COM4) This interface can be operated as RS422-interface, i.e. for point-to-point circuit with separate sendreceive lines, as well as RS485-interface for a bus system with send-receive function at the same line. For this purpose, the operating mode is switched over via a bus master by appropriate attending the SEL-signal. TxD lines and RxD lines require for all cases each in pairs twisted and in pairs shielded lines. 3.4.
Assignment of Plugs and Sockets 3.4.2 Operation as RS485 Interface: DTR RxD-/TxDRTS 6 7 8 9 O 1 - O 2 - O 3 SEL O 4 RxD+/TxD+ O 5 - O O O O For RS485 operation only a two-wire line is terminated. The SEL-signal is used to switch over among send and receive. A logic 1 (5V) switches to transmission and a logic 0 (0V) to receive. SEL-signal can be controlled via DTR, via RTS or externally. This is selected via a jumper in the plug.
Assignment of Plugs and Sockets 3.5 5/8-pin DIN Socket for Keyboard 8 7 3 5 O O O O O O O 6 1 4 O 2 Pinno.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.7 2-pin Plugin Socket for External 24V Supply CP486 delivery includes a 1m long connecting cable with plug. M24 (mass of 24V) and P24 (+24V) is are supplied via the two pins. Both pins are optionally assigned. Polarity is of no importance. Attention: Concerning the 24V supply via this socket it must be ensured that the 24V supply of back plane bus is deactivated via the jumper field X3 (cf. section 2.3)! 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 46 D C GND SD15 18 MASTER- SD14 17 +5V SD13 16 DRQ7 SD12 15 DACK7- SD11 14 DRQ6 SD10 13 DACK6- SD9 12 DRQ5 SD8 11 DACK5- MEMW- 10 DRQ0 MEMR- 9 DACK0- LA17 8 IRQ14 LA18 7 IRQ15 LA19 6 IRQ12 LA20 5 IRQ11 LA21 4 IRQ10 LA22 3 IOCS16- LA23 2 MEMCS16- SBHE 1 VIPA GmbH CP486 ⋅ 00/14
Assignment of Plugs and Sockets 3.10 3.10.1 3.10.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.16 26-pin Pin Header (X27) with Centronics Interface (LPT 2) 26 - SLCT 25 24 GND PE 23 22 GND BUSY 21 20 GND ACK- 19 18 GND PD 17 16 GND PD6 15 14 GND PD5 13 12 GND PD4 11 10 GND PD3 9 8 SLCTIN- PD2 7 6 INIT- PD1 5 4 ERR- PD0 3 2 AFD- STB- 1 This interface can be made available at the module front via an optional connection cable with cover sheet.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.
Assignment of Plugs and Sockets 3.19 2-pin Pin Header (X4) for Speaker Connection Pinno. Signal 1 5V VCC 2 VF (voice-frequency) signal 3.20 Fuses for External Current Consumers F1 F2 Fuse for 24V outputs (2A) Fuse for 5V outputs (2A) These plugin fuses protect the 5V- and 24V connections for external consumers against overloading.
BIOS and System Programming 4. 4.1 BIOS Description and System Programming System Structure CP486 has a firmware with basic functions for the present hardware - so called BIOS. The BIOS of the CP486 consists of several utilities: QUADTEL-BIOS: This part has usual functions for servicing of standard components of an ATcompatible computer.
BIOS and System Programming 4.2 BIOS-SETUP At the system startup the active terminal displays the BIOS version. First BIOS runs a test with different system components and then a memory test. After test completion the system tries to boot from the disk drive A, if existent, and then from disk drive C, if existent. The SETUP can be invoked only during the system startup by pressing the key. This input ensues as soon as the respective message is displayed on the screen.
BIOS and System Programming In the bank field the base address of the PLC bank can be set from 0 ... 248 in steps of 8. The specified area is activated immediately at the start up of the CP486 and is available at the PLC side. By means of the SETUP field "disk drive A" the user is able to specify further drive types (also a silicon disk) as boot drive for drive A. In order to take an effect, a floppy disk drive for A has to be selected in the second part of the SETUP.
BIOS and System Programming 4.2.2 QUADTEL-BIOS Selection Menue After leaving the VIPA-BIOS-Setup you select a menue: Modifications of the system setups in the different windows "Setup" and "Extended BIOS-Features" should be carried out only by experienced appliers. Normally, it is not necessary to modify any system setups. The menue item "System Information" informs about the applied QUADTEL-BIOS. In the menue item "System Security" a second password can be entered as a boot protection.
BIOS and System Programming 4.2.3 QUADTEL-BIOS-Setup The BIOS Setup has the following setup possibilities (shown are the default setups): In the BIOS-Setup the following system parameters can be set up: - date - time - password for system startup - type of floppy disk drive 1 (360KB, 720KB, 1.2MB, 1.44MB) - type of floppy disk drive 2 (360KB, 720KB, 1.2MB, 1.44MB) - type of the hard disk 1 (1 .. 47) - type of the hard disk 2 (1 ..
BIOS and System Programming 4.2.4 Extended BIOS-Features The Extended BIOS has the following additional features (shown are the default setups): Further system parameter can be set up in the window Extended BIOS Features. The setup should be modified only by experienced users. Normally, it is not necessary to intervene. The control keys are displayed in the lower part of the screen. By pressing the key you get help information.
BIOS and System Programming 4.2.5 AT ROM Diagnostics Almost all system components can be tested via the integrated AT ROM Diagnostics: The individual system components can be tested in the menue item "Diagnostics". The control keys are displayed in the lower part of the screen. By pressing the key you get help information. You leave the diagnostics window and return to the menue with the key.
BIOS and System Programming 4.3 4.3.1 Bit 0 Bit 1 Bit 2 System Register CP-Status Register (I/O-Address 280 hex - read only) /PLC bank interrupt 0 1 /WD reset 0 1 /PFO (accu supervision) 0 1 Bit 3 reserved status INT 12 was triggered via PLC-access to element 1023 in the current bank no access to bank element 1023 via PLC error: watchdog has announced no error CP accu voltage under 2.5V (accu empty or defective) CP accu voltage over 2.
BIOS and System Programming 4.3.
BIOS and System Programming 4.3.4 Watchdog (I/O-Address Area 270-277) The watchdog is deactivated after system startup and after reset, and can be set on and off by means of software. The watchdog must be triggered every 1.6 seconds after enabling. This triggering is realized by programming a flank. If it is not re-triggered within these 1.6 seconds, the watchdog calls a system reset (depending on CONTROL register bit 0).
BIOS and System Programming 4.3.5 Interrupt-Management Interrupt Initiation in the CP The hardware interrupt IRQ12 (software interrupt 74) on the CP486 can be initiated by PLC access to element 1023 of respectively active bank BASP activation on back plane bus The appertaining interrupt vector is filed to address 1D0 - 1D3 (hex). The initiated interrupt must be reset by accessing the interrupt reset register (address: C000:9F8E) in the interrupt service routine.
BIOS and System Programming BEGIN GOTOXY(1,10); WRITE('INTERRUPT 12 was not initiated by PLC END; ') PROCEDURE BASP_INT; BEGIN GOTOXY(1,10); WRITE('INTERRUPT 12 was not initiated by BASP END; PROCEDURE KACHEL_INT; BEGIN MEM[$C000:$9F8E]:=0; ') { Reset interrupt by accessing } { the interrupt reset register } GOTOXY(1,10); WRITE('INTERRUPT 12 was initiated by PLC via bank access END; ') PROCEDURE INT_ANZAHL; BEGIN GOTOXY(1,1); WRITE('Number of initiated INTERRUPTs :',I); END; PROCEDURE INT_AKTIV; BEG
BIOS and System Programming 4.3.6 CMOS-RAM Statusbyte (CMOS-RAM Address 4E) CMOS-RAM used contains additional memory areas from 40 to 4F. These memory areas are used by VIPA for BIOS-extensions and for the VIPA-SETUP, and are protected by a checksum. The user is not allowed to make any changes in this RAM area. Byte 4E - the VIPA-CMOS status byte - is excepted herefrom.
BIOS and System Programming 4.3.7 ROM-SETUP VIPA-BIOS enables an ROM-SETUP. In this case, CMOS-RAM is only used to buffer date and time. The proper system SETUP is filed in the system EPROM. Table for ROM-SETUP is stored in the BIOS-EPROM in the addresses F000:7800 to F000:784E (hex). This table contains as a standard the SETUP table in case of battery failure. Address F000:784F (hex) includes a control flag having following functions: FF For system startup, SETUP from CMOS-RAM is used.
BIOS and System Programming 4.3.8 Bank Interface 4.3.8.1 Operating Modes of Bank Interface The bank interface on the CP486 consists of a 8 KByte RAM memory, which can be written or read from the PLC as well as from the CP side. Memory access and memory size are adjusted via registers on the CP486 side. Following operating modes are available: Operating Banks via Bank Selection Register: In this mode of operation the individual banks are selected via the bank select register on the PLC side.
BIOS and System Programming 4.3.8.2 Bank Interface Registers The registers must be written in the following order: Ident register Bank initial register 1 Bank initial register 2 Configuration register Interrupt reset register (C800:1F80) (C800:1F84) (C800:1F86) (C800:1F82) (C800:1F8E) Ident Register (Address 0C9F80H): By means of this register the bank numbers are set up to which the bank interface on PLC side is responding.
BIOS and System Programming Bank Initial Register 1 / 2 (Address 0C9F84H / 0C9F86H) The start address of the bank on the SPS side is set via the bank start register. The bank start address must be a multiple of the bank size. Moreover it has to be checked, whether the address area is available resp. free at the back plane bus. For the PLC-135 only addresses in the area Fxxx(hex) are possible.
BIOS and System Programming Configuration Register (Address 0C9F82H) The configuration register is used to configure the number of banks, bank size and mode of the bank operation. Programming of this register approves the bank inerface for implementation towards PLC side.
BIOS and System Programming 4.3.8.3 Configuration Example: Standard CP BankOperation (8 Banks with each 1KByte) Configuration: Number of banks: Bank capacity: PLC initial address of the bank: Specified bank numbers: Bank selection in the PLC: 8 1024 Byte F400(hex) (Note: the initial address must be in the Fxxx(hex) range) 8 .. 15 (Note: first number must be a multiple of the number of banks.
BIOS and System Programming 4.3.8.4 Configuration Example: Bank Operation (4 Banks with each 64 Byte) Configuration: Number of banks: Bank capacity: PLC initial address of the bank: Specified bank numbers: Bank selection in the PLC: 4 64 Byte F500(hex) (Note: the initial address must be in the Fxxx(hex) range) 16..19 (Note: the first number must be multiple of the number of banks.
BIOS and System Programming 4.3.8.5 Configuration Example: Bank Operation via Highest Bank Address Configuration: Number of banks: Bank capacity: PLC initial address of the bank: Specified bank numbers: Bank selection in the PLC: 8 256 Byte 0000(hex) 80 .. 87 (Note: the first number must be a multiple of the number of banks.
BIOS and System Programming 4.3.8.
BIOS and System Programming 4.4 4.4.1 Address Assignment, Interrupts and DMA Channels Memory Address Assignment 000000 0A0000 0C0000 0C8000 - 09FFFF 0BFFFF 0C7FFF 0C9FFF 640KB 128KB 32KB 8KB 0CA000 - 0CBFFF 0CC000 - 0CFFFF 0D0000 - 0D7FFF 8KB 16KB 64KB 0E0000 - 0FFFFF 100000 - 15FFFF 45FFFF .. 128KB - 7FFFFF 800000 - BFFFFF C00000 - DFFFFF FE0000 - FFFFFF CP 486 ⋅ 00/14 4MB 2MB 128KB DRAM main memory screen memory VGA-BIOS bank interface register area ident register: C9F80 conf.
BIOS and System Programming 4.4.
BIOS and System Programming 4.4.
BIOS and System Programming 4.4.
Utility Software for MS-DOS 5. Utility Software for MS-DOS It is recommended to use MS-DOS 4.01 or MS-DOS 5.0 as operating system. Setting up and further description for this operating system is described in the accompanying manuals of Microsoft resp. in supplementary documentation of the publishing house MARKT UND TECHNIK and DATA BECKER. Informations concerning internal system functions can be found in the book PC INTERN of the publishing house DATA BECKER. Concerning the operation systems MS-DOS 3.
Utility Software for MS-DOS 5.1 MS DOS Utilities for Silicon Disk Operation 5.1.1 Silicon Disk Driver The BIOS contains driver functions for operating and usage of standard hardware components. Additional or modified hardware has also to be operated by drivers. For fear that every small system change requires to set up a new BIOS, MS-DOS offers the possibility to couple additional drivers to the BIOS. This happens by means of an entry in the file CONFIG.SYS.
Utility Software for MS-DOS The corresponding driver is installed in the file CONFIG.SYS by the following command: device=[d:][path]SDxxx.SYS [remark][/bb][remark][/llll][remark][/pp] The particular parameters have the following function: [c:][path] drive and path specification with driver SDxxx.SYS, whereby xxx indicates the memory type being used for the silicon disk. The three described drivers SDRAM, SDROM and SDPEROM are available.
Utility Software for MS-DOS Memory Card Silicon Disk with 1MB ROM: DEVICE = \DEVICE\sdrom.sys base address=/80 size=/1024 Explanation: The driver is in the subdirectory "DEVICE" on the boot drive. The silicon disk consists of a read-only memory. Therefore, the driver SDROM.SYS is taken. The base address of the memory card slot is 800000H. The silicon disk has a capacity of 1024 KByte = 1MB. Memory Card Silicon Disk with 128KB SRAM: DEVICE = \DEVICE\sdram.
Utility Software for MS-DOS 5.1.2 Formatting Program for SRAM Silicon Disk Similar to a disk SRAM silicon disks have to be formatted before they are usable as storage media under DOS. The program FORMATSD.EXE serves to format the silicon disk.
Utility Software for MS-DOS 5.1.3 Silicon Disk Generator With the program SDGEN binary files for the EPROMs, FLASH-PROMS and PEROMS of the program storage are generated. The program is called in the following way: [c:][path] SDGEN The program requires the following parameters: EPROM size in bit(0,512,1M,2M,4M,8M): The size of the EPROMs is to be specified (e.g. 1M for EPROM 27C010). Files of the appropriate size will be generated for a EPROM programming device.
Utility Software for MS-DOS 5.1.4 Silicon Disk Loader The program SDLOAD.EXE is used to load the silicon disk with the prepared data records. This loader must be applied for FLASH-PROMs and for PEROMs. FLASH-PROMs can only be deleted complete and are also completely written again with this program. For PEROMs the number of write cycles is very restricted.
Utility Software for MS-DOS Then the base address is inquired where the silicon disk board is to be applied. This address is entered as hexadecimal address: Possible input values are: 800000 840000 880000 ... FC0000 Either the file contents generated with SDGEN or the contents of of a logical drive can be transferred now to the silicon disk. If the contents of a file has to be transferred, the file name must be entered. If the contents of a drive has to be transferred, only the drive label is specified.
Utility Software for MS-DOS 5.1.5 Examples for Applying the Silicon Disk 5.1.5.1 Example for Generating a SRAM-Disk: Goal: On the base address C0 0000hex, an SRAM silicon disk with a capacity of 256KB (consisting of two 128KByte SRAMs (1MBit SRAMs)) should be generated. The base board is to be assembled with 2 SRAMs each of 128KByte-chips and the jumpers set up adequate (see HW-description of the base board). The system is booted from hard disk (drive C:). The programs SDRAM.SYS, FORMATSD.
Utility Software for MS-DOS 5.1.5.2 Example for Generating a FLASH-PROM Silicon Disk Goal: On the base address C0 0000hex, an FLASH-PROM silicon disk with a capacity of 1MByte (consisting of four 256KByte FLASH-PROMs (2MBit FLASH-PROMs)) should be generated. A silicon disk board with four 256KByte FLASH-PROMs (2MBit FLASH-PROMs) and two 512KByte SRAMs (4MBit SRAMs) is used. The base address of the FLASH-PROM disk is set to C0 0000 hex and to a length of 1MB.
Utility Software for MS-DOS For transferring purposes of this master to the FLASH-PROM disk, the program SDLOAD is called and the following parameters are entered: C:\SD\SDLOAD Following FLASH-PROMs or EEPROMs/PEROMs resp.
Utility Software for MS-DOS 5.1.5.3 Example for Generating a Program Memory with EPROMs: Goal: An EPROM silicon disk is to be generated using two 512KByte EPROMs. For this purpose, an SRAM disk with two 512KByte SRAMs (4MBit SRAMs) is installed on the base board. The base board is to be assembled correspondingly and the jumpers set up accordingly (see HW-description of the base board). C0 0000hex is set up as base address. The system is booted from hard disk (drive C:). The programs SDROM.SYS, SDRAM.
Utility Software for MS-DOS From this master now files for the two EPROMs must be generated. Therfor the program SDGEN is called up and the following parameters are entered: C:\SD\SDGEN EPROM-SIZE in Bit (0,512,1M,2M,4M,8M): 4M SPLITTED IN ODD-EVEN (Y/N): Y SOURCE DRIVE (A: .... F:) : D: TARGET-FILE NAME (max. 8 char.) : EPROM The program generates the files EPROM.O00 and EPROM.E00. Hereby it refers to binary files for the EPROM programming device. Every file belongs to an EPROM.
Utility Software for MS-DOS 5.1.5.4 Example for Generating a ROM-Silicon Disk with FLASH-PROMs by Means of the MS-DOS-RAM-Disk: Goal: On the silicon disk board, an FLASH-PROM silicon disk with a capacity of 2MByte (consisting of eight 256KByte FLASH-PROMs (2MBit FLASH-PROMs) should be generated started with the base address C0 0000hex. A silicon disk board with eight 256KByte FLASH-PROMs (2MBit FLASH-PROMs) is used. The base address is set to C0 0000 hex and to a length of 2MB.
Utility Software for MS-DOS No data medium label is entered but only the enter key is actuated. Then the question appears: Delete current data medium label (Y/N)? This question is acknowledged with "Y" and the enter key. After this the program LABEL is finished (MS-DOS-Prompt). Next, all required files are copied to the drive D: (adhere following order if the drive should be bootable): 1. Io.sys 2. Msdos.sys 3. command.com 4. remaining files and directories in optional order Attention: The files Io.
Utility Software for MS-DOS C:\SD\SDLOAD FLASH-PROMs resp. EEPROMs/PEROMs can be programmed: 1 Am28F010-150,P28F010-150 2 Am28F020-150,P28F020-150 3 Am28F040-150,P28F040-150 4 AT28C010-150 5 AT28C040-150 6 AT29C010-150 7 AT29C040-150 8 AT29MC010-150 9 AT29MC040-150 Please indicate the number of the ROM-type you used: 2 Please indicate the number of modules specified above (2,4,6,8): 8 Please indicate the base address, you specified on the silicon disk board.
Utility Software for MS-DOS 5.
Utility Software for MS-DOS 5.3 Program CPLINK for Computer Link With this program files can be loaded to the CP486 or read from the CP486 via the serial interface. This way CP486 modules without floppy disk drive or without alternate memory cards can be supplied with data and programs or recorded data can be read out.
Utility Software for MS-DOS 5.4 Program for Visualizing the PLC Process Image The program S5KOP serves in the current version to visualize the process image in the processor of the automation system. The MS-DOS program S5KOP.EXE in the version 1.0 from 4-19-1991 has a capacity of 75645 bytes. VIPA handling modules for the CP486 must be included in the PLC. Calling from MS-DOS is realized via the command "S5KOP". A title screen is displayed which is cleared after pressing an optional key.
Utility Software for MS-DOS 5.5 EMS Driver Driver for the EMS memory on CP486 is contained on the optionally available disk with original QUADTEL software (software package CP4-SW583 (MS-DOS diskette, 3.5", 720KB) included the manual CP4-HB72). This software is only sold as simplex capability, i.e. every system where this driver is utilized requires a licence. This package contains inter alia the following programs and drivers (cf. also section 5.
Linkage with PLC 6. Linkage with PLC 6.1 General Description Data transfer between CP486 and PLC is supported by handling modules on PLC side and by software interrupts on CP side.
Linkage with PLC 6.2 Installation of Bank Software for Linking PLC and CP486 6.2.1 PLC Side: Handling Modules handling modules FB1 and FB2 have to be loaded in the PLC to enable communication with the CP486. Handling module FB1 is called up in OB1 and handling module FB2 in the restart modules (OB21 and OB22).
Linkage with PLC Example for calling up FB2 in OB21: 0000 0005 Module#OB21 BIB ;SPA FB 2 NAME #SYNCHRON SSNR =KY +32 WART =KF +0 PAFE =MB 98 ;BE Transfer parameters: SSNR: KF WART: PAFE: Number of basic bank =0 FB-SYNCHRON does not wait until every single bank is synchronized by CP >< 0 FB-SYNCHRON waits at every single bank until the CP has synchronized this bank BY Scratch markers used: CP 486 ⋅ 00/14 Error acknowledgement message of handling module = 0 no error occurred >< 0 error occurred:
Linkage with PLC 6.2.2 CP486: MS-DOS Driver Program For communication via banks between PC and CP a specific communication driver must be loaded in the CP486. This driver is specific for the communication with the VIPA handling modules. The driver supplies functions which are easy to handle. The user needs no detailed information concerning structure and operation of the banks. The driver contains software to control all banks. At the moment it currently supports: banks 0 and 1 (PC active, CP passive).
Linkage with PLC programs can be started subsequently. This option is only meaningful, if communication ensues exclusively via banks 0 and 1 (CP passive). By pressing the F10-key and subsequent confirmation with "j" the driver will be removed again. /?, /H or /hxx This option shows a list of all possible options of the driver. Attention: The COM-driver is designed to work with CP486-modules of the VIPA GmbH exclusively and can be installed on these systems solely.
Linkage with PLC 6.2.3 Different Data Representation in Memory: For the transfer of data between CP and PC, the different representation of words and doublewords (extended words) on AT and PC (programmable controllers) has to be taken into account. Unlike AT´s the PLC stores the datatype word in a different form in memory, High-Byte and LowByte are stored reverse. In doublewords all 4 bytes are stored in exact reverse order.
Linkage with PLC 6.3 PLC-Jobs for CP486 (Functions for Bank 0 and 1) 6.3.1 Overview All PLC-jobs are transacted via banks 0 and 1. In this way the CPU can use series of MS-DOSfunctions. Die PLC-instructions are processed in background via interrupts, as soon as this driver is being installed. In this way no additional software for the CP486 is necessary to operate the PLC-jobs. The driver permits to call several MS-DOS system functions from the PC.
Linkage with PLC Bank no. 110 Function no.
Linkage with PLC Interface concept for banks 0 and 1 These two banks serve for reading and writing of data from or to the CP486 respectively. If the PLC tries to read data from the CP or write data, it has to call the suitable handling module (SEND or FETCH and RECEIVE). As a result these handling modules provide a job unit in bank 0 or bank 1. A maximum of one job can be entered in the banks 0 und 1 at a time. The size of the data to be transferred ranges from one word up to 504 words.
Linkage with PLC Processing a Read Job: With the handling module FETCH the applications software passes a read job to the CP. This handling module verifies as well as the handling module SEND the specified parameters, creates a job unit in bank 0 and sets the status to 'job is running'. By this the CP detects the existence of a new job and executes this job, as already described under 'Write'.
Linkage with PLC ,6.3.2 Parameterization of Handling Modules: The handling modules SEND (FB3), CONTROL (FB4), FETCH (FB5) and RECEIVE (FB6) are parameterized as follows: 6.3.2.1 Handling Module SEND (FB3, Relative Bank Number: 1): This handling module transfers a data block of up to 504 words from a DB to the CP486. For identification purposes a job number is also sent to the CP486. The handling module supplies the result by means of a display word in a marker word to the application program.
Linkage with PLC Error numbers are dual encoded. Error number 1 interface occupied by PLC (job runs) 6 interface occupied by CP QT/N: D KY left byte: reserve right byte: source module no. (2...255), DB-no. of the module with data to be transferred is specified QANF: D KF Initial address in DB (0...32761), the DW-no. is specified from which on the data to be transferred are filed in the DB. QLAE: D KF Number of data words to be transferred (1...
Linkage with PLC 6.3.2.2 Handling Module CONTROL (FB4, Relative Bank Number: 0/1): This handling module outputs the status of a write or read job. For identification purposes a job number is also sent to the CP486. The handling module supplies the result by means of a display word in a marker word to the application program. Parameterization errors are signalled via a marker byte.
Linkage with PLC PLC program (permitted 0...255) Error acknowledge message of handling module: = 0 no error occurred ><0 error occurred, error number in PAFE-Byte: 3 basic bank number is not divisible by 8 4 bank is not existent (acknowledgement delay at bank access) 5 bank is not synchronized yet by the CP 10 invalid job number (out of 1...127) 12 no DB open for indirect parameterization 16 DB for indirect parameterization too short 20 invalid marker word no. for ANZW (out of 0...
Linkage with PLC 6.3.2.3 Handling Module FETCH (FB5, Relative Bank Number: 0): This handling module transfers the read job to the CP486. For identification purposes a job number is also sent to the CP486. The handling module supplies the result by means of a display word in a marker word to the application program. Parameterization errors are signalled via a marker byte.
Linkage with PLC Error acknowledge message of handling module: = 0 no error occurred ><0 error occurred, error number in PAFE-Byte: 3 basic bank number is not divisible by 8 5 bank is not synchronized yet by the CP 10 invalid job number (out of 1...127) 12 no DB open for indirect parameterization 16 DB for indirect parameterization too short 20 invalid marker word no. for ANZW (out of 0...
Linkage with PLC 6.3.2.4 Handling Module RECEIVE (FB6, Relative Bank Number: 0): This handling module transfers a data block of up to 504 words from the CP486 to a DB. Before calling the RECEIVE module, the CP486 must be informed by means of the FETCH handling module about data which it requires. For identification purposes a job number is also sent to the CP486. This job number is returned together with the data.
Linkage with PLC ZT/N: D KY left byte: reserve right byte: target module no. (2...255), DB-no. of the module with data to be transferred is specified ZANF: D KF Initial address in DB (0...32761), the DW-no. is specified from which on the data to be transferred are filed in the DB. ZLAE: D KF Number of data words (1...504) at least to be transferred, CP passes only so many data words as it also supplies.
Linkage with PLC Data storage in a DB: ZANF points to the beginning DL DR A-Nr F-Nr No. of word being read Data being read by the CP are filed from here on ... ...
Linkage with PLC 6.3.2.5 Parameterization of File Accesses via Handles The COM-driver allows full access to all drives of the CP and supports access to directories. For every file access a drive and/or directory name can be specified and the same rules are valid, as known from MS-DOS. To access files under MS-DOS numbers, the so called handles are used. The amount of available handles and herewith the maximum number of open files at the same time is specified by the entry FILES = n in the CONFIG.SYS.
Linkage with PLC 6.3.2.6 File Names Like already mentioned, file names can be specified as well with drive and/or path specification. The CP486 software does not affect this. Directories are to be assigned, as usual, with a backslash (ASCII-Code 92, 5C hex). The character can also be entered correctly with the PG. The maximum length of a path specification is up to 64 characters.
Linkage with PLC 6.3.3 Function Description 6.3.3.1 Reset All Disk Drives (Disk Reset) This functon enables to store all modified and non-saved file buffers physically to the drives. Parameterization of FB3: F-Nr 13 ($0D hex) Parameterization of FB3: F-Nr DOSP 14 ($0E hex) Number of requested disk drive Drive number A: B: C: 6.3.3.2 Select Disk 0 1 2 Attention: For this function drive number 0 corresponds to drive A:, composite to other functions like "get current directory".
Linkage with PLC 6.3.3.3 Get Disk The function outputs the number of the current (default) disk drive. The corresponding disk drive character "A", "C", ... is filed to byte 6. Parameterization of FB5: F-Nr 25 ($19 hex) Parameterization of FB6: ZT/N ZANF ZLAE no. of DB for disk drive data position of data word in DB length of drive data in the DB in words (1) Content of DB: DW1 DW2 DW3 A-NR F-Nr number of words being read drive character drive number Parameter Disk drive no.: 0 1 .. A: B: ..
Linkage with PLC 6.3.3.4 Create Directory Parameterization of FB3: F-Nr QT/N QANF QLAE 57 ($39 hex) no. of DB with directory name position of directory name in the DB length of directory name in the DB in words Content of DB: DW1 DW2 DW3 ... directory name ... ... Note: The directory name must be terminated with 0-byte, if it is of odd-numbered length (is not necessary for even-numbered length). 6.3.3.5 Delete Directory Parameterization of FB3: F-Nr QT/N QANF QLAE 58 ($3A hex) no.
Linkage with PLC 6.3.3.6 Set Current Directory Parameterization of FB3: F-Nr QT/N QANF QLAE 59 ($3B hex) no. of DB with the directory name position of directory name in DB length of directory name in the DB in words Content of DB: DW1 DW2 DW3 ... directory name ... ... Note: The directory name must be terminated with 0-byte, if it has an odd-numbered length (is not necessary for even-numbered length). Regard that the current drive cannot be changed by means of this function.
Linkage with PLC 6.3.3.7 Get Current Directory Parameterization of FB5: F-Nr DOSP 71 ($47 hex) disk drive number Parameterization of FB6: ZT/N ZANF ZLAE no. of DB with the directory name position of directory name in DB length of directory name in the DB in words Content of DB: DW1 DW2 DW3 DW4 ... A-NR F-Nr number of words being read directory name ...
Linkage with PLC 6.3.3.8 Create File/Rewrite Existing File Parameterization of FB3: F-Nr DOSP QT/N QANF QLAE 60 ($3C hex) attribute of new file no. of DB with the file name position of file name in DB length of file name in the DB in words Content of DB: DW1 DW2 DW3 ... file name ... ... Parameter: Attribute: 00 01 02 04 normal read-only hidden system File attributes can be added up: e.g. attribute 03 => file is read-only and hidden.
Linkage with PLC 6.3.3.9 Create New File Parameterization of FB3: F-Nr DOSP QT/N QANF QLAE 90 ($5A hex) attribute of the new file no. of DB with the file name position of file name in DB length of file name in the DB in words Content of DB: DW1 DW2 DW3 ... file name ... ... Parameter: Attribute: Return of FB3: 00 normal 01 read-only 02 hidden 04 system File attributes can be added up: e.g. attribute 03 => file is read-only and hidden.
Linkage with PLC 6.3.3.10 Open File Parameterization of FB3: F-Nr DOSP QT/N QANF QLAE 61 ($3D hex) access mode no. of DB with file name position of file name in DB length of file name in DB in words Content of DB: DW1 DW2 DW3 ... file name ... ...
Linkage with PLC 6.3.3.12 Close File Parameterization of FB3: F-Nr DOSP 62 ($3E hex) handle number of file to be closed This function does not transfer any data from the PC to the CP486. 6.3.3.13 Delete File This function deletes a file on a CP486 drive. The file needs not to be open before deletion. It is even possible to delete a file without error message which is open somewhere else and is still processed. The user has to take care that no files being in the moment accessed are deleted.
Linkage with PLC 6.3.3.14 Rename File Parameterization of FB3: F-Nr QT/N QANF QLAE 86 ($56 hex) no. of DB with file name position of file names in DB length of file names in the DB in words Content of DB: DW1 DW2 DW3 ... original file name, zero character, new file name ... The file must not be opened before renaming. As data both file names are to be transferred connected, first the original file name and then the new file name. Both names must be separated by at least an ASCII-zero character.
Linkage with PLC 6.3.3.15 Set File Pointer Parameterization of FB3: F-Nr DOSP QT/N QANF QLAE 66 ($42 hex) POS (high-order byte), handle (low-order byte) no. of DB with file pointer position of file pointer in DB length of data record (2 words) Content of DB: DW1 DW2 high-order word of file pointer low-order word of file pointer Parameter: POS: 0 1 2 abs. position of file start rel. position from current position (signed) rel.
Linkage with PLC 6.3.3.17 Read File or Device Parameterization of FB5: F-Nr DOSP 63 ($3F hex) handle of the file Parameterization of FB6: ZT/N ZANF ZLAE no. of DB for data to be read target position in DB number of data words to be read (2) Content of DB: DW1 DW2 DW3 DW4 ... A-NR F-Nr number of words being read data word 1 data word 2 The number of words to be read from the file is not allowed to be higher than 504, otherwise the function is aborted with errors.
Linkage with PLC 6.3.3.18 Write File or Device Parameterization of FB3: F-Nr DOSP QT/N QANF QLAE 64 ($40 hex) handle of file no. of DB with data to be written position of data in DB length of data record to be written in words The number of words to read from the file is not allowed to be higher than 504, otherwise the function is aborted with errors. An exchange of bytes in a data word or doubleword is not provided in this function. All data are transferred unchanged from the PC to the CP486.
Linkage with PLC 6.3.3.19 Get Date Parameterization of FB5: F-Nr 42 ($2A hex) Parameterization of FB6: ZT/N ZANF ZLAE no. of DB for the date to be read target position in DB number of data words to be read (3) Content of DB: DW1 DW2 DW3 DW4 DW4 A-NR F-Nr number of words being read year month day week-day ----- Parameter: Year Month Day Week-day 1980 ... 2099 1 ... 12 1 ... 31 0 ... 6, (0=Sunday, 1= Monday, ...) 6.3.3.
Linkage with PLC 6.3.3.21 Program Execute Direct commands can be passed to the CP486 via this function. Parameterization of FB3: F-Nr QT/N QANF QLAE 75 ($4B hex) no. of DB with the MS-DOS-command line position of command line in DB length of command line in DB in words MS-DOS is no Multi-Tasking operating system enabling concurrent execution of several programs. As a rule, the main memory of a personal computer is too much limited as to load a series of resident programs with extensive data areas.
Linkage with PLC 6.3.3.22 Get MS-DOS Version Parameterization of FB5: F-Nr 48 ($30 hex) Parameterization of FB6: ZT/N ZANF ZLAE no. of DB for data to be read target position in DB number of data words to be read (3) Content of DB: DW1 DW2 DW3 DW4 DW5 A-NR F-Nr number of words being read main number subnumber OEM-number user number serial number The function returns 3 words as data number after an error-free completion.
Linkage with PLC 6.3.3.23 Get Detailed Error Information Parameterization of FB5: F-Nr 89 ($59 hex) Parameterization of FB6: ZT/N ZANF ZLAE no. of the DB for data to be read target position in DB number of data words to be read (3) Content of DB: DW1 DW2 DW3 DW4 DW5 A-NR F-Nr number of words being read error code error class remedy error location ------ The function outputs MS-DOS error codes in the data record after an error-free completion.
Linkage with PLC Table with error codes: 01 02 03 04 05 06 07 08 09 10 (0A) 11 (0B) 12 (0C) 13 (0D) 14 (0E) 15 (0F) 16 (10) 17 (11) 18 (12) 19 (13) 20 (14) 21 (15) 22 (16) 23 (17) 24 (18) 25 (19) 26 (1A) 27 (1B) 28 (1C) 29 (1D) 30 (1E) 31 (1F) 32 (20) 33 (21) 34 (22) 35 (23) 36 (24) 80 (50) 82 (52) 83 (53) invalid function number file not found path (directory) not found too many open files, remedy: increase number of files in CONFIG.
Linkage with PLC Code table for error classes: 01 02 03 04 05 06 07 08 09 0A 0B 0C no resources available (memory or handles) no error, but actual status (disabled region in a file), which is expected to disappear.
Linkage with PLC 6.3.3.24 General Interrupt The function enables to call general interrupts of the AT, e.g. VGA-BIOS-interrupts, keyboard interrupt, mouse interrupt etc. Because of various parameterization opportunities it is not possible to supply all registers with parameters. Four data words are passed to this function which are loaded correspondingly in registers AX, BX, CD and DX. The interrupt number is to be stored to the DOSP-parameter. All interrupt numbers are permitted.
Linkage with PLC 6.3.
Linkage with PLC 6.4 CP486 Jobs for PLC (Functions for Bank 2, 3 and 7) 6.4.1 Overview The driver program CP386COM serves jobs initiated by the PLC, as well as jobs initiated by the CP386. The driver supplies a series of functions for the banks 2, 3 and 7. With these functions data can be read from the PC or written to the PC respectively from a running application on the CP486. All functions are called by means of software interrupt 78h.
Linkage with PLC 6.4.2 Driver Functions via Software Interrupt 6.4.2.1 CP-Status Call This function outputs various arbitrary status information via the CP486. Moreover, it can be used by the applications software to check whether the CP486 software driver is loaded. Further information returned is the output status of hard and software, CPU identification etc.
Linkage with PLC 6.4.2.2 Read a Single Element from the PC With this function a single data type (bit, byte, word,...) can be read from the PC. The function is just starting the job and does not wait for the PC to execute it, but returns immediately, to where it was called. Therefore the data can be read not before the function 'status call' was executed (see there).
Linkage with PLC 6.4.2.3 Read a Block from the PC With this function a whole block of data can be read from the PC. The function is just starting the job, and does not wait until the PC is executing it, but returns immediately to where it was called. Therefore the data can be read not before the function 'status call' was executed (see there).
Linkage with PLC 6.4.2.4 Write a Variable to the PC This function enables to write single data (bit, byte, word,...) to the memory of the PC. When calling, the address of a variable to be written must be specified. The function transmits its value to the bank and does not wait for the PC to read the data, but returns immediately to where it was called.
Linkage with PLC 6.4.2.5 Write a Block to the PC With this functions a whole data block can be transmitted to the PC. When calling, a pointer to the data block is to be specified. The function writes the data to the bank and returns immediately to where it was called. There is no delay for the PC to read the data. Subsequently the data block is competely available in the CP and could be overwritten for example.
Linkage with PLC 6.4.2.6 Read Job Status With this function, the status of an earlier started job can be called. For read jobs, variable and block read jobs, this function copies data to a specified address to the CP, if the job status is 'finished without error'.
Linkage with PLC - For a read job for single variables, the pointer is to be interpreted differently, depending on the element size: Bit or semaphore: The pointer is the address of a byte, the bit will be written to bit number 0, the whole byte will be overwritten. Byte, left byte, right byte: The pointer is the address of a byte. The byte will be written to the storage cell. Word: The pointer is the address of a word. High and low-byte will be interchanged during transmission.
Linkage with PLC 6.4.2.7 Abort All Jobs of a Bank Register high AX In low Out fn fn function number for status call $28 abort all read jobs $38 abort all write jobs status <0 0 status error number because error occurred all jobs were aborted. All not yet finished write or read jobs can be aborted by means of this function. It must not be differed between variable and block jobs. Also if there were no jobs active in the bank, the function answers with the return value 0.
Linkage with PLC 6.4.2.8 Read Status of Process Image Register high AX status In $70 0 1..255 low Out - status no process image available current process image counter The current value of the process image counter (bank 7 address 3FEh) can be read by means of this function. If the value is 0 then no process image is available.
Linkage with PLC 6.4.2.
Linkage with PLC 6.4.2.10 Error Numbers of CP for Banks 2, 3 and 7: hex dec. description FFFF -1 invalid data type FFFE -2 length error (e.g. address too big, bit number too high) FFFD -3 invalid data size (wrong value at single or block job) FFFC -4 data type for this CPU not possible FFFB -5 bank full, 127 single jobs in the bank, or at least 1 single elementand a block job are to be started.
Linkage with PLC 6.4.3 Interface for Turbo-Pascal (from Version 4.0) To facilitate calling functions of COM-driver from Pascal programs, a Turbo-Pascal-Unit has been created which makes available all functions of the service interrupt INT 78 to be easy called. For every driver function an adequate Pascal-procedure is defined which supplies registers, calls interrupts and returns values.
Linkage with PLC 6.4.3.2 Read a Single Element from the PC FUNCTION CP_read_AG(size, typ, bst : BYTE; adr : longint; bit : BYTE) : INTEGER; size: typ: bst: adr: bit: data size of single elements (see Tab. 1) data type for single elements (see Tab. 2) module number address in the module or absolute address bit number Return: job number or negative number if there is an error This function calls the driver function "read a single element from the PC".
Linkage with PLC 6.4.3.3 Read a Block from the PC FUNCTION CP_readn_AG(size, typ, bst:BYTE; adr:longint; len:WORD):integer; size: typ: bst: adr: len: data size of block elements (see Tab.4) data type of block elements (see Tab. 3) module number address in module or absolute address number of data in words Return: job number or negative number if there is an error This function calls the driver function "read a block from the PC".
Linkage with PLC 6.4.3.4 Write a Single Element to the PC FUNCTION CP_write_AG(size, typ, bst : BYTE; adr: longint; bit: BYTE; p: POINTER) : integer; size: typ: bst: adr: bit: p: data size (see Tab. 1) data type single elements (see Tab.
Linkage with PLC 6.4.3.5 Write a Block into the PC FUNCTION CP_writen_AG(size, typ, bst : BYTE; adr : longint; len : word; p : POINTER) : integer; size: typ: bst: adr: len: p: data size of block elements (see Tab.4) data type block elements (see Tab. 3) module number address in module or absolute address number or data in words pointer to the data block to be written Return: job number or negative number if there was an error This function calls the driver function "write a block into the PC".
Linkage with PLC 6.4.3.
Linkage with PLC 6.4.3.7 Abort all Jobs of a Bank FUNCTION CP_cncl_AG(a_nr : BYTE): INTEGER; a_nr: identification for bank 2 or 3 $00 abort all still active jobs of bank 2 $80 abort all still active jobs of bank 3 Return: 0 or negative number if there is an error This function calls the driver function "abort all jobs of a bank". The registers are preset according to the transferred parameters when calling up. Meaning of the parameters is described in the section of driver function.
Linkage with PLC 6.4.3.8 Read Status of Process Image FUNCTION CP_stat_PA : BYTE; Return: process image counter This function calls the driver function "status call process image". This function returns the process image counter. 6.4.3.9 Read Area of Process Image FUNCTION CP_read_PA(typ : BYTE; adr, len : WORD; p : POINTER) : INTEGER; typ: adr: len: p: data type process image (see Tab.
Linkage with PLC 6.4.3.10 Constants Following constants are already predefined. It is recommended to use these constants also in the program text for reasons of clearness and better readability. Moreover, adaptations attended to possible later changes of the COM-driver can be easier carried out. Tab.
Linkage with PLC Tab. 3 predefined constants for data types for block elements CONST DB_BLK DX_BLK BA_BLK BB_BLK BS_BLK BT_BLK FB_BLK FX_BLK OB_BLK PB_BLK SB_BLK MB_BLK ABS_BLK = $00; = $01; = $02; = $03; = $04; = $05; = $06; = $07; = $08; = $09; = $0A; = $0B; = $0F; (* data module *) (* DB in external memory *) (* BA *) (* BB *) (* BS *) (* BT *) (* FB *) (* FB in external memory *) (* OB *) (* PB *) (* SB *) (* MB *) (* absolute memory *) Tab.
Linkage with PLC Tab. 7 predefined constants for error messages: bank 2, 3 and 7 CONST ERR_S5_TYP = $01; (* invalid element type *) With a single-element access with the element type DX_SNG, BA_SNG, BB_SNG, BT_SNG or QB_SNG or with a block element access with element type DX_BLK, BA_BLK, BB_BLK, BT_BLK or FX_BLK the programme tried to access data in a programmable controller of the type 115U. However, these element types do not exist in this programmable controller type.
Linkage with PLC Correction: ERR_S5_SIZE = $04; To check the parameter „adr“ in the function call of the PC user software for valence. (* invalid element size *) With a single-element access with element type Z_SNG or T_SNG the programme tried to access timer or counter, whereas the parameter element size was not set to word access (WORD_ELM). Correction: To correct the parameter „size“ in the function call of the PC user software.
Linkage with PLC Correction: ERR_S5_LEN = $07; To correct the parameter „adr“ in the function call of the PC user software. (* invalide block length *) With a block element access under all element types the programme tried to transfer blocks with a length > 504. Correction: ERR_S5_ADR = $08; To correct the parameter „len“ in the function call of the PC user software.
Linkage with PLC 6.4.4 Interface to Turbo-C (2.0 and C++ from 1.0), Microsoft-C 6.0 To facilitate calling functions of COM-driver from C-programs, a library file has been created which makes available all functions of the service interrupt INT 78 to be easy called. For every driver function a respective C-function is defined which supplies registers, calls interrupts and returns values.
Linkage with PLC 6.4.4.2 Read a Single Element from the PC int CP_read_AG(byte size, byte typ, byte bst, unsigned long adr, byte bit); size: typ: bst: adr: bit: data size (see Tab. 1) data type single elements (see Tab. 2) module number address in module or absolute address bit number Return: job number or negative number if there is an error This function calls the driver function "read a single element from the PC". The registers are preset according to the transferred parameters when calling up.
Linkage with PLC 6.4.4.3 Read a Block from the PC int CP_readn_AG(byte size, byte typ, byte bst, unsigned long adr, word len); size: typ: bst: adr: len: data size of block elements (see Tab.4) data type block elements (see Tab. 3) module number address in module or absolute address number of data in words Return: job number 0 or negative number if there is an error This function calls the driver function "read a block from the PC".
Linkage with PLC 6.4.4.4 Write a Single Element into the PC int CP_write_AG(byte size, byte type, byte bst, unsigned long adr, byte bit, void far *p); size: typ: bst: adr: bit: p: data size (see Tab. 1) data type single elements (see Tab.
Linkage with PLC 6.4.4.5 Write a Block into the PC int CP_writen_AG(byte size, byte typ, byte bst, unsigned long adr, word len, void far *p); size: typ: bst: adr: len: p: data size of block elements (see Tab.4) data type block elements (see Tab.
Linkage with PLC 6.4.4.
Linkage with PLC 6.4.4.7 Abort All Jobs of a Bank int CP_cncl_AG(int a_nr); a_nr: code for bank 2 or 3 $00 abort all still active jobs of bank 2 $80 abort all still active jobs of bank 3 This function calls the driver function "abort all jobs of a bank". The registers are preset according to the transferred parameters when calling up. Meaning of the parameters is described in the section of driver function.
Linkage with PLC 6.4.4.10 Constants Following constants are already predefined. It is recommended to use these constants also in the program text for reasons of clearness and better readability. Moreover, adaptations attended to possible later changes of the COM-driver can be carried out easier. Tab.
Linkage with PLC Tab.
Linkage with PLC Tab. 7 predefined constants for error messages: bank 2, 3 and 7 CONST ERR_S5_TYP = $01; (* invalid element type *) With a single-element access with the element type DX_SNG, BA_SNG, BB_SNG, BT_SNG or QB_SNG or with a block element access with element type DX_BLK, BA_BLK, BB_BLK, BT_BLK or FX_BLK the programme tried to access data in a programmable controller of the type 115U. However, these element types do not exist in this programmable controller type.
Linkage with PLC Correction: ERR_S5_SIZE = $04; To check the parameter „adr“ in the function call of the PC user software for valence. (* invalid element size *) With a single-element access with element type Z_SNG or T_SNG the programme tried to access timer or counter, whereas the parameter element size was not set to word access (WORD_ELM). Correction: To correct the parameter „size“ in the function call of the PC user software.
Linkage with PLC Correction: ERR_S5_LEN = $07; To correct the parameter „adr“ in the function call of the PC user software. (* invalide block length *) With a block element access under all element types the programme tried to transfer blocks with a length > 504. Correction: ERR_S5_ADR = $08; To correct the parameter „len“ in the function call of the PC user software.
Linkage with PLC 6.4.5 Storage of Process Images to Bank 7 The process image can also be directly read out by the user. Following survey shows how bank 7 is structured. Direct access is very fast: Address in the bank (hex) Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte 0 process image EB 0 -+ . ¦ . ¦ . ¦ 127 process image EB 127 -+ 128 process image AB 0 -+ . ¦ . ¦ . ¦ 255 process image AB 127 -+ 256 marker Byte 0 -+ . ¦ . ¦ . ¦ 511 marker Byte 255 -+ 512/513 Timer 0 (high/low) -+ .
Linkage with PLC 6.5 Access on the CP386COM from WINDOWS From the tool disk version 2.2 onwards a programme library for MS-WINDOWS 3.1 with the following data is available: The header file CP386WIN.H and the OBJ-file CP386WIN.OBJ. The file CP386WIN.H contains the necessary definitions for an operation on WINDOWS. The file CP386WIN.OBJ contains the communication functions on WINDOWS. The functions have to be called as described in chapter 6.
Technical Data 7. Technical Data 7.1 Base Module Power supply Power assumption (without options) Loading voltage for options Processor Clock frequency Main memory Video-interface Option: EL-display Option: TFT-display Keyboard Serial interfaces Diagnostic interface Parallel interfaces Floppy disk drive Hard disk interface Chip silicon disk Memory card silicon disk CP-interface Watchdog Write protection AT-bus System-Bios VGA-Bios 184 +5V +/-5% 1.4 A (CP486S) 1.
Technical Data Dimensions Height Depth 233.
Technical Data 7.2 Option Hard Disk Environmental Conditions: Operation Storage/Transport Temperature 5°C to 50°C -40°C to 70°C Temperature variation 20°C/h 20°C/h Air humidity 10% to 90% 10% to 90% Altitude above sea level -300m to 3300m -300m to 13000m 5G 100G 1G 5G Shock 1/2 Sine, 11ms Vibration 1 Octave/Min., 10-400Hz 7.
Technical Data CP 486 ⋅ 00/14 VIPA GmbH 187
Technical Data 188 VIPA GmbH CP486 ⋅ 00/14