Spectrum Brands MC.31XX Appendix, Error Codes, Error name Value hex Value dec Error description

Page 100

Error Codes

Appendix

 

 

Appendix

Error Codes

The following error codes could occur when a driver function has been called. Please check carefully the allowed setup for the register and change the settings to run the program.

error name

value (hex)

value (dec.)

error description

ERR_OK

0h

0

Execution OK, no error.

ERR_INIT

1h

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

2h

2

The board is not initialised yet. Use the function SpcInitPCIBoards first. If using ISA boards the function SpcIn-

 

 

 

itBoard must be called first.

ERR_TYP

3h

3

Initialisation only: The type of board is unknown. This is a critical error. Please check whether the board is

 

 

 

correctly plug in the slot and whether you have the latest driver version.

ERR_FNCNOTSUPPORTED

4h

4

This function is not supported by the hardware version.

ERR_BRDREMAP

5h

5

The board index remap table in the registry is wrong. Either delete this table or check it craefully for double

 

 

 

values.

ERR_KERNELVERSION

6h

6

The version of the kernel driver is not matching the version of the DLL. Please do a complete reinstallation of

 

 

 

the hardware driver. This error normally only occurs if someone copies the dll manually to the system direc-

 

 

 

tory.

ERR_HWDRVVERSION

7h

7

The hardware needs a newer driver version to run properly. Please install the driver that was delivered

 

 

 

together with the board.

ERR_LASTERR

10h

16

Old Error waiting to be read. Please read the full error information before proceeding. The driver is locked

 

 

 

until the error information has been read.

ERR_ABORT

20h

32

Abort of wait function. This return value just tells that the function has been aborted from another thread.

ERR_BOARDLOCKED

30h

48

Access to the driver already locked by another program. Stop the other program before starting this one.

 

 

 

Only one program can access the driver at the time.

ERR_REG

100h

256

The register is not valid for this type of board.

ERR_VALUE

101h

257

The value for this register is not in a valid range. The allowed values and ranges are listed in the board spe-

 

 

 

cific documentation.

ERR_FEATURE

102h

258

Feature (option) is not installed on this board. It’s not possible to access this feature if it’s not installed.

ERR_SEQUENCE

103h

259

Channel sequence is not allowed.

ERR_READABORT

104h

260

Data read is not allowed after aborting the data acquisition.

ERR_NOACCESS

105h

261

Access to this register denied. No access for user allowed.

ERR_POWERDOWN

106h

262

Not allowed if powerdown mode is activated.

ERR_TIMEOUT

107h

263

A timeout occured while waiting for an interrupt. Why this happens depends on the application. Please

 

 

 

check whether the timeout value is programmed too small.

ERR_CHANNEL

110h

272

The channel number may not be accessed on the board: Either it is not a valid channel number or the chan-

 

 

 

nel is not accessible due to the actual setup (e.g. Only channel 0 is accessible in interlace mode)

ERR_RUNNING

120h

288

The board is still running, this function is not available now or this register is not accessible now.

ERR_ADJUST

130h

304

Automatic adjustion has reported an error. Please check the boards inputs.

ERR_NOPCI

200h

512

No PCI BIOS is found on the system.

ERR_PCIVERSION

201h

513

The PCI bus has the wrong version. SPECTRUM PCI boards require PCI revision 2.1 or higher.

ERR_PCINOBOARDS

202h

514

No SPECTRUM PCI boards found. If you have a PCI board in your system please check whether it is cor-

 

 

 

rectly plug into the slot connector and whether you have the latest driver version.

ERR_PCICHECKSUM

203h

515

The checksum of the board information has failed. This could be a critical hardware failure. Restart the sys-

 

 

 

tem and check the connection of the board in the slot.

ERR_DMALOCKED

204h

516

DMA buffer not available now.

ERR_MEMALLOC

205h

517

Internal memory allocation failed. Please restart the system and be sure that there is enough free memory.

ERR_FIFOBUFOVERRUN

300h

768

Driver buffer overrun in FIFO mode. The hardware and the driver have been fast enough but the application

 

 

 

software didn’t manage to transfer the buffers in time.

ERR_FIFOHWOVERRUN

301h

769

Hardware buffer overrun in FIFO mode. The hardware transfer and the driver has not been fast enough.

 

 

 

Please check the system for bottlenecks and make sure that the driver thread has enough time to transfer

 

 

 

data.

ERR_FIFOFINISHED

302h

770

FIFO transfer has been finished, programmed number of buffers has been transferred.

ERR_FIFOSETUP

309h

777

FIFO setup not possible, transfer rate to high (max 250 MB/s).

ERR_TIMESTAMP_SYNC

310h

784

Synchronisation to external timestamp reference clock failed. At initialisation is checked wether there is a

 

 

 

clock edge present at the input.

ERR_STARHUB

320h

800

The autorouting function of the star-hub initialisation has failed. Please check whether all cables are mounted

 

 

 

correctly.

100

MC.31xx Manual

Image 100
Contents MC.31xx English version April 27Page Hardware Installation Software Driver InstallationIntroduction SoftwareFifo Mode Programming the BoardAnalog Inputs Standard acquisition modesOption Multiple Recording Option Gated SamplingOption Timestamp Option Extra I/OIntroduction PrefaceGeneral Information PrefaceMC.3110 MC.3120 MC.3130 MC.3111 MC.3121 MC.3131 Different models of the MC.31xx seriesIntroduction MC.3112 MC.3122 MC.3132 Additional options Digital inputsExtra I/O Option -XMF Introduction Additional optionsStarhub TimestampSpectrum type plate Block diagram Technical Data Hardware informationDynamic Parameters Order informationIntroductionHardware information Order No DescriptionInstalling the board in the system Hardware InstallationSystem Requirements Installing a board with extra I/O Option -XMF Installing a board with digital inputs/outputsHardware Installation Installing multiple boards synchronized by starhub Mounting the wired boardsHooking up the boards Only use the included flat ribbon cablesInstalling multiple synchronized boards Interrupt Sharing Software Driver InstallationInterrupt Sharing Installation Software Driver Installation WindowsWindows Version controlDriver Update Windows Driver Update Software Driver Installation Windows XPWindows XP Windows NT Software Driver Installation Windows NTAdding boards to the Windows NT driver Linux OverviewInstalling the device Now it is possible to access the board using this deviceDriver info Automatic load of the driverSoftware Software OverviewFirst Test with SBench Software Overview++ Driver Interface Header filesMicrosoft Visual C++ Borland C++ BuilderOther Windows C/C++ compilers National Instruments LabWindows/CVIDriver functions Include DriversSoftware ++ Driver Interface Using the Driver under Linux Function SpcSetParamFunction SpcSetParam Function SpcSetData WindowsDelphi Pascal Programming Interface Type definitionInclude Driver ExamplesSoftware Visual Basic Examples Visual Basic Programming InterfaceVBA for Excel Examples Visual Basic Programming Interface Error handling Programming the BoardOverview Register tablesExample for error checking InitializationStarting the automatic initialization routine PCI RegisterInstalled memory Installed features and optionsHardware version Date of productionUsed interrupt line Used type of driverProgramming the Board Initialization Driver versionPowerdown and reset Example program for the board initializationSpcpcimemsize SpcpciserialnoAnalog Inputs Channel SelectionImportant note on channels selection Analog InputsChannel rerouting Rerouting information for moduleSPCCHROUTE0 SPCCHROUTE1Setting up the inputs Input rangesInput offset Register Value Direction Description Offset rangeOverrange bit Automatical adjustment of the offset settingsInput termination Spcadjautoadj Adjall Spcadjsave ADJUSER0Standard acquisition modes ProgrammingMemory, Pre- and Posttrigger Pretrigger = memsize posttriggerStarting without interrupt classic mode Command registerMaximum posttrigger in MSamples Minimum memsize and posttrigger in samplesStandard acquisition modes Programming Starting with interrupt driven modeStatus register Normal mode Fast 8 bit mode201100 Enables the fast 8 bit mode Data organizationStandard mode Reading out the data with SpcGetDataValue ’start’ as a 32 bit integer value Value ’len’ as a 32 bit integer valueProgramming Fifo Mode General InformationBackground Fifo Read Speed LimitationsProgramming Fifo Mode Software BuffersTheoretical maximum sample rate PCI Bus Throughput 60040 Read out the number of available Fifo buffersFifo Mode Programming Buffer processingAnalog acquisition or generation boards Digital I/O 701x or 702x or pattern generator boardsExample Fifo acquisition mode Fifo acquisition exampleSpcfifostart SpcfifowaitSample format Internally generated sample rate Clock generationStandard internal sample rate Using plain quartz without PLL Maximum internal sample rate in MS/s normal modeExternal reference clock Clock generationExternal clocking Direct external clockMinimum external sample rate Maximum external samplerate in MS/sCHANNEL0 CHANNEL1 CHANNEL2 CHANNEL3 External clock with dividerFifo Trigger modes and appendant registers General DescriptionSoftware trigger External TTL triggerExample on how to set up the board for positive TTL trigger Edge triggersTrigger modes and appendant registers Positive TTL triggerPulsewidth triggers Positive and negative TTL triggerTTL pulsewidth trigger for long High pulses TTL pulsewidth trigger for short High pulsesTTL pulsewidth trigger for long LOW pulses TTL pulsewidth trigger for short LOW pulsesSpctriggermode Tmttlhighlp SpcpulsewidthChannel Trigger Overview of the channel trigger registersSpctriggermode Tmchannel TmchxoffTriggerlevel Spctriggermode TmchorSPCTRIGGERMODE0 Tmchxoff SPCTRIGGERMODE2 TmchxoffReading out the number of possible trigger levels SPCTRIGGERMODE0 TmchxposSPCHIGHLEVEL0 Input ranges Triggerlevel ±50 mV ±100 mV ±200 mV ±500 mVDetailed description of the channel trigger modes Channel trigger on positive edgeChannel trigger on negative edge Channel trigger on positive and negative edgeChannel pulsewidth trigger for long positive pulses Channel pulsewidth trigger for long negative pulsesChannel pulsewidth trigger for short negative pulses Channel pulsewidth trigger for short positive pulsesTmchxposgsp Channel steepness trigger for flat positive pulses Channel steepness trigger for flat negative pulsesChannel steepness trigger for steep positive pulses Channel steepness trigger for steep negative pulsesChannel window trigger for entering signals Channel window trigger for leaving signalsChannel window trigger for long inner signals Channel window trigger for long outer signalsChannel window trigger for short inner signals Channel window trigger for short outer signalsStandard Mode When using Multiple Recording pretrigger is not availableOption Multiple Recording Recording modesResulting start delays Trigger modesOption Multiple RecordingSpcmemsize SpctriggermodeGeneral information and trigger delay Option Gated SamplingOption Gated Sampling SpcgateEnd of gate alignement Alignement samples per channelNumber of samples on gate signal Allowed trigger modesOption Gated SamplingTrigger modes External TTL edge triggerExample program Example program Option Gated SamplingChannel trigger Spctriggermode TmttlposStartReset mode Option TimestampTimestamp modes LimitsRefClock mode optional Functions for accessing the dataTimestamp Status Reading out timestamp dataSpcGetData nr, ch, start, len, data Data formatSpctimestampcount Example programs Standard acquisition modeAcquisition with Multiple Recording Option Extra I/O Digital I/OsAnalog Outputs Channel directionProgramming example Programming example Option Extra I/OBit Standard Mode Digital Inputs enabled Option Digital inputsSample format SpcreaddigitalSynchronization Option Different synchronization optionsSynchronization with option cascading Synchronization with option starhubSetup order for the different synchronization options Set up the board parametersLet the master calculate it’s clocking Write Data to on-board memory output boards onlyExample for data writing Define the boards for trigger masterExample of board #2 set as trigger master 4a Define synchronization or triggerDefine the board for clock master Example board number 0 is clock masterDefine the remaining boards as clock slaves Arm the boards for synchronizationStart all of the trigger master boards Wait for the end of the measurementRead data from the on-board memory acquisition boards only Restarting the board for another synchronized runExample of Fifo buffer allocation 2a Write first data for output boardsSpcsyncmasterfifo SpcsyncslavefifoAdditions for synchronizing different boards General informationCalculating the clock dividers 20xx 30xx 31xx 40xx 45xx 60xx 61xx 70xx 72xxSetting up the clock divider Board type 3122 312040 MS/s Board type 3025 3131Resulting delays using different boards or speeds Delay in standard non Fifo modesDelay in Fifo mode Additions for equal boards with different sample ratesError Codes Error CodesError name Value hex Value dec Error description AppendixExtra I/O with external connectorOption -XMF Pin assignment of the multipin connectorOption Digital inputs Pin assignment of the multipin cable