background image

XP8500

XP8500 

and

 

Exp-A/D12

Analog-to-Digital Conversion Expansion Boards

User’s Manual

Revision B

Exp-A/D12

Summary of Contents for Exp-A/D12

Page 1: ...XP8500 XP8500 and Exp A D12 Analog to Digital Conversion Expansion Boards User s Manual Revision B Exp A D12...

Page 2: ...gainst consequences resulting from system failure is the buyer s responsibility This device is not approved for life support or medical systems All Z World products are 100 percent functionally tested...

Page 3: ...Modes 20 Using Analog to Digital Converter Boards 21 How to Set Up An XP8500 22 Conditioned Inputs CH0 CH3 22 Excitation Resistors 24 EEPROM 24 Unconditioned Inputs AIN4 AIN10 25 Internal Test Voltage...

Page 4: ...er 7 I O Configurations 59 Exp A D12 Pin Assignments 60 Using Analog to Digital Converter Boards 60 How to Set Up An Exp A D12 61 The Multiplexers 62 The Op Amps 62 The A D Converter 63 Chapter 8 Soft...

Page 5: ...ware Specifications 90 Appendix C Connecting and Mounting Multiple Boards 93 Connecting Multiple Boards 94 Mounting Expansion Boards 96 Appendix D Simulated PLCBus Connection 97 BL1400 and BL1500 98 A...

Page 6: ...vi s Contents XP8500 and Exp A D12 Blank...

Page 7: ...are program and editing files under Windows on a PC Knowledge of the basics of C programming For a full treatment of C refer to the following texts The C Programming Language by Kernighan and Ritchie...

Page 8: ...y Erasable Programmable Read Only Memory LCD Liquid Crystal Display LED Light Emitting Diode NMI Nonmaskable Interrupt PIO Parallel Input Output Circuit Individually Programmable Input Output PRT Prog...

Page 9: ...mic C keyword or phrase IN 01 Program comments are written in Courier font plain face Italics Indicates that something should be typed instead of the italicized words e g in place of filename type a f...

Page 10: ...XP8500 and Exp A D12 x s About This Manual Blank...

Page 11: ...XP8500...

Page 12: ...Blank...

Page 13: ...XP8500 Overview s 13 CHAPTER 1 OVERVIEW Chapter 1 provides an overview and description of the XP8500 analog to digital conversion expansion boards...

Page 14: ...ts zero offset and gain for the four conditioned channels stored in an onboard serial EEPROM An application can use library functions to access the EEPROM s calibration constants to correct measuremen...

Page 15: ...TARTED Chapter 2 provides instructions for connecting XP8500 expansion boards to a Z World controller The following sections are included XP8500 Components Connecting Expansion Boards to a Z World Con...

Page 16: ...n channels of 12 bit analog to digital conversion Figure 2 1 illustrates the basic layout and orientation of components headers and connectors Figure 2 1 XP8500 Board Layout P1 P2 H1 U1 J2 J1 H2 Regul...

Page 17: ...a Z World controller 1 Attach the 26 pin ribbon cable to the expansion board s P2 PLCBus header 2 Connect the other end of the ribbon cable to the PLCBus port of the controller Be sure pin 1 of the c...

Page 18: ...onnected to a controller Remember that each expansion board must have a unique PLCBus address if multiple boards are to be connected If two boards have the same address communication problems will occ...

Page 19: ...s the built in flexibility of the XP8500 expansion boards and describes how to configure the available inputs outputs The following sections are included XP8500 Pin Assignments Operating Modes Using A...

Page 20: ...des The XP8500 operates in an absolute mode as configured in the factory or in a ratiometric mode Jumpers J1 and J2 configure the XP8500 to operate in either the absolute or ratiometric mode J1 select...

Page 21: ...works The 2 5 V from the voltage divider cannot power the op amp bias networks directly because it is not a low impedance source and the op amp bias networks would put too large a load on the divider...

Page 22: ...chematic of XP8500 Signal Conditioning The 10 k input resistors RP3 or RP4 are fixed 0 01 F feedback capacitors roll off the high frequency response of the op amps to attenuate noise Equation 3 1 give...

Page 23: ...1 0 442 0 10 to 0 10 12 500 118 0 392 0 196 0 to 10 0 0 250 2 37 39 2 6 49 0 to 5 0 0 500 4 75 20 0 4 99 0 to 2 5 1 000 9 53 10 0 3 32 0 to 1 0 2 500 23 2 4 02 1 69 These are the factory defaults Figu...

Page 24: ...l resistors may be used Figure 3 5 Optional XP8500 Excitation Resistors EEPROM The jumpers on header J3 write protect the calibration contents stored in the upper half of the EEPROM the lower half can...

Page 25: ...extra channels be sure to consider whether the op amps can handle the capacitance of the cable used to connect them to header H2 Internal Test Voltages In addition to the 11 external input channels o...

Page 26: ...mV C to 75 mV C or 1 75 mV to 5 25 mV over the temperature range of 0 C to 70 C The LMC660C op amp has an offset voltage drift of 1 3 V C typ or 91 V over the temperature range of 0 C to 70 C A great...

Page 27: ...esistor R1 to suit a voltage range of 10 V The gain of the amplifier is the ratio of its maximum output voltage swing to the swing in the software application s maximum input voltage The 2 5 V input r...

Page 28: ...Rn for each op amp A voltage divider which consists of a bias resistor Rbias Rbias R2 R4 R6 or R8 and a fixed 10 k resistor RP4B RP4D RP3B or RP3D derive this bias voltage Vbias Vbias VR0 VR1 VR2 or V...

Page 29: ...input voltage This offset would be positive or negative tracking the deviation s sign and would be equal to the bias deviation multiplied by the amplifier s gain plus one Both of these effects could...

Page 30: ...ain is Again using Channel 0 as an example measure the voltage VREF and the voltage at VR0 see Figure 3 8 Because the current into the op amp input is negligible the resistance ratio of the two resist...

Page 31: ...he calibration coefficients in a defined location in nonvolatile memory Each reference point consists of a pair of values the actual applied test voltage and the raw converted A D value a 12 bit integ...

Page 32: ...and invgain for that channel adc4_compute will automatically store the coefficients in an adc4coeff structure be sure to declare an adc4coeff structure for each channel to be calibrated Lastly pass th...

Page 33: ...hapter 4 describes the Dynamic C functions used to initialize the XP8500 expansion boards and to control the resulting analog to digital conver sions The following major sections are included Expansio...

Page 34: ...esponding jumpers are installed on the headers and are one when the jumpers are removed The address can be placed on the bus using 4 bit addressing The func tions set12adr read12data and write12data i...

Page 35: ...Dynamic C Libraries Several Dynamic C function libraries need to be used with the routines defined in this chapter There are specific libraries designed for certain controllers and there are three co...

Page 36: ...t operations LIBRARY EZIOPLC LIB void eioPlcRstWait Provides a delay long enough for the PLCBus to reset This function provides a delay of 1 2 seconds to ensure devices on the PLCBus reset This functi...

Page 37: ...d channel_number ranges from 0 10 depending on the A D channel number RETURN VALUE whole number from 0 to 4095 1 if the XP8500 board is not found The global variable eioErrorCode is bit ored with EIO_...

Page 38: ...the first data point f1 is a floating point number f2 is the actual value for the second data point f2 is a floating point number RETURN VALUE 0 if the operation is successful 1 if the calibra tion c...

Page 39: ...line remains enabled until the board powers down PARAMETER board_adr is the physical address of the XP8500 board defined as 0000 1100 ppxy where pp is the portion of the board s address set by a parti...

Page 40: ...f the specified XP8500 board cannot be found Because the A D converter chip is hardwired to return a converted value while accepting new settings adc4_set returns a value converted with the chip s pre...

Page 41: ...der or divider sysclock sample period 20 All data default to 12 bits unipolar mode with MSB first The mini mum value for divider depends on the clock speed the number of I O wait states and the number...

Page 42: ...ture stores the constants as 6 continuous bytes in reserved spaces of the XP8500 s EEPROM RETURN VALUE 0 if the constants are read successfully from the EEPROM 1 if the XP8500 board cannot be found 2...

Page 43: ...int address Reads byte data from EEPROM data address board_adr is the physical address of the XP8500 board defined as 0000 1100 ppxy Addresses range from 0 to 511 for the 512 bytes of EEPROM memory st...

Page 44: ...stored in their respective locations in the EEPROM Sample Program The sample program ADC4SMP1 C in PLC_EXP LIB reads data from an XP8500 board over the PLCBus The program reads the first four conditio...

Page 45: ...c4_board Brd address int i if BOARD_TYPE CPLC_BOARD BOARD_TYPE L_STAR uplc_init endif reset_pbus reset the PLCBus reset_pbus_wait if sysclock 0x1e00 reset_pbus_wait wait double if the clock is faster...

Page 46: ...an2 Calibration zero_offset d invgain f n ADC4conv2 zero_offset ADC4conv2 invgain printf Chan3 Calibration zero_offset d invgain f n ADC4conv3 zero_offset ADC4conv3 invgain printf Toggle F4 DOS only t...

Page 47: ...face register The bus interface register allows the control program and a selected XP8500 to exchange only one 4 bit nibble per cycle The EEPROM and the A D converter are both serial I O devices Conse...

Page 48: ...A D end of conversion 1 conversion cycle is not in process OK to send receive data 0 conversion cycle is in process do not send or receive data Bit 2 SDA EEPROM serial data out Bit 1 DOUT A D serial...

Page 49: ...EXP A D12...

Page 50: ...Blank...

Page 51: ...Exp A D12 Overview s 51 CHAPTER 5 OVERVIEW Chapter 5 provides an overview and description of the Exp A D12 analog to digital conversion expansion boards...

Page 52: ...an application The Exp A D12 receives its power from the PLCBus 24 V An onboard voltage regulator U10 provides 5 V up to 1 A U6 and U14 provide V a regulated 5 V up to 50 mA U1 an LT1019 provides a p...

Page 53: ...RTED Chapter 6 provides instructions for connecting Exp A D12 expansion boards to a Z World controller The following sections are included Exp A D12 Components Connecting Expansion Boards to a Z World...

Page 54: ...ic layout and orientation of components headers and connectors Figure 6 1 Exp A D12 Board Layout C11 Power 5 V U6 Latch P1 PAL U13 P2 H1 H2 H5 U8 J2 J1 PAL U7 EEPROM U9 J3 ADC Prec 2 5 V U1 U4 C1 C2 C...

Page 55: ...2 Connect the other end of the ribbon cable to the PLCBus port of the controller Be sure pin 1 of the connector cable matches up with pin 1 of both the controller and the expansion board s 3 If addit...

Page 56: ...e connected If two boards have the same address communication problems will occur that may go undetected by the controller Exp A D12 Addresses Exp A D12 expansion boards are shipped from the factory w...

Page 57: ...12 Getting Started s 57 Exp A D12 expansion boards are available with the modifica tions for a 12 V controller done at the factory For more information call your Z World Sales Representative at 530 75...

Page 58: ...Exp A D12 58 s Getting Started Blank...

Page 59: ...ONS Chapter 7 describes the built in flexibility of the Exp A D12 expansion boards and describes how to configure the available inputs outputs The following sections are included Exp A D12 Pin Assignm...

Page 60: ...erter Boards These steps summarize how to use the A D converter boards 1 Send a reset command to all boards on the PLCBus 2 Place the address of the A D converter board on the PLCBus 3 Read an input c...

Page 61: ...oller is used power cannot be obtained from U10 and connecting pins 1 2 on header J2 then routes VCC to the analog circuits Header J3 is used for an upgraded EEPROM described in Chapter 4 Software Ref...

Page 62: ...enabled at a time The output lines IN and IN route the selected input signal directly to the A D converter chip s input pins CH0 and CH1 providing unity gain They also pass the signal to a multistage...

Page 63: ...d range Otherwise when an input voltage falls outside the range the chip will report its maximum or minimum value If the onboard resistor networks RN2 and RN3 which are not normally installed are used...

Page 64: ...Exp A D12 64 s I O Configurations Blank...

Page 65: ...E REFERENCE Chapter 8 describes the Dynamic C functions used to initialize the Exp A D12 expansion boards and to control the resulting analog to digital conversions The following major sections are in...

Page 66: ...ddress is 0x125 pass 0x521 For a given board the R bit selects one of two hardware registers S3A or S3B coded on the PAL chip S3A is a MUX control register that selects one of the board s eight input...

Page 67: ...size The array must be named adtab and it must be global The constant size is the number of signals in the table Plug in the size that the application needs Constants and Data Types The function libra...

Page 68: ...Nx Table 8 1 Exp A D12 A D Conversion Modes Mode Gain A D Converter Chip Reads 0 1X ANx unamplified bipolar mode 1 1X ANx unamplified bipolar mode 2 2X difference between ANx and ANx bipolar 3 202X di...

Page 69: ...r used int plcad_addr int board Returns the 12 bit nibble interchanged bus address for an Exp A D 12 board identified by board a logical address 0 63 A D Conversion float ad_conv int entry int value R...

Page 70: ...entry Returns the conversion mode 0 17 for a signal entry in the signal table void mxdel18 void mxdel9 void mxdel20 Generates a 450 s delay for 18 MHz 9 MHz and 20 MHz proces sors respectively These f...

Page 71: ...to create a signal table which uses compensation coefficients stored in EEPROM for accurate readings Only one sample program is given since Exp A D12 functions are not part of any other library These...

Page 72: ...age appears See the Dynamic C Technical Reference manual for more detailed instructions ADSAMPL1 C define AN0 0 global signal table one entry define TEMP 0 struct signal_rec adtab 1 main int i board i...

Page 73: ...APPENDICES...

Page 74: ...Blank...

Page 75: ...XP8500 and Exp A D12 PLCBus s 75 APPENDIX A PLCBUS Appendix A provides the pin assignments for the PLCBus describes the registers and lists the software drivers...

Page 76: ...a Z World controller to form an extended system FigureA 1 shows the pin layout for the PLCBus connector Table A 1 Z World PLCBus Expansion Devices Device Description Exp A D12 Eight channels of 12 bi...

Page 77: ...and others such as the XP8700 require 8 bit addressing These devices may be mixed on a single bus Two independent buses the LCD bus and the PLCBus exist on the single connector The LCD bus consists o...

Page 78: ...rst select a register associated with the device Then read or write from to the register The register is selected by placing its address on the bus Each device recog nizes its own address and latches...

Page 79: ...0 1 0 1 x 0 1 1 0 x 0 1 1 1 5 bits 3 2 048 2 048 2 048 2 048 x0100 xxxxx xxxxx x0101 xxxxx xxxxx x0110 xxxxx xxxxx x0111 xxxxx xxxxx x x 1 0 0 0 x x 1 0 0 1 6 bits 3 16 384 16 384 xx1000 xxxxxx xxxxxx...

Page 80: ...an interrupt routine to access the bus without disturbing the activity of a background routine that also accesses the bus To work reliably bus devices must be designed according to the following rules...

Page 81: ...w if the device exists on the bus 8 Bit Devices Z World s XP8700 and XP8800 expansion boards use 8 bit addressing Expansion Bus Software The expansion bus provides a convenient way to interface Z Worl...

Page 82: ...Sets the current address for the PLCBus All read and write operations access this address until a new address is set PARAMETER adr is a 16 bit physical address The high order nibble contains the valu...

Page 83: ...CBus in the BUSADR0 cycle RETURN VALUE the byte read on the PLCBus in the BUSADR0 cycle LIBRARY EZIOPLC LIB EZIOPLC2 LIB EZIOMGPL LIB char _eioReadD1 Reads the data on the PLCBus in the BUSADR1 cycle...

Page 84: ...bits of data to the PLCBus PARAMETER adr is the 12 bit address to which the PLCBus is set dat bits 0 3 specifies the data to write to the PLCBus LIBRARY DRIVERS LIB void write4data int address char d...

Page 85: ...lower eight bits upper bits 0 LIBRARY DRIVERS LIB int read8data0 long address Sets the last eight bits of the current PLCBus address using address bits 16 23 then reads eight bits of data from the PLC...

Page 86: ...XP8500 and Exp A D12 86 s PLCBus Blank...

Page 87: ...XP8500 and Exp A D12 Specifications s 87 APPENDIX B SPECIFICATIONS...

Page 88: ...r the XP8500 expansion board Table B 1 XP8500 Specifications Board Size 2 835 2 125 0 75 72 mm 54 mm 19 mm Operating Temperature Range 40 C to 70 C Humidity 5 to 95 noncondensing Power quiescent no ou...

Page 89: ...A D12 Specifications s 89 Figure B 1 shows the dimensions of the XP8500 expansion board Figure B 1 XP8500 Board Dimensions 2 835 72 0 125 typ 3 2 0 187 dia 4x 4 7 0 75 19 0 6 15 2 125 54 0 125 typ 3 2...

Page 90: ...2 mm 90 mm 19 mm Operating Temperature Range 40 C to 70 C Humidity 5 to 95 noncondensing Power Consumption 24 V DC 100 mA Outputs 8 configurable channels OR 16 single ended channels with unity gain Ex...

Page 91: ...Exp A D12 Specifications s 91 Figure B 2 Exp A D12 Board Dimensions 0 187 dia 4x 4 7 0 75 19 0 6 15 3 525 90 0 15 typ 3 8 2 835 72 0 15 typ 3 8 C3 Figure B 2 shows the dimensions of the Exp A D12 expa...

Page 92: ...XP8500 and Exp A D12 92 s Specifications Blank...

Page 93: ...XP8500 and Exp A D12 Connecting and Mounting Multiple Boards s 93 APPENDIX C CONNECTING AND MOUNTING MULTIPLE BOARDS...

Page 94: ...each board s header P1 to the adjacent board s header P2 Figure C 1 illustrates a controller with expansion boards attached When several expansion boards are connected there may be a voltage drop alon...

Page 95: ...mber of boards that could otherwise be connected to a single controller is a Y cable available from Z World Figure C 2 illustartes the use of the Y cable For more information call your Z World Technic...

Page 96: ...astic circuit board holders attached to a DIN rail a widely used mount ing system as shown in Figure C 3 The circuit baord holders are 77 mm wide and come in lengths of 11 25 mm 22 5 mm and 45 mm The...

Page 97: ...XP8500 and Exp A D12 Simulated PLCBus Connection s 97 APPENDIX D SIMULATED PLCBUS CONNECTION...

Page 98: ...OMGPL LIB library may be used For more information on the adapter board call your Z World Sales Representative at 530 757 3737 Use an external power supply with expansion boards connected to the BL140...

Page 99: ...XP8500 and Exp A D12 Technical Circuit Details s 99 APPENDIX E TECHNICAL CIRCUIT DETAILS...

Page 100: ...CBus to the controller Also the controller shifts in one bit of a command word into the converter via the PLCBus and U6 PAL U9 also controls U6 during each shift clock period This command word specifi...

Page 101: ...e will cause the output of the op amp to rise above 2 5 V But the converter will output only all ones A signal at the U2 op amp input that exceeds the maximum input signal voltage will not drive the o...

Page 102: ...els on the Exp A D12 This is because of the VCC noise generated by the switching negative power supply used for the graphic LCD With an OP6300 attached to the Exp A D12 the standard deviation rose fro...

Page 103: ...her channels Reducing the size of the feedback capacitor reduced the settling time at the expense of reduced noise filtering When C10 202X gain was replaced with a 150 pF capacitor the time constant o...

Page 104: ...XP8500 and Exp A D12 104 s Technical Circuit Details Blank...

Page 105: ...adc4_set 40 42 adc4_writecoeff 42 adc4coeff 42 44 ADC4SMP1 C 44 45 adch 70 add_sig_table 69 addresses encoding 79 Exp A D12 56 66 addresses logical Exp A D12 66 XP8500 34 modes 79 physical XP8500 34 P...

Page 106: ...LCBus controllers 24 V 98 adapter board 98 BL1400 98 BL1500 98 connections XP8500 25 connectors 26 pin pin assignments 76 control register 81 conversion modes XP8500 100 101 conversion time XP8500 14...

Page 107: ...connection to PLCBus 17 55 reset 82 expansion bus 76 81 4 bit drivers 82 8 bit drivers 84 addresses 80 devices 80 81 functions 82 85 rules for devices 80 software drivers 81 expansion register 80 EZIO...

Page 108: ...0 101 OP6300 and the Exp A D12 102 other channels XP8500 25 outport 82 83 84 overview Exp A D12 52 XP8500 14 P P1 94 P2 94 PAL encoding Exp A D12 66 XP8500 34 PBUS_TG LIB 98 pin assignments Exp A D12...

Page 109: ...signal table Exp A D12 67 69 signal_rec 67 slow_plA D12 70 software Exp A D12 67 functions 35 libraries 35 78 XP8500 35 calibration 31 conversion 42 specifications Exp A D12 90 XP8500 88 standard resi...

Page 110: ...ut range 29 jumper settings J1 21 J2 21 J3 24 J4 34 J5 34 low pass filter 22 modes 20 offsets 29 op amp limitations 101 PAL encoding 34 pin assignments 20 power down mode 25 XP8500 R1 R8 22 27 R9 R15...

Page 111: ...t No 019 0055 Revision B Printed in U S A Z World 2900 Spafford Street Davis California 95616 6800 USA Telephone Facsimile Web Site E Mail 530 757 3737 530 753 5141 http www z world com zworld zworld...

Reviews: