Home
1781-PXB721 Discrete I/O Interface User`s Manual
Contents
1. A changein status would indicate arming read_sensors sensors now This reads the current status for i 0 to 15 do begin of the sensors which is then if sensors now OFF then displayed toindicateopen writeln sensor i isopen windows etc end writeln writeln Press ESC to re scan RETURN to begin alarm scanning key eadkey until key 13 the repeat until loop gives the user an opportunity to shut open windows or doors and then re scan the sensors dirscr WHILE TRUE do begin this WHILE is used to form an infinite loop writeln Waiting to be armed or press any key to halt program repeat his repeat until loop continues until arming_stations get_status farming station status changes indicating if key pressed then halt 1 farming or until a key is pressed indicating program termination until arming stations lt gt old arming stations sound 900 short tone indicating that alarm has been armed delay 300 d u m y nosound f n n n n ii writeln Alarm system will activate in 15 seconds read sensors sensors at arm old arming stations get status gettime hour min sec hun this code reads the system clock sec 15 for the current time which is if i gt 60then i 60 used to delay for 15 seconds repeat gettime hour min sec hun until sec i fend of delay loop writeln writeln ALARM SYSTEM ACTIVE AND ARMED sound 900 hort ton indicating that
2. Definitions DO PortC Lo C0 C3 1 Input O Output D1 Port B 1 Input O Output D2 Mode Selection 1 Model O Mode0 D3 PortC Hi C4 C7 1 Input 0 Output D4 PortA 1 Input 0 Output D5 D6 Mode Selection 01 Mode 1 00 M ode 0 1X Mode2 D7 Mode Set Flag FAdive Note Mode 1 cannot be used by the 1781 PXB721 without modification Consult factory Thus bits D2 D5 and D6 should always be set to 0 and bit D7to 1 PROGRAMMING EXAMPLE The following example in BASIC is provided as a guide to assist you in developing your working software In this example the card base address is 2DO hex and I O lines of Port O are to be setup as follows PortA Input PortB Output Port C Hi Input Port C Lo Output The first step is to configure the control register Configure bits of the control register as 13 1781 PXB721 USER S MANUAL DO 0 BEE Port C Lo output Port B output ModeO Port C Hi input Port A input Mode0 Mode0 Active Mode Set This corresponds to 98 hex If the card address is 2DO hex use the BASIC OUT command to write to the control register as follows 10 BASEADDR AH2DO 20 OUT BASEADDR 3 AH 98 To read the inputs at Port A and the upper nybbleof Port C 30 X lt NP BA SEA DDR Read PortA 40 Y ANP BA SEA DDR12 16 Read Port C Hi To set outputs high 1 at port B and the lower nybble of Port 50 OUTBASEADDR 1 amp HFF Tum on all Port B Bits 60 OUTBASEADDR 2 amp HF Tum on all
3. If you wish to gain a better understanding of the programs listed in the previous section then the information in the following paragraphs will be of interest to you Refer to the data sheets and 8255 5 specification in Appendix A A total of 15 address locations are used by the PXB721 five for each PPI The PPI s are addressed consecutively with address bits A 3 through AO See Address Selection as follows Table 4 Address Selection Table Port Assignment Bo The 1781 PXB721 card uses three 8255 5 PPI s to provide a total of 72 bits input output capability The card is designed to use each of these PPI s in M ode 0 wherein a There are two 8 bit ports A and B and two 4 bit ports C Hi and C Lo b Any port can beconfigured as an input or an output c Outputs are latched d Inputs are not latched 12 1781 PXB721 USER S MANUAL Each PPI contains a control register This Write only 8 bit register is used to set the mode and direction of the ports At Power Up or Reset all l O lines are set as inputs Each PPI should be configured during initialization by writing to the control register even if the ports are only going to be used as inputs Output buffers are automatically set by hardware according to the control register states N ote that control registers are located at base address 43 base address 7 and base address B Bit assignments in each of these control registers are as follows Table 5 VO Control Register
4. My procedure initialize board this procedure sets MODE Das active and ets Port A B and C Lo as input fand Port C HI as output begin porti BA SEA DDR 3 93 port X is Pascal s method of accessing the port memory This code sets the port memory at address 303 hex the control fregister and to 93 hex because the bit pattern to set the desired mode and port designations is 1001001 which equals 93 hex end procedure initialize board procedureread_sensors VAR ary sensor_ary VAR tempa byte This procedure fetches data from ports VAR tempB byte A and Band returns a binary representation of each sensor begin tempA port BASEADDR This procedure loads tempA and 4tempB with corresponding inputs from the PXB card tempB port BA SEA DDR 1 for i 0 to 7 do begin for i Oto 7 do begin if tempA shri AND ON gt Othen This tests to see ary i ON if bit ison and sets else the corresponding array ary i OFF element to ON If it is end else the array element is et to OFF 15 1781 PXB721 USER S MANUAL for i Oto 7 do begin if tempB shri AND ON gt Othen ary i 8 ON in order to get Port B into else farray elements 8 thru 15 ary i 8 OFF we add 8 to the bit numbers end in the assignment end procedure read_sensors function get_status integer var temp integer begin This sets status to the lower temp port BA SEA DDR2 nybble of Port C the ha
5. begin alarm scanning key getch Mhile key 13 dresr for printf Waiting to be armed Press any keyto halt program n do arming_stations get_status if kbhit abort 0 while arming stations old armi ng stations 20 1781 PXB721 USER S MANUAL sound 1000 delay 300 nosound pri ntf A larm system will activate in 15 seconds read sensors sensors at arm old arming stationszget statusi start time N ULL do Wwhile difftime time N ULL start 15 printf n printf ALARM SYSTEM ACTIVE AND ARMED n n sound 900 delay 300 nosound j 0 do read sensors sensors now for i 1L i lt 16 i 4 if sensors now i 1 sensors_at armli 1 js Y for arming stations get_status if arming stations old_arming_stations jel flag used to signal alarm is deactivated while j ifj IX start time N ULL printf Alarm deactivated at s ascti me gmti me start sound 900 delay 300 nosound delay 50 sound 900 delay 100 nosound else printf sensor d has been activated ni n j start time N ULL printf The time of alarm is s asctime gmtime amp start old_arming_station get_status ALARM y else Y for this end used to send program back to await rearm 21 1781 PXB721 USER S MANUAL 7 CONNECTOR PIN ASSIGNMENTS These 50 pin headers are provided on the PXB721 one for each group of 241 O lines The mating
6. bits of Port C lower nybble SAMPLE PROGRAMS The following sample programs are in TURBO C and TURBO PASCAL languages They cover a security system that allows you to monitor the status of 16 switches and to automatically trigger four alarms that can be used turn on lights activate a siren or send a signal to a silent alarm The alarm system in this demonstration has four arming stations which toggle the alarm on and off These programs are also provided on the diskette that W R C supplied with your PXB card TURBO PASCAL PROGRAM CONST BASEADDR _ 300 declare base address for IOD card CONST ON 1 declare some useful constants CON ST OFF 0 LLI TYPE sensor array lt array 0 15 of integer 1781 PXB721 USER S MANUAL creates a type of variable used for sensor data VAR sensors at arm sensor array bit by bit status of sensors when falarm is activated Used to notify user of open windows etc VAR sensors now sensor now bit by bit status of sensors at current time When compared against sensors at arm indicates break in if there is a change AR arming_stations integer variables representing all four VAR old_ arming stations integer farming stations If value changes toggle alarm on off VAR hour min sec hun word variables used to retrieve time VAR key char useful temporary variable VAR i integer useful temporary variable used in loops VAR j integer E A m
7. illustrates switch selection corresponding to hex 2D0 or binary 10 1101 xxxx The xxxx represents address lines A3 A2 Al and AO used on the card to select individual registers at the PPI s See section 3 PROGRAMMING Table 3 Switch Selection Example Conversion multas 2 p be ja p p alo 1 lar nen Binary representation se or fon OFF jorr ON jor CAUTION Carefully review the address selection reference table on the previous page before selecting the card address If the addresses of two installed functions overlap you will experience unpredictable computer behavior 1781 PXB721 USER S MANUAL 5 SOFTWARE WESTERN RESERVE CONTROLS supplies several programs to support the 1781 PXB721 digital O card and also to help you develop your applications software These programs are on a diskette that comes with your card and consist of a Setup program and three sample programs The sample programs are in forms suitable for use in BASIC OuickBA SIC C and Pascal The programs as follows ii PXB721ST 1781 PXB721 Board Setup Program NOTE This program should run directly out of DOS FIN DBASE Reports active and available address locations in your computer for assignment asthe 1781 PXB721 base address SAMPLEI A program that writes a sequence of values to port A and reads and displays the values in Ports A amp B SAMPLE2 A program that displays the bits in Ports A amp Band when an interrupt oc
8. into position and tighten nuts 10 Inspect for proper fit of the card and cables and tighten screws 11 Replace the computer cover 1781 PXB721 USER S MANUAL 2 FUNCTIONAL DESCRIPTION FEATURES 72 Channels of Digital Input Output All 72 VO lines Buffered on the Board Four and Eight Bit groups Independently Selectable for VO Hysteresis and Pull Ups on VO Lines Interrupt and Interrupt Disable Capability 5V Supply Available to the User Compatible with WRC Industry Standard I O Racks and other such as Opto 22 Potter amp Brumfield etc APPLICATIONS Automatic Test Systems Robotics Security Systems Energy Management Reay Monitoring and Control Parallel Data Transfer to PC Sensing Switch Closureor TTL DTL CMOS Logic Driving Indicator Lights or Recorders The 1781 PXB721 Board was designed for industrial applications and can be installed in any I O slot of an IBM PC XT AT or compatible computer Each I O line is buffered and capable of sourcing 15 mA or sinking 24 mA 64 mA on request The card contains three Programmable Peripheral Interface chips type 8255 5 PPI to provide computer interface to 72 l O lines Each PPI provides three 8 bit ports A B and C Each 8 bit port can be software configured to function as either inputs or output latches Port C can also be configured as four inputs and four output latches The I O line buffers 74LS245 are configured automatically
9. 1781 PXB721 Discrete I O Interface User s Manual Western Reserve Controls Inc 1781 PXB721 USER S MANUAL Although every effort has been made to insure the accuracy of this document all information is subject to change without notice WRC takes no liability for any errors in this document or for direct indirect incidental or conseguential damage resulting from the use of this manual Document PUB 28 0 Rev 1 50 November 2000 Copyright O 1996 2000 WRC Western Reserve Controls Inc 1485 Exeter Road Akron OH 44306 330 733 6662 Phone 330 733 6663 FAX sales wrcakron com Email http www wrcakron com Web SmartMux PXB721 and WRC are trademarks of Western Reserve Controls Inc IBM PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation All other trademarks are property of their respective companies 1781 PXB721 USER S MANUAL TABLE OF CONTENTS 1 INSTALEA NON an en ers a ee 1 2 FUNCTIONAL DESCRIPTION aa 3 S OPTION SELECTION ui aia 5 A ADDRESS SELECTION nes ee Eee 7 Di OOQFLWARE tin no aa aaa 9 6 PROGRAMMING user er A O 12 7 CONNECTOR P N ASSIGNMENTS ii 2 a ERROR nase 22 8 SPECIFICATION S nana Nea A a washes as aj ija o RO la dolia 23 APPENDIX A PPI DATA see ame ai sana 24 TABLE OF TABLES Table 1 Standard Address Assignments for PC and PC XT Computers 7 Table 2 Address Set up S witches 1 sesa A Heel 8 Table 3 Switch Selection Example an ara re alie
10. ING section of this manual 1781 PXB721 USER S MANUAL orno on Coz ETY ven UL ae TEEF _ 5 OOOOOD SNOURW Cc N ul Cc m Pp XZN CU4 aH le DI IRQ2 cut Cor a ro Ag I Ras go A8 A7 See A 2 A4 Figure 1 1781 PXB721 OPTION SELECTION MAP 1781 PXB721 USER S MANUAL 4 ADDRESS SELECTION The 1781 PXB721 Input Output Card occupies 16 bytes of I O space The card base address can be selected anywhere within an I O address range 100 3F0 hex in AT s except 1F0 to 1F8 and 200 3F0 in XT s However two installed options cannot share the same address If in doubt where to assign the base address of the PXB721 refer to the tables below and the FINDBASE program to find an available address in your system Table 1 Standard Address Assignments for PC and PC XT Computers Hex Range Usage o O E k These options can not be used together addresses overlap To set desired board addresses refer to the illustrated Board Address setup program on the Utility diskette provided with the card Type the desired address in hexadecimal code and graphic display shows you how to set the ADDRESS SETUP switches These switches are marked A 4 A 9 and form a binary representation of the address in negative type logic Assign 0 to all ADDRESS SETUP switches turned ON and assign 1 to all ADDRESS SETUP switches turned OFF 1781 PXB721 USER S MANUAL Table 2 Address Set up Switches The following example
11. alarm delay 300 s fully activated no sound j 0 the following code compares current status of sensors against status when to determine if break in has occurred fany change indicates break in repeat 17 read sensors sensors now for i 1 to 16 do begin if sensors_nowli 1 then j 1 end for arming stations get status 1781 PXB721 USER S MANUAL if arming station lt gt old_arming_stations then j 1 until j lt gt 0 if j 1 then begin gettime hour mi n sec hun flag used to signal that alarm is deactivated if j was set to 1 in the above loop then alarm is deactivated writeln A larm deactivated at hour min sec sound 900 delay 100 nosound delay 50 sound 900 delay 100 nosound nosound end else if alarm begin the following code chirps the speaker to indicate disalarming fend of alarming routine writeln sensor j has been activated gettime hour min sec hun writeln Thetime of alarm is hour mon sec ALARM end end end TURBO C PROGRAM define BA SEA DDR 0x300 defineON 1 define OFF 0 include stdio h include conio h include time h include dos h int sensors at arm 15 int sensors now 15 else WHILE this end sends the program back to wait to be rearmed declare base address for PXB card create useful constant x nm nm we bit by bit stat
12. be input for four arming switches return temp amp 0x0F Y function get arming status ALARM long int temp 0 19 1781 PXB721 USER S MANUAL sound 2000 this starts the computer s speaker outportb BASEADDR 0xF0 this sets Port C under nybble bits to ON 1111 binary F hex do arming_status get_status This activates 4 alarm if arming_status old_arming_stations outputs and then toggles temp 2000000000 dis armed Port C high LSB switch outportb BA SEA DDR 2 inportb BA SEA DDR42 0x10 might be Jwhile temp 2000000000 used with an electronic nosound speaker Y procedure ALARM main time_t start initialize clscr goto 5 5 printf This PXB card demonstration program simulates an alarm n printf system program for 16 sensors four arming stations and n printf four separate alarm outputs which could be routed to al n printf siren lights silent alarm etc n printf n printf THIS PROGRAM ISFOR DEMONSTRATION PURPOSES ONLY printf AND IS n NOT MEANT TO BE USED ASAN ACTUAL ALARM printf SYSTEM A n printf n printf n printf Press any key to begin program n key getch old_arming_station get_status do clrscr read sensors sensors now for i lt 0 i lt lt l5 i4M if sensors now i printf sensor d s n i is open printf n printf Press ESC to rescan RETURN to
13. by hardware logic for input or output use according to direction assignment from a control register in the PPI Two I O lines of each port can be used to interface User Interrupts to the computer Interrupts are buffered and are enabled by jumper installation or by a combination of jumper installation and a digital input line You can use Interrupts 2 through 7 10 through 12 14 and 15 Interrupts of all ports one per port are OR ed together 1 O wiring connections are via 50 pin headers on the board Three flat O cables connect the 1781 PXB721 to termination panels such as ACCES model STA 50 Also this provides compatibility with OPTO 22 Gordos Potter amp Brumfield etc module mounting racks Every second conductor of the flat cables is grounded to minimize the effect of crosstalk between signals If needed for external circuits 5 VDC power is available on each I O connector pin 49 If you use this power we recommend that you include a 1A fast blow fuse in your circuits in order to avoid possible damage to the host computer in the event of a malfunction in external circuits The PXB721 occupies sixteen bytes of l O address space The base address is selectable via a DIP switch anywhere within the range of 000 3FF hex If in doubt how to select a base address check your computer 1781 PXB721 USER S MANUAL Reference Manual For additional information about setting the base address of 1781 PXB721 see the Address Selection Sect
14. connector is an AMP type 1 499776 0 orequivalent Connector pin assignments are listed below Notice that every second lineis grounded to minimize crosstalk between signals Table 6 Connector Pin Assignments ASSIGNMENT PIN PIN ASSIGNMENT AA Port C HIGH Pes s fe GROUND PortCHIGH Pca 7 e GROUND gt E a ee PotcloWw PCs m fo o GROUND EA AS PortA PA7 GROUND force Pai AREA SEN Notes This lineisanl O port and also an Interrupt Enable This lineis an 1 O port and also an User Interrupt 22 1781 PXB721 USER S MANUAL 8 SPECIFICATIONS Features 72 buffered input output lines Hysteresis on input lines improves noise margins x Pull ups on l O lines for CMOS and contact closure compatibility Digital Inputs Logic High 2 0to 5 0VDC Logic Low 0 5 to 0 8 VDC Input Load Hi 20uA Input Load Lo 200 uA Digital Outputs Logic High 2 5 Vdc min source 15 mA Logic Low 0 5 V DC max sink 24 mA 64 mA optional Power O utput 5 VDC from computer bus ext 1A fast blow fuse recommended Power Required 5 VDC at 200 mA typical Size 7 15 Long Environmental Operating Temperature 0 degr to 60 degr C Storage Temperature 50 degr to 120 degr C Humidity Oto 90 RH non condensing 23 1781 PXB721 USER S MANUAL APPENDIX A PPI DATA PROGRAM MABLE PERIPHERAL INTERFACE DATA SHEETS The data sheets in this appendix are provided to help your understanding of the 8255 5 PPI w
15. curs polls those same bits WRC_VB A driver to enable use of the 1781 PXB in VisualBASIC for Windows Also indudes sample PXB721ST This program is supplied with the 1781 PXB721 card as a tool for you to use in configuring jumpers and switches on the card It is menu driven and provides pictures of the card on the computer monitor Making simple keystrokes to selects functions In turn thepictures changeto show jumpers and switch settings The setup program is a stand alone program that must be run from DOS It does not require the 1781 PXB721 to be plugged into the computer for any part of the setup The program is self explanatory with operation instructions and on line help To run this program at the DOS prompt enter PXB721ST followed by the ENTER PXB721 DEMONSTRATION The demonstration is written using the Visual Basic 3 0 driver It is able to access all of the board functions in Tr State and buffer enabled mode See the on line help and follow the standard programming directions 1781 PXB721 USER S MANUAL VISUALBASIC UTILITY DRIVER WESTERN RESERVE CONTROLS now provides extensions to the VisualBASIC language on the diskette provided with your card The extensions are in a directory named VB WRC These extensions are in the form of a DLL a GBL and a VisualBASIC sample Together these files allow you to access the port and main memory space in a fashion similar to other standard programming languages To use these
16. e master diskette into a floppy drive 2 Change the active drive to the drive that contains the master diskette This is usually driveA 3 TypeINSTALL and follow the screen prompt INSTALLING THE CARD Before installing the card carefully read the ADDRESS SELECTION and OPTION SELECTION Sections of this manual and configure the card according to your reguirements Use the special software programs 1781 PXB721 USER S MANUAL called PXB721ST and FINDBASE provided on diskette with the card They supply visual aids to configure all areas of the board Be especially careful with address selection If the addresses of two installed functions overlap you will experience unpredictable computer behavior To install the card 1 Remove power from the computer 2 Remove the computer cover 3 Remove blank I O backplate 4 Install jumpers for selected options See OPTION SELECTION SECTION 3 5 Select the base address on the card See ADDRESS SELECTION section 4 6 Loosen the nuts on the strain relief bar and swing top end free 7 Install the card in an I O expansion slot If convenient select a slot which is adjacent to a vacant slot because this will make cable installation easier 8 Thread the I O cables one by one through the cutout in the mounting bracket and plug them into the headers 9 Smooth the cables as close as possible to the card and while holding them close to the surface of the card swing thestrain relief bar
17. er byval offset as integer byval value as integer as integer Note that in all the above functions an inherent limitation of VisualBASIC makes the values sent less intuitive All integers are signed numbers wherein data are stored in two s complement form An alternative is to perform all assignments in hexadecimal rather than decimal form Before a program will execute the GBL file must be modified to include the path to VB WRC DLL as appropriate for your system Merely replace the statement VB WRC DLL with drive path VB_WRC DLL As an alternative to changing he source code VB WRC DLL can be copied into the Windows directory This will allow multiple programs to find the same DLL without having to know where it is located Just leave off all references to a path in the GBL file as shown in the sample 11 1781 PXB721 USER S MANUAL 6 PROGRAMMING The 1781 PXB721 is an l O mapped device that is easily configured from any language and any language can easily perform digital I O through the card s ports This is especially true if the form of the data is byte or word wide All references to thel O ports would be in absolute port addressing However a table could be used to convert the byte and word data ports to a logical reference If you are working with VisualBASIC for Windows then the VB WRC utility provided on the diskette with your card provides InPort and OutPort capabilities DEVELOPING YOUR APPLICATION SOFTWARE
18. files in a VisualBASIC program you must create a MAK file similar to the sample provided or modify your existing project file The VB WRC GBL file must be included File Add File The Sample looks for VB WRC DLL in the Windows directory The additional VisualBASIC functions are InPortb Function Reads a byte from a hardware port Due to limitations of VisualBASIC the number is returned as an integer Declaration function InPortb byval address as integer as integer InPort Function Reads an integer from a hardware port This function returns the 16 bit value obtained from reading the low byte from address and the high byte from address Declaration function InPort byval address as integer as integer OutPortb Function Writes the lower eight bit of value to the hardware port at address This function returns the value output Declaration function OutPortb byval address as integer byval value as integer as integer OutPort Function Writes all 16 bits of value to the hardware port at address This function returns the output value Declaration function OutPort byval address as integer byval value as integer as integer 10 1781 PXB721 USER S MANUAL Peek Function Reads a byte from main memory DRAM Declaration function Peek byval segment as integer byval offset as integer as integer Poke Function Writes the lower eight bits of value to segment offset Declaration function Poke byval segment as integ
19. hich is made by a number of companies These sheets are reprinted with permission of Mitsubishi Electric Corp Copyright 1987 The information diagrams and all other data included are believed to be correct and reliable However no responsibility is assumed by Mitsubishi Electric Corporation for their use nor for any infringements of patents or other rights belonging to third parties which may result from their use Values shown on these data sheets are subject to change for product improvement 24
20. ion of this manual Utility software provided on diskette with the 1781 PXB721 card is an illustrated setup program Interactive displays show locations and proper settings of DIP switches and jumpers to set up board address interrupt levels and interrupt enable Also sample programs in Turbo C and Turbo Pascal are presented in Software Section of this manual In addition a sample program and utility driver are provided for use with VisualBASIC for windows 1781 PXB721 BLOCK DIAGRAM Typical of three sections 1781 PXB721 USER S MANUAL 3 OPTION SELECTION Refer to the setup programs on the diskette provided with the card Also refer to the 1781 PXB721 card BLOCK DIAGRAM on the previous page and the OPTION SELECTION MAP on the following pages when reading this Section of the manual Board A ddress selection is covered both by the setup program and by the A ddress Selection Section of this manual Interrupts are accepted on the I O connector pin 9 port C3 The interrupt signal is positive true Interrupts are enabled if the IEN jumper is installed or if the IP jumper is installed but the C7 I O line is high Interrupts are directed to levels 2 through 7 10 through 12 14 and 15 by jumpers installed at locations labeled IRQ2 through IRQ15 The foregoing are the only manual setups necessary to use the 1781 PXB721 Input Output selection is done via software by writing to a control register in each PPI as described in the PROGRAM M
21. lf get status stemp AND 0F defined by Initialize to be end function get arming status input for 4 arming switches procedureALARM var temp longint begin sound 2000 This starts the computer s Speaker which acts as siren for the alarm temp 0 porti BA SEA DDR 2 F This sets Port C s lower nybble bits to ON repeat arming_stations get_status This activates if arming_stations lt gt old_arming_stations then 4 alarm outputs and then temp 2000000000 disarmed toggles Port C Hi s LSB port BA SEA DDR 42 port BA SEA DDR 2 XOR 10 which might be used with temp temp 1 used with external until temp gt 200000000 siren nosound end procedure alarm begin initialize board clrscr gotoxy 5 5 writeln This is the PXB card demonstration program This writeln program will simulate an alarm system program for writeln sixteen sensors and four arming stations along with writeln four separate alarm outputs which could be routed to writeln a siren lights siren alarm etc writeln writen THIS PROGRAM ISINTENDED FOR DEMONSTRATION PURPOSES writeln ONLY AND IS NOT MEANT TO BE USED ASAN ACTUAL ALARM writeln SY STEM writeln writeln writeln Press any key to begin program 16 1781 PXB721 USER S MANUAL key readkey old arming stations sget status This loads the status of the clrscr farming switches at the time the program is first activated
22. n ak i ne ki 8 Table 4 Address Selection Table ia sssssssscssevesesssssas ia aii ile 12 Table 5 I O Control Register Definitions s i 5s1cissaccessacseectavesaceaseaceden spaveavehunssecesnaceceandeveanadescactasncens 13 Table 6 Connector Pin ASsipninents un aa pd Bae eee ea eae 22 TABLE OF FIGURES Figure 1 1781 PXB721 OPTION SELECTION MAP 2 22 0222 aaa 6 1781 PXB721 USER S MANUAL 1 INSTALLATION BACKING UP THEDISK The software provided with the PXB721 is on a 3 5 floppy As with any software package you should make backup copies for everyday use and place your original master diskette in a safe location The easiest way to makea backup copy isto usethe DOS DISKCOPY utility In asingle drive system the command is DISKCOPY A A In atwo disk system the command is COPY A B This will copy the contents of the master disk in driveA to the backup disk in driveb HARD DISK USERS The files contained on the master disk may also be copied onto your hard disk Files contained on the disk are stored in separate directories These are FINDBASE Contains tools to find a working card address PSA M PLES Contains Pascal samples and the Pascal linkable driver CSAMPLES Contains C samples and the C linkable driver BSAM PLES Contains the BASIC and OuickBA SIC samples as well as the binary Q and linkable drivers VB WRC Contains V isualBA SIC sample and Visual Basic linkable driver To install on a hard disk 1 Placeth
23. us of sensors at current time When compared against status status of alarms at arm indicates 18 1781 PXB721 USER S MANUAL break in if there is a change int arming stations variables representing all four arm int old arming stations ing stations If the value changes toggle alarm ON OFF char key useful temporary variable inti useful temporary variable used in loops intj useful temporary variable initialize outportb BA SEA DDR 3 0x93 outportb addr byte is C s method of accessing port memory This procedure sets Port A B and C LO asinputs and Port C HI as outputs address 303 hex isthe control register The bit pattern needed to set the desired mode and port designation is 10010011 93 hex H procedure initialize read sensors int ary unsigned char tempa unsigned char tempB tempA lt importb BA SEA DDR tempB lt importb BA SEA DDR 1 for i 0 i lt B i if tenpA gt gt i amp ON this determines if bit 1 is on and aryH 0N setsthe corresponding array element esa to ON if it is If not sets the ary H OFF array element to OFF for i 0 i lt B i if tempB gt gt i amp ON aryH ON else ary H OFF procedure read_sensors get_status inttemp temp Hnportb BASEADDR 2 this sets status to the lower half of Port C the half defined in In itializeto
Download Pdf Manuals
Related Search
Related Contents
PL2 statement CVR - Ryan Hydraulic Service, Inc YAP User`s Manual - Universidade do Porto Cisco E1 cable, DB-15, 120-ohm, Balanced, 5 m AOC E943FWSK Palram 702563 Installation Guide Dowanload User Manual Epson Net 10/100 Base-TX External Print Server Product Brochure Operators Manual - Wolf Laboratories Tritton AX 120 Copyright © All rights reserved.
Failed to retrieve file