Page 1
(217) 352-9330 | Click HERE Find the Advantech PCM-3718 at our website:...
Page 2
PCM-3718 Series PC/104 12-bit DAS Module with Programmable Gain User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 3
Copyright This documentation and the software included with this product are copyrighted 2005 by Advantech Co., Ltd. All rights are reserved. Advan- tech Co., Ltd. reserves the right to make improvements in the products described in this manual at any time without notice.
Page 4
Product Warranty (2 years) Advantech warrants to you, the original purchaser, that each of its prod- ucts will be free from defects in materials and workmanship for two years from the date of purchase. This warranty does not apply to any products which have been repaired or...
Page 5
Technical Support and Assistance Step 1. Visit the Advantech web site at www.advantech.com/support where you can find the latest information about the product. Step 2. Contact your distributor, sales representative, or Advantech's customer service center for technical support if you need addi- tional assistance.
Contents Chapter 1 General Information ........2 1.1 Introduction ................. 2 1.2 Features..................2 1.3 Specifications................3 1.3.1 Analog Input ................3 1.3.2 Analog Output (PCM-3718HO only) ........4 1.3.3 Digital Input and Output ............4 1.3.4 Programmable Pacer ..............5 1.3.5 General ..................
Page 7
2.5 Hardware Installation ..............21 Chapter 3 Signal Connections ........24 3.1 Analog Output Connection (PCM-3718HO)......24 3.2 Analog Input Signal Connections..........25 3.2.1 Single-ended Channel Connections ........25 3.2.2 Differential Channel Connection ..........25 3.3 Expanding Analog Inputs ............27 3.4 Digital Signal Connections............
Page 8
5.3 MUX Setting................45 5.4 Trigger Mode................46 5.5 A/D Data Transfer ..............47 5.6 How to Make an A/D Conversion ..........48 Chapter 6 Digital Input/Output ........50 Chapter 7 Programmable Pacer ........52 7.1 The Intel 8254................52 7.2 Counter Read/write and Control Register .........
Page 9
PCM-3718H/3718HG User Manual viii Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 10
General Information This chapter introduces the PCM-3718 Series and provides detailed specifica- tions. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
These PC/104 modules are fully software compatible with the popular PCL-818H and PCL-818HG. This puts rich software support and a wide variety of external signal conditioning boards at your disposal. The PCM-3718 Series is excellent for data acquisition, process control, automatic testing and factory automation. 1.2 Features •...
Logic 1: 2.0 V min. • Output Voltage: Logic 0: 0.33 V max. @ 6 mA (sink) Logic 1: 3.84 V min. @ 6 mA (source) PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
FIFO IRQ address selection (PCM-3718HO only) JP10 D/A range select selection (5 or 10V) (PCM-3718HO only) JP11 D/A reference voltage as internal or external (PCM-3718HO only) Analog input PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 16
Digital input/output connector Counter (PCM-3718HO only) Base address A/D full scale A/D bipolar offset A/D unipolar offset PGA offset (PCM-3718HG only) D/A full scale adjustment (PCM-3718HO only) D/A offset (PCM-3718HO only) Chapter 1 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
PCLD-885 provides 16 SPDT power relays. PCLD-782B Isolated D/I Board This board provides 24 opto-isolated digital inputs for connecting to PCM-3718’s digital input channels. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
1.6 Software Support The PCM-3718 Series comes with a powerful and easy-to-use software driver. This driver makes application programming much easier, espe- cially when you use sophisticated features like interrupt or DMA data transfer. For creating a high performance Human Machine Interface (HMI), you may need other supporting software beside our included driver for the PCM-3718 cards.
1.7 Block Diagram Note CNT0-OUT is only for PCM-3718HO PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 20
Installation This chapter explains how to install PCM-3718 cards, and how to configure its switch and jumper settings. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Chapter 2 Installation 2.1 Initial Inspection All cards in the PCM-3718 Series are carefully inspected mechanically and electrically before shipment. It should be free of marks and scratches and in perfect order when received. As you unpack the PCM-3718 card, check for signs of shipping damages (damaged box, scratches, dents, etc.).
2.2 Switch and Jumper Settings Ease-of-use was a primary design goal when we designed the PCM-3718 Series. This module has one function switch and seven jumper settings. The following sections tell you how to configure the module. You may want to refer to the figure on page 5 to easier locate the jumpers and switches.
2.2.4 External Input or D I/O Selection (JP3) PCM-3718H and PCM-3718HG Jumper JP3 controls the selection of signals on pin 1 at connector P2. Pin 1 on connector P2 can be connected to digital I/O line 0, or to an external A/D trigger source as shown below.
You can use JP6 to enable or disable the FIFO function. Set jumper on pin(1-2) to enable FIFO. (As shown below) Set jumper on pin(2-3) to disable FIFO. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
2.2.7 FIFO IRQ Address Selection (JP9) (PCM-3718HO only) You can set the FIFO IRQ address with JP9. 2.2.8 D/A Range Selection: 5/10V (JP10) (PCM-3718HO only) JP10 lets users select the D/A output range. Set the jumper on pin 1 and 3, to make the D/A range 0 ~ 10 V. Set the jumper on pin 3 and 5, to make the D/A range 0 ~ 5 V.
A/D conversion. A low-to- high edge triggers A/D conversion to get one sample. CNT0_OUT Counter 0 Output CNT0_CLK Counter 0 Clock PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
C++, Borland C++, C++ Builder and Delphi. Please refer to the Software Driver’s User Manual for more information. Demonstration programs A calibration program A test program PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
2.5 Hardware Installation Warning! TURN OFF your PC power supply whenever you install or remove the PCM-3718H/3718HG or connect and disconnect cables. Installing the module Turn the PC’s power off. Turn off the power of any peripheral devices such as printers and monitors. Disconnect the power cord and any other cables from the back of the computer.
Page 31
PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 32
Signal Connections Correct signal connections ensure that your application sends and receives data accurately. Good signal connec- tions can also avoid unnecessary dam- age to the PC and other hardware. This chapter provides information on signal connections for different types of data acquisition applications.
±10 V. The loading current for D/A outputs should not exceed 5 mA. Connector P1 provides D/A signals. Important D/A signal connections such as input reference, D/A outputs and analog ground appear below. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
3.2 Analog Input Signal Connections The PCM-3718 cards support either 16 single-ended or eight differential analog inputs. Jumper JP3 selects the input channel configuration (See 2.2.3). The major difference between single-ended and differential input connections is the number of signal wires per input channel. 3.2.1 Single-ended Channel Connections Single-ended connections use only one signal wire per channel.
Page 35
Correct Connection HIGH V in V in=Vs LO W Incorrect Connection HIGH V in V in=Vs+Vcm LO W PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
3.3 Expanding Analog Inputs You can expand any or all of PCM-3718’s A/D input channels by using multiplexing daughterboards. Most daughterboards are connected directly to the module’s 20-pin connectors. You may require the PCLD- 8115 Screw-terminal Board for connections. The PCLD-789 Amplifier and Multiplexer multiplexes 16 differential inputs to one A/D input channel.
To receive an OPEN/SHORT signal from a switch or relay, add a pull-up resistor to ensure that the input is held at a high level when the contacts are open. See the figure below: PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 38
Register Structure and Format This chapter gives detailed information on the layout and function of each of the card’s registers. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
A/D data and channels from FIFO (PCM-3718HO only) BASE+18 A/D data and channels from FIFO N/A (PCM-3718HO only) BASE+19 FIFO status FIFO clear (PCM-3718HO only) PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
4.1 A/D Data Registers - BASE+0/1 Two read-only registers at BASE+0 and BASE+1 hold A/D conversion data. The 12 bits of data from the A/D conversion are stored in BASE+1 bit 7 to bit 0 and BASE+0 bit 7 to bit 4. BASE+0 bits 3 to 0 store the source A/D channel number.
Input Range (V) Unipolar/ Range Code Bipolar ±5 ±2.5 ±1.25 ±0.625 0 to 10 0 to 5 0 to 2.5 0 to 1.25 ±10 PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 42
PCM-3718HG range code: Input Range (V) Unipolar/ Range Code Bipolar ±5 ±0.5 ±0.05 ±0.005 0 to 10 0 to 1 0 to 0.1 0 to 0.01 ±10 ±1 ±0.1 ±0.01 Chapter 4 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Do not forget to reset the MUX start and stop channels to the correct values after your range setting. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
4.5 Digital I/O Registers - BASE+3/11 The PCM-3718 cards offer two 8-bit digital input/output channels. These I/O channels use the input or output ports at addresses Base+3 and BASE+11. BASE+3 (read port) -DIO low byte Value DIO7 DIO6 DIO5 DIO4 DIO3 DIO2 DIO1...
Connector P1 supports all D/A signal connections. Chapter 2 shows con- nector pin assignments, while chapter 3 has a wiring diagram for D/A sig- nal connections. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
4.7 FIFO Interrupt Control — BASE+06H (PCM-3718HO only) Table 4.3: Register for FIFO Interrupt Control Write FIFO interrupt control Bit# BASE+06H FINT FINT Enables/disables FIFO interrupt FIFO interrupt disabled FIFO interrupt enabled 4.8 A/D Status Register - BASE+8 Read-only register BASE+8 provides information on the A/D configura- tion and operation.
Page 47
INT = 1 before it reads the conversion data. It should then clear the INT bit by writing any value to the A/D status register BASE+8. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
4.9 Control Register - BASE+9 Read/write register BASE+9 provides information on the PCM-3718’s operating modes. BASE+9 - Control Value INTE DMAE INTE Disable/enable PCM-3718 card’s interrupt generation Disables the generation of interrupts. No interrupt signal will be sent to the PC bus. Enables the generation of interrupts.
BASE+14 and BASE+15 are used for the Intel 8254 programmable pacer. Please refer to Chapter 7 Programmable Pacer or 8254 product literature for detailed application information. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
4.12 A/D data and channel from FIFO - BASE + 17/18H (PCM-3718HO only) The PCM-3718 cards store data from A/D conversions in a 1 K word First-In-First-Out (FIFO) data buffer. Registers at BASE+17H and BASE+18H store the channel number and data. The register at BASE+19H clears the FIFO buffer and sets its empty flag (EF).
Writing any value to BASE+19H clears all data in the FIFO and sets the empty flag (EF) to 1. Table 4.6: Register for FIFO Clear Write FIFO clear Bit# BASE+19H PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 52
A/D Conversion This chapter explains how to use the PCM-3718 series’ A/D conversion functions. The first five sections describe A/D data format, input range selection, sta- tus register settings, MUX scan setting, trigger modes and data transfer. This section gives step by step imple- mentation guidelines for A/D opera- tions.
Refer to page 33, A/D Status Register, for more information. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
5.2 Input Range Selection Each A/D channel has its own individual input range, controlled by a range code stored in the onboard RAM. Please refer to pages 28 and 29 on A/D Range Control, for more information. 5.3 MUX Setting PCM-3718 cards offer 16 single-ended or eight differential analog input channels.
The A/D conversion starts at the rising edge of the external trigger pulse. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
5.5 A/D Data Transfer You can perform A/D data transfer by Program Control, Interrupt Rou- tine or DMA. Program controlled data transfer operates by polling the A/D status register. After the A/D conversion has been triggered, your applica- tion program checks the INT bit (data valid) of the A/D status regis- ter.
Read data from the A/D converter by reading the A/D data registers (BASE+0 and BASE+1). Convert the binary A/D data to an integer. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 58
Digital Input/Output Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
DIO15 DIO14 DIO13 DIO12 DIO11 DIO10 DIO9 DIO8 Using the PCM-3718’s input and output functions is fairly straightfor- ward. Page 23 shows some ideas for digital signal connections. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Intel 8254 has six operational modes, from Mode 0 through Mode 5. To generate a pacer clock, program both Counter 1 and Counter 2 for Mode 3 (square wave generation). PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
7.2 Counter Read/write and Control Register The 8254 programmable interval timer uses four registers at addresses BASE+12, BASE+13, BASE+14 and BASE+15. Register functions are listed below: Register Function BASE+12 Counter 0 read/write BASE+13 Counter 1 read/write BASE+14 Counter 2 read/write BASE+15 Counter control word Since the 8254 counter uses a 16-bit structure, each section of read/write...
Page 63
If you set both SC1 and SC0 bits to 1, the counter control register is in read-back command mode. The control register data format becomes: BASE+15 - 8254 control, read-back mode Value 1 PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 64
CNT = 0 Latch count of selected counter(s). STA = 0 Latch status of selected counter(s). C2, C1 & C0 Select counter for a read-back operation. C2 = 1 select Counter 2 C1 = 1 select Counter 1 C0 = 1 select Counter 0 If you set both SC1 and SC0 to 1 and STA to 0, the register selected by C2 to C0 contains a byte which shows the status of the counter.
With this mode the output will remain high until you load the count register. You can also synchronize the output by software. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 66
MODE 3 - Square Wave Generator This mode is similar to Mode 2, except that the output will remain high until one half of the count has been completed (for even numbers), and will go low for the other half of the count. This is accomplished by decreasing the counter by two on the falling edge of each clock pulse.
16-bit hold register. The second way is to perform a latch operation under the read-back command. Set bits SC1 and SC0 to 1 PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
and CNT to 0. The latter method has the advantage of operating several counters at the same time. A subsequent read operation on the selected counter will retrieve the latched value. 7.5 Counter Applications The 8254 programmable Interval timer/counter on your PCM-3718 inter- face module is a very useful device.
Page 69
OUTPORTB (BASE+3, 0xB6); /* SET COUNTER 2 TO MODE 3*/ OUTPORTB (BASE+2, 10); /*WRITE LOW BYTE OF C2*/ OUTPORTB (BASE+2, 0); /*WRITE HIGH BYTE OF C2*/ PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 70
Direct Memory Access (DMA) Operation Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Word count register (specify the number of transfers) Initialization register (enable and disable DMA channels) You must properly set all four registers before requesting the DMA operation. PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
8.2 Using DMA Transfer with PCM-3718 Cards A DMA transfer is a powerful but complicated operation. Related descriptions of the DMA transfer have been covered in other paragraphs of this manual (for details please see pages 38~40). The following steps summarize how to use DMA transfer with PCM-3718 cards: When you configure your hardware, check if any PC DMA channel is available (level 1 or level 3) and set the PCM-3718 card’s jumper...
Page 73
PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
A/D bipolar offset A/D unipolar offset High Gain Calibration offset (only for PCM-3718HG) D/A full scale adjustment (only for PCM-3718HO) D/A offset (only for PCM-3718HO) PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
9.2 D/A, A/D Calibration Regular and accurate calibration procedures ensure maximal accuracy. The CALB.EXE calibration program leads you through D/A and A/D off- set and gain adjustment procedure. The basic steps are outlined below: 9.2.1 D/A Calibration Procedure Please prepare a multimeter before you implement the D/A calibration. Connect it to D/A output (pin19 on connector P1) D/A calibration procedures (PCM-3718HO only) Press the Down button to select the code to 0 and adjust VR6 until...
Page 77
PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
Page 78
Software Driver User Note Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
PCM-3718 cards are supported by a powerful software utility provided by Advantech. The lists below shows the functions supported by the PCM-3718 Series. (i.e., the items with the "*" mark are supported). For complete function descriptions of the software utility please refer to the PC-LabCard software Utility User Manual.
Page 80
Func 25 Perform digital input with interrupt data transfer Func 26 Get Func 25’s operational status Func 27 Stop Func 25 *Func 28 D/O Initialization *Func 29 Perform digital output with software data transfer *Func 30 Read back current digital output status Func 31 Perform digital output with DMA data transfer Func 32...
Page 81
Perform Block channel scan with software data transfer *Func 105 Perform Block channel scan with interrupt data transfer *Func 106 Get Func 105’s status *Func 107 Stop Func 105 PCM-3718 Series User Manual Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...