PCI-208 / CPCI.208 manual
31.03.2004
Page 21 of 30
int16 SpcGetData (int16 nr, int16 ch, int32 start, int32 len, dataptr data)
nr
16 bit integer
number of the board as defined by SpcInit...
ch
16 bit integer
channel to be read
start
32 bit integer
startvalue to be read
len
32 bit integer
number of values to be read
data
huge ptr to data
data space for read values
return
16 bit integer
error code of function like listed below
Reads data from the board from a specific channel. The board must be initialised before. When using ISA boards, all installation
parameters must be set before (address, installed memory, ...). The Start and Len parameter are implemented on all PCI boards. On
ISA boards the whole data will be read in one turn. The read out data is in the twos complement format and could be directly used for
data processing as standard integer values.
Error Codes
error name
value
(hex)
value
(dec.)
description
ERR_OK
0
0
Execution OK, no error.
ERR_INIT
1
1
The board number is not in the range of 0 to 15. When initialisation is executed: the board number is
yet initialised, the old definition will be used.
ERR_NR
2
2
The board is not initialised yet. Use the function
SpcInitBoard
or
SpcInitPCIBoards
first.-
ERR_TYP
3
3
Initialisation only: The type of board is unknown.
ERR_FNCNOTSUPPORTED
4
4
This function is not supported by the hardware version.
ERR_LASTERR
10
16
Old Error waiting to be read.
ERR_ABORT
20
32
Abort of wait function
ERR_BOARDLOCKED
30
48
Access to the driver already locked by another program. Stop the other program before starting this one.
ERR_REG
100
256
The register is not valid for this type of board.
ERR_VALUE
101
257
The value for this register is not in a valid range, the allowed values and ranges are listed in the board
specific documentation.
ERR_FEATURE
102
258
Feature is not installed on this board
ERR_SEQUENCE
103
259
Channel sequence is not allowed.
ERR_READABORT
104
260
Data read is not allowed after aborting the data acquisition.
ERR_NOACCESS
105
261
Access to this register denied. No access for user allowed.
ERR_POWERDOWN
106
262
Not allowed if powerdown mode is activated.
ERR_CHANNEL
110
272
The channel number may not be accessed on the board: Either it is not a valid channel number or the
channel is not accessible due to the actual setup (e.g. Only channel 0 is accessible in interlace mode)
ERR_RUNNING
120
288
The board is still running, this function is not available now or this register is not accessible now.
ERR_ADJUST
130
304
Automatic adjustion has reported an error. Please check the boards inputs.
ERR_NOPCI
200
512
No PCI BIOS is found on the system.
ERR_PCIVERSION
201
513
The PCI bus has the wrong version. SPECTRUM PCI boards require PCI revision 2.1 or higher.
ERR_PCINOBOARDS
202
514
No SPECTRUM PCI boards found.
ERR_PCICHECKSUM
203
515
The checksum of the board information has failed.
ERR_DMALOCKED
204
516
DMA buffer not available now.
ERR_MEMALLOC
205
517
Internal memory allocation failed.
ERR_FIFOBUFOVERRUN
300
768
Driver buffer overrun in FIFO mode.
ERR_FIFOHWOVERRUN
301
769
Hardware buffer overrun in FIFO mode.
ERR_FIFOFINISHED
302
770
FIFO transfer has been finished, programmed number of buffers has been transferred.
ERR_FIFOSETUP
309
777
FIFO setup not possible, transfer rate to high (max 250 MB/s)
ERR_TIMESTAMP_SYNC
310
784
Synchronisation to external reference clock failed.
Valid Board Types
board
type(hex)
type (dec)
board
type(hex)
type (dec)
board
type(hex)
type (dec)
PAD52
600
1536
PAD1616a
500
1280
PCI.212
300
384
PAD82
200
512
PAD1616b
510
1296
PCI.208
1000
4096
PAD82a
210
528
PAD164/2
900
2304
PCI.412
1100
4352
PAD82b
220
544
PAD164/5
910
2320
PCI.DIO32
1200
4608
PAD242
700
1792
PADCO-06
1400
5120
PCI.248
1300
4864
PAD1232-10
400
1024
PCK400
800
2048
PCI.258
1600
5632
PAD1232-30
410
1040
DAP116
100
256
MI.3010
3010
12304
PAD1232-40
420
1056
TRS582
1500
5376
...
...
...