Smacq Technologies PCI-1255 User manual

PCI-1255 Multifunctional DAQ Device
User Manual
Smacq Technologies Co., Ltd.
2015-09-10

1
CONTENT
CHAPTER 1 OVERVIEW .......................................................................................................................3
1.1 PRODUCT INTRODUCTION............................................................................................................3
1.2 PRODUCT FEATURES ...................................................................................................................3
1.3 PRODUCT SPECIFICATIONS............................................................................................................4
CHAPTER 2 SIGNAL CONNECTION AND CONFIGURATION...................................................................6
2.1 OVERVIEW................................................................................................................................6
2.2 37-PIN -TYPE CONNECTION..........................................................................................................6
2.3 40-PIN IDC CONNECTER .............................................................................................................7
2.4 ANALOG INPUT CHANNEL SETTING.................................................................................................8
2.5 ANALOG INPUT RANGE SETTING ....................................................................................................9
2.6 ANALOG INPUT CALIBRATION........................................................................................................9
2.7 OTHER SETTINGS........................................................................................................................9
2.8 TIMED TRIGGER .......................................................................................................................10
CHAPTER 2 INSTALLATION AND TESTING.......................................................................................... 12
3.1 HARDWARE INSTALLATION .........................................................................................................12
3.2 INSTALLING DRIVER...................................................................................................................12
3.3 TESTING.................................................................................................................................13
CHAPTER 4 PROGRAMMING GUIDE .................................................................................................15
4.1 OVERVIEW..............................................................................................................................15
4.2 EXAMPLE CODES OVERVIEW .......................................................................................................15
4.3 LIBRARY FUNCTION DETAILS........................................................................................................15
GetCardCount() ...................................................................................................................15
OpenDevice().......................................................................................................................16
CloseDevice().......................................................................................................................16
CloseAllDevice()...................................................................................................................16
ReadDevice() .......................................................................................................................16
WriteDevice() ......................................................................................................................17
AiConfig() ............................................................................................................................17
AiRangeSet() ....................................................................................................................... 18
AiChanSet() .........................................................................................................................18
AiSampleRateSet() ..............................................................................................................19
IrqEnable() ..........................................................................................................................19
IrqDisable()..........................................................................................................................19
AiExtTrigEnable() ................................................................................................................20
AiExtTrigDisable() ...............................................................................................................20
AiSoft() ................................................................................................................................20
AiExtTrig() ...........................................................................................................................20
ClearHFifo() .........................................................................................................................21
GetHFifoStatus() .................................................................................................................21
ClearSFifo().......................................................................................................................... 21

2
GetSFifoStatus() ..................................................................................................................21
ReadSFifo()..........................................................................................................................22
DiRead() ..............................................................................................................................22
DoSet() ................................................................................................................................22
CTStart()..............................................................................................................................22
CTRead()..............................................................................................................................23
CTStop() ..............................................................................................................................23
CHAPTER 5 REGISTER DETAIL............................................................................................................ 24
CHAPTER 6 SERVICE AND WARRANTY ..............................................................................................26

3
Chapter 1 Overview
1.1 Product introduction
PCI-1255 is a high-performance data acquisition product that is feature-rich and
cost-effective. Based on 32-bit PCI interface, PCI-1255 can provide 12-bit with max sampling rate
of 500kS/s, up to 32 channels analog data acquisition. Equipped with 16 digital input channels, 16
digital output channels, and 3 16-dit timer/counter channels, this is the best choice for you
weighing cost control and the speed of completion.
Figure 1.1 shows the block diagram of PCI-1255.
1.2 Product features
32 channels single-ended analog input or 16 channels differential analog input
Up to 500kS/s analog input sampling rate
MUX
AI 0
TO
AI 31
ADC
Logic
&
Memory
DIO
82C54
PCI
Controller
32-bit PCI Bus
Figure 1.1、PCI-1255 block diagram

4
12-bit analog input resolution
Onboard 8k sampling points FIFO cache
16 channels digital input and 16 channels digital output
82C54 programmable timer/counter
LabVIEW、Visual Studio and MATLAB development support
1.3 Product specifications
Analog input
Channels
32 channels single-ended or 16 channels differential
configurable
Synchronous sampling
No
Sampling rate
Single channel acquiring:Max 500kS/s
Multiple channels scanning:Max 200kS/s
Resolution
12-bit
Range
0~10V or -5~5V configurable
Input resistance
1MΩ
Input coupling
DC
Input FIFO cache
8192 sampling points
Trigger mode
Software trigger, timing trigger or external trigger
Interrupt source
External trigger interrupt or FIFO half full interrupt
Digital IO
Channels
16 channels digital input + 16 channels digital output
Logic level
5V TTL/CMOS compatible
Timer/Counter
Channels
3
Logic level
5V TTL/CMOS compatible
Max input frequency
8MHz
General specifications
Communication interface
32-bit PCI bus

5
Front connector
37-pin D-type connector
Back connector
40-pin IDC connector
Operating temperature
0~50℃
Storage temperature
-20~80℃
Dimension(mm)
175*106

6
Chapter 2 Signal connection and configuration
2.1 Overview
Before installing the DAQ device, you need to know the functions and positions of all
connectors, tuners and jumpers on PCI-1255 device.
PCI--1225 is equipped with two signal connectors. The 37-pin D-type connecter on its front
panel is mainly used for analog input. The 40-pin IDC connector on its back panel is mainly sued
for digital IO signal connection.
There are specific tuners and jumpers for specific settings of analog input calibration,
channel input mode, and trigger. More detail about them are in later chapters.
Figure 2.1 shows relative connectors and their corresponding settings.
2.2 37-pin -type connection
The 37-pin D-type connector is used for connections to analog input channels and the 3 OUT
ports on 82C54. Figure 2.2 shows its pin details. In the case that no analog input channel is being
used, it is best to ground it to increase the measurement accuracy of the device as much as
VR1
VR2
JP2
JP1
JP3
40-pin
IDC
37-pin
D-Type
Figure 2.1、connecters and settings positions

7
possible.
2.3 40-pin IDC connecter
40-pin IDC connecter is used for connection to digital IO channel and 3 timer/counter CLK-IN
port. Figure 2.3 shows its pin details.
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19:OUT 0
18:OUT 2
17:AGND
16:AI 15
15:AI 14
14:AI 13
13:AI 12
12:AI 11
11:AI 10
10:AI 9
9:AI 8
8:AI 7
7:AI 6
6:AI 5
5:AI 4
4:AI 3
3:AI 2
2:AI 1
1:AI 0
37:OUT 1
36:DGND
35:AI 31
34:AI 30
33:AI 29
32:AI 28
31:AI 27
30:AI 26
29:AI 25
28:AI 24
27:AI 23
26:AI 22
25:AI 21
24:AI 20
23:AI 19
22:AI 18
21:AI 17
20:AI 16
Figure 2.2、37-pin D-type connector pin details

8
2.4 Analog input channel setting
Jumper JP1 is for the setting of analog input channel, which can be set as single-ended input
or differential input as showed in Figure 2.4.
Singled-ended input
Differential input
Figure 2.4、Analog input channel setting
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
39:DGND
37:CLK-IN 2
35:CLK-IN 0
33:DGND
31:DO 14
29:DO 12
27:DO 10
25:DO 8
23:DO 6
21:DO 4
19:DO 2
17:DO 0
15:DI 14
13:DI 12
11:DI 10
9:DI 8
7:DI 6
5:DI 4
3:DI 2
1:DI 0
40:DGND
38:CLK-IN 2
36:CLK-IN 1
34:DGND
32:DO 15
30:DO 13
28:DO 11
26:DO 9
24:DO 7
22:DO 5
20:DO 3
18:DO 1
16:DI 15
14:DI 13
12:DI 11
10:DI 9
8:DI 7
6:DI 5
4:DI 3
2:DI 1
Figure 2.3、40-pin IDC connecter pin details

9
2.5 Analog input range setting
Jumper JP1 is for the setting of analog input range, which can be set as 0~10V range or
-5~5V range as shown in Figure 2.5.
2.6 Analog input calibration
A new PCI-1255 DAQ card will be factory-calibrated as 32 channels singled ended input with
0~10V range. It can be deployed right after basic verification. If there is any change on channel
input or range, it must be calibrated once again to make sure the DAQ card can acquire the
correct data.
The analog input correction is divided into two steps: correcting the full scale and correcting
the zero point. The regulator VR1 is used to correct the full scale and VR2 is used to correct the
zero point.
Be aware that in the calibration process, do not touch any conductive parts on the DAQ card
to avoid damaging the card or the computer.
Correction steps:
1、Enter the maximum voltage value of the range you set to any one of the analog input
channels. Adjust the VR1 so that the DAQ card measurements just reach this maximum voltage.
2、Connect the analog input channel to the AGND, adjust the VR2 so that the measurement
value on the DAQ card is just 0V.
3、Repeat the above two steps a few times to get the best correction result.
2.7 Other settings
Jumper JP3 is for relative settings on 82C54, the timing trigger and external trigger for
0~10V
-5~5V
Figure 2.5、Analog input range setting

10
analog input channel. Figure 2.6 shows the detailed notes. The shaded portion represents the
default factory settings.
2.8 Timed trigger
Timing trigger means that the DAQ card will trigger data acquisition in accordance with the set
fixed frequency.
Figure 2.7 illustrates the implementation principle of PCI-1255 timing trigger based on the
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1
Internal clock of 8MHz
2
82C54 counter 0 output as OUT 0
3
82C54 counter 1 output as OUT 1
4
82C54 counter 2 gated signal as GATE 2
5
82C54 counter 0 output as OUT 0
6
82C54 counter 1 gated signal as GATE 1
7
82C54 counter 2 output as OUT 2
8
Analog input external trigger signal as EXT_TRIG
9
82C54 counter 0 clock input as CLK 0
10
82C54 counter 1 clock input as CLK 1
11
82C54 counter 2 clock input as CLK 2
12
82C54 counter 2 output as OUT 2
13
Analog input external trigger signal as EXT_TRIG
14
82C54 counter 1 output OUT 1
15
82C54 counter 0 gated signal GATE 0
16
Digital input signal DI 0
17
40-pin IDC connector input as CLK-IN 0
18
40-pin IDC connector input as CLK-IN 1
19
40-pin IDC connector input as CLK-IN 2
Attention: All signals related to 82C54 on 37-pin D-type connector and 40-pin IDC
connector are connected through logic device 7414, so the signals on the
connector will be reversed with the signals marked on the 82C54 device manual.
Figure 2.6、JP3 in detail

11
default factory setting for JP3.
JP3 can also enable many acquisition modes, including using digital input signal DI 0 to
trigger AD acquisition and using 82C54's counter 2 to trigger AD acquisition, to meet the needs of
different applications.
82C54
Counter 0
8MHz input
Frequency realization
500kHz
AD external trigger
signal EXT_TRIG
Figure 2.7、Implementation principle of default timing trigger

12
Chapter 2 Installation and Testing
3.1 Hardware installation
Be sure to turn off the computer before installing the DAQ card into it. Install it by the
followings steps:
1、Unplug the computer's power cord and all other peripheral cables connected to the
computer.
2、Open the computer chassis. Release the operator's body static.
3、Pick up the DAQ card by its baffle or edge, line up the card with any PCI slot in the
computer, and correctly insert it into the PCI slot. Do not use too much force during the
process. Do not hand contact the card finger to avoiding damaging the card or the
computer.
4、Use screws to fix the card holder on the computer's rear panel rail.
5、Close the computer chassis. Reconnect all the cords unplugged in Step 1.
6、Now the DAQ card hardware is installed. Restart the computer.
3.2 Installing driver
On a PC running Windows OS, if you installed Smacq PCI-1255 DAQ card without its driver,
you will see an unknown device with exclamation in the Windows device manager. Please follow
the steps below to install the driver correct (this manual will base the steps on 32-bit Microsoft
Windows 7, which are all the same on other Windows versions.)
1、Select the device with exclamation, right click on it and select "Update Driver Software".
2、In the window of "How do you want to search for driver software", select "Browse my
computer for driver software".
3、In the window of “Browse my computer for driver software", select "Let me pick from a
list of device drivers on my computer".
4、In the window of “Select the type of device from the following list”, click “Next”.
5、In the window of “Select the device driver you want to install for this hardware”, click
“Have Disk…”, then click “Browse”. Based on your Windows version, select the file

13
“pci-1255.inf” within the correct folder. Click “Open” and then click “OK”.
6、The window will display the selected Smacq PCI-1255 hardware information, select it
and click “Next”. If a security alert pops up, select "Install this driver software anyway".
7、The OS will now begin the driver installation. After the installation, the exclamation
within the Device Manager will disappear, and the correct device information will be
displayed.
3.3 Testing
After installing the driver correctly, you can perform basic tests on the Smacq PCI-1255 DAQ
card. This section performs basic tests based on the VC example codes included in the resource
CD.
Open the folder of "PCI-1255\demo\vc\Ai Soft Trig\Debug", run the program "Ai Soft
Trig.exe". If you see an "0" in card index option, it means that the computer recognize a Smacq
PCI-1255 DAQ card installed. (The card index counts from 0.) If the card index is empty, it means
that the DAQ card is not correctly installed.
Arrange an input of 5V DC voltage to Al 1, ground other analog input channels, select "0" in
the card index, make no other changes to the settings, and click "Start", you will see the interface
as shown in Figure 3.1, in which the software acquired the input 5V DC voltage. The DAQ card
basic test is done now.
If the software cannot acquire the input 5V DC voltage, there is need to check signal cord
connection and calibration settings.

14
Figure 3.1、Basic tests using example codes.

15
Chapter 4 Programming Guide
4.1 Overview
We provide a function library, pci-1255.dll, which contains all the functions of Smacq PCI-1255
DAQ card. This is a standard dynamic link library that can be applied to various Windows-based
software development platforms. We provide example codes based on LaVIEW, VC and VB to
help you master the functions of PCI-1255 and its application development.
In addition, you can directly manage read and write operations through PCI interface I / O
port to develop applications, please refer to the "Chapter 5 Register Description" for details.
4.2 Example codes overview
In the LabVIEW environment, we made all the library functions in a sub-vi, and LabVIEW
developers can look at the sub-vi class distinctions with the vi tree and refer to the example
codes inside the folder of "pci-1255 \ demo \ LabVIEW \ example" to quickly grasp all the
functions of PCI-1255.
In the VB environment, all the library function declarations are in the file "pci-1255.vb". VB
developers can refer to the example codes inside the folder of "pci-1255\demo\vb\example" to
quickly grasp all the functions of PCI-1255.
In the VB environment, all the library function declarations are in the file "pci-1255.h". VB
developers can refer to the example codes inside the folder of "pci-1255\demo\vc\example" to
quickly grasp all the functions of PCI-1255.
4.3 Library function details
This section will detail all functions provided in “pci-1255.dll”based on the file of
“pci-1255.h”.
GetCardCount()
long _stdcall GetCardCount(void)

16
Notes:Get the quantity of this type of DAQ cards in the system. It does not count
the cards without correct drivers.
Parameter:None
Return value:>=0. It means the quantity of this type of DAQ cards recognized in
the system.
OpenDevice()
long _stdcall OpenDevice(unsigned long Index)
Notes:Open specific device.
Parameter:Index:card index, select the card to open. The card sequence counts from
0.
Return value:0:Success;-1: Failure.
CloseDevice()
long _stdcall CloseDevice(unsigned long Index)
Parameter:Close specific device.
Parameter:Index:card index, select the card to close.
Return value:0:Success;-1: Failure.
CloseAllDevice()
long _stdcall CloseAllDevice(void)
Notes:Close all devices of same model opened by the current process.
Parameter:None.
Return value:0:Success;-1: Failure.
ReadDevice()
long _stdcall ReadDevice(unsigned long Index, unsigned long nOffset, unsigned long
*pResult)
Notes:To perform 32-bit read IO operation on the board register. This function is a low-level

17
hardware function, which normally will not be used during normal programming. Refer
to "Chapter 5, Register Detail" for its offset addresses and corresponding functions if
you need to use this it.
Parameter:Index:card index,select card number to operate.
nOffset:offset address, which can be found on the user manual.
*pResult:The fetched value.
Return value:0:Success;-1: Failure.
WriteDevice()
long _stdcall WriteDevice(unsigned long Index, unsigned long nOffset, unsigned long
DataToWrite)
Notes:To perform 32-bit write IO operation on the board register. This function is a low-level
hardware function, which normally will not be used during normal programming. Refer
to "Chapter 5, Register Detail" for its offset addresses and corresponding functions if
you need to use this it.
Parameter:Index:card index, to select the card to manage
nOffset:offset address, which can be found in this manual.
DataToWrite:the data to write.
Return value:0:Success;-1: Failure.
AiConfig()
long _stdcall AiConfig(unsigned long Index, unsigned long StartMode, unsigned long
IrqMode, unsigned long ScanMode)
Notes:Configure the DAQ card register, that is write offset address 32.
Parameter:Index:card index, to select the card to manage.
StartMode:start mode, 0 for software startup, 1 for external trigger timing start
IrqMode:interrupt mode, 0 for external trigger interrupt, 1 for FIFO half full interrupt
Attention:only when StartMode is 1, interrupts are effective.

18
If StartMode is 0, then IrqMode should be set as 1.
ScanMode:Scan mode of the DAQ card. 0 for fixed channel mode, 1 for automatic
switching channel scan.
Return value:0:Success;-1: Failure.
AiRangeSet()
long _stdcall AiRangeSet(unsigned long Index, float AiRange)
Notes:Set the channel range.
Parameter:Index:card index, to select the card to manage.
AiRange:In here, positive number means positive range, while negative number means
negative and positive range, measured in mV.
For example:A setting of 10000 means 0~10V,while a setting of -5000
means -5~5V。
Return value:0:Success;-1: Failure.
AiChanSet()
long _stdcall AiChanSet(unsigned long Index, unsigned long ChanMode, unsigned long
AiChan)
Notes:Set channel, that is write offset address 0.
Parameter:Index:card index, to select the card to manage.
ChanMode:Set channel mode, 0 for single-ended input, 1 for differential input.
AiChan:
When the DAQ card is set as fixed channel mode, this means setting the
channel number.
When the card is configured to automatic switching channel san, this means
the ending channel number.
Attention:When the card is configured as single-ended input, this can be set
as 0~31;
When the card is configured as differential input, this can be set as 0~15.

19
Return value:0:Success;-1: Failure.
AiSampleRateSet()
long _stdcall AiSampleRateSet(unsigned long Index, unsigned long DivFactor)
Notes:Set the sampling rate for hardware timing trigger acquisition
Parameter:Index:card index, to select the card to manage.
DivFactor:Frequency division factor。The timing trigger sampling rate is obtained by
dividing the 8MHz clock by the division factor.
For example,when set as 80,sampling rate=8MHz/80=100kHz
Attention:For single channel mode,the max sampling rate is 500kSp/s;
For multiple channels switching, the max sampling rate is 200kSp/s.
Return value:0:Success;-1: Failure.
IrqEnable()
long _stdcall IrqEnable(unsigned long Index)
Notes:Enable interrupt.
Usually used in timing trigger acquisition, enabling interrupt lets the computer automatically
read the hardware FIFO data into software computer memory FIFO, to avoid the hardware
FIFO overflow.
Parameter:Index:card index, to select the card to manage.
Return value:0:Success;-1: Failure.
IrqDisable()
long _stdcall IrqDisable(unsigned long Index)
Notes:Disable interrupt.
Parameter:Index:card index, to select the card to manage.
Return value:0:Success;-1: Failure.
Table of contents
Other Smacq Technologies Storage manuals
Popular Storage manuals by other brands

Renkforce
Renkforce M.2 SSD housing USB 3.1 Gen 2 with USB-C operating instructions

IBM
IBM Storwize V7000 Problem Determination Guide

Seagate
Seagate FreeAgent Desk quick start guide

Quantum
Quantum DLT-S4 quick start guide

Lifetime
Lifetime 60059 Assembly instructions

ARCO
ARCO EzRAID eSATA RAID+ quick start guide