TDCBase
|
Control and data acquisition functions for TDC. More...
#include "tdcdecl.h"
Go to the source code of this file.
Macros | |
Size constants | |
#define | TDC_QUTAG_CHANNELS 5 |
Number of hardware input channels. | |
#define | TDC_COINC_CHANNELS 31 |
Number of internal event and coincidence counters. | |
#define | TDC_MAX_CHANNEL_NO 20 |
Maximum channel number (including synchronzed devices) | |
Typedefs | |
typedef Int32 | TDC_FeatureFlags |
A combination of feature Flags. | |
Enumerations | |
enum | TDC_DevType { DEVTYPE_QUTAG, DEVTYPE_NONE } |
Type of the TDC device. More... | |
enum | TDC_FeatureFlag { FEATURE_HBT = 0x0001, FEATURE_LIFETIME = 0x0002, FEATURE_3_CHAN = 0x0004, FEATURE_4_CHAN = 0x0008, FEATURE_5_CHAN = 0x0010, FEATURE_MARKERS = 0x0020, FEATURE_FILTERS = 0x0040, FEATURE_EXTCLK = 0x0080, FEATURE_DEVSYNC = 0x0100, FEATURE_HIRES = 0x0200 } |
Bitmasks for feature inquiry. | |
enum | TDC_FileFormat { FORMAT_ASCII, FORMAT_BINARY, FORMAT_COMPRESSED, FORMAT_RAW, FORMAT_NONE } |
Output file format. More... | |
enum | TDC_SignalCond { SCOND_LVTTL = 1, SCOND_NIM = 2, SCOND_MISC = 3, SCOND_NONE = 4 } |
Type of signal conditioning. More... | |
enum | TDC_FilterType { FILTER_NONE, FILTER_MUTE, FILTER_COINC, FILTER_SYNC, FILTER_INVALID } |
Type of output filter. More... | |
enum | TDC_SimType { SIM_FLAT, SIM_NORMAL, SIM_NONE } |
Type of generated timestamps. More... | |
Functions | |
TDC_API double TDC_CC | TDC_getVersion () |
Get Library Version. More... | |
TDC_API const char *TDC_CC | TDC_perror (int rc) |
Get Error Message. More... | |
TDC_API int TDC_CC | TDC_getTimebase (double *timebase) |
Get Time Base. More... | |
TDC_API int TDC_CC | TDC_init (int deviceId) |
Initialize and Start. More... | |
TDC_API int TDC_CC | TDC_deInit () |
Disconnect and uninitialize. More... | |
TDC_API TDC_DevType TDC_CC | TDC_getDevType () |
Get type of connected device. More... | |
TDC_API Bln32 TDC_CC | TDC_checkFeatureHbt () |
Check for HBT feature. More... | |
TDC_API Bln32 TDC_CC | TDC_checkFeatureLifeTime () |
Check for lifetime feature. More... | |
TDC_API TDC_FeatureFlags TDC_CC | TDC_checkFeatures () |
Check for device features. More... | |
TDC_API int TDC_CC | TDC_getClockState (Bln32 *locked, Bln32 *uplink) |
Inquire Clock Sync State. More... | |
TDC_API int TDC_CC | TDC_getChainPosition (Int32 *position, Int32 *length) |
Retrieve Position in Chain. More... | |
TDC_API int TDC_CC | TDC_setChannelLink (Bln32 on) |
Enable channel link. More... | |
TDC_API int TDC_CC | TDC_getChannelLink (Bln32 *on) |
Retrieve channel link. More... | |
TDC_API int TDC_CC | TDC_setFiveChannelMode (Bln32 on) |
Enable five channel mode. More... | |
TDC_API int TDC_CC | TDC_getFiveChannelMode (Bln32 *on) |
Retrieve five channel mode. More... | |
TDC_API int TDC_CC | TDC_preselectSingleStop (Bln32 single) |
Preselect histogram mode. More... | |
TDC_API int TDC_CC | TDC_getSingleStopPreselection (Bln32 *single) |
Preselection mode. More... | |
TDC_API int TDC_CC | TDC_startCalibration () |
Internal Calibration. More... | |
TDC_API int TDC_CC | TDC_getCalibrationState (Bln32 *active) |
Inquire Calibration State. More... | |
TDC_API int TDC_CC | TDC_enableChannels (Int32 channelMask) |
Enable TDC Channels. More... | |
TDC_API int TDC_CC | TDC_getChannelsEnabled (Int32 *channelMask) |
Retrieve active channels. More... | |
TDC_API int TDC_CC | TDC_enableMarkers (Int32 markerMask) |
Enable Markers. More... | |
TDC_API int TDC_CC | TDC_getMarkersEnabled (Int32 *markerMask) |
Retrieve active markers. More... | |
TDC_API int TDC_CC | TDC_configureSignalConditioning (Int32 channel, TDC_SignalCond conditioning, Bln32 edge, double threshold) |
Configure Signal Conditioning. More... | |
TDC_API int TDC_CC | TDC_getSignalConditioning (Int32 channel, Bln32 *edge, double *threshold) |
Read back Signal Conditioning Parameters. More... | |
TDC_API int TDC_CC | TDC_configureSyncDivider (Int32 divider, Bln32 reconstruct) |
Configure Signal Conditioning Input Divider. More... | |
TDC_API int TDC_CC | TDC_getSyncDivider (Int32 *divider, Bln32 *reconstruct) |
Read back Signal Conditioning Input Divider. More... | |
TDC_API int TDC_CC | TDC_setCoincidenceWindow (Int32 coincWin) |
Set Coincidence Window. More... | |
TDC_API int TDC_CC | TDC_configureFilter (Int32 channel, TDC_FilterType type, Int32 chMask) |
Configure Output Filters. More... | |
TDC_API int TDC_CC | TDC_getFilter (Int32 channel, TDC_FilterType *type, Int32 *chMask) |
Read back Output Filters. More... | |
TDC_API int TDC_CC | TDC_setExposureTime (Int32 expTime) |
Set Exposure Time. More... | |
TDC_API int TDC_CC | TDC_getDeviceParams (Int32 *coincWin, Int32 *expTime) |
Read Back Device Parameters. More... | |
TDC_API int TDC_CC | TDC_setChannelDelays (const Int32 *delays) |
Set Channel Delay Times. More... | |
TDC_API int TDC_CC | TDC_getChannelDelays (Int32 *delays) |
Read back Channel Delay Times. More... | |
TDC_API int TDC_CC | TDC_setDeadTime (Int32 channel, Int32 dTime) |
Set Dead Time. More... | |
TDC_API int TDC_CC | TDC_getDeadTime (Int32 channel, Int32 *dTime) |
Read back Dead Time. More... | |
TDC_API int TDC_CC | TDC_configureSelftest (Int32 channelMask, Int32 period, Int32 burstSize, Int32 burstDist) |
Configure Selftest. More... | |
TDC_API int TDC_CC | TDC_getDataLost (Bln32 *lost) |
Check for data loss. More... | |
TDC_API int TDC_CC | TDC_setTimestampBufferSize (Int32 size) |
Set Timestamp Buffer Size. More... | |
TDC_API int TDC_CC | TDC_getTimestampBufferSize (Int32 *size) |
Read back Timestamp Buffer Size. More... | |
TDC_API int TDC_CC | TDC_enableTdcInput (Bln32 enable) |
Enable Physical Input. More... | |
TDC_API int TDC_CC | TDC_freezeBuffers (Bln32 freeze) |
Freeze internal Buffers. More... | |
TDC_API int TDC_CC | TDC_getCoincCounters (Int32 *data, Int32 *updates) |
Retrieve Coincidence Counters. More... | |
TDC_API int TDC_CC | TDC_getLastTimestamps (Bln32 reset, Int64 *timestamps, Uint8 *channels, Int32 *valid) |
Retrieve Last Timestamp Values. More... | |
TDC_API int TDC_CC | TDC_writeTimestamps (const char *filename, TDC_FileFormat format) |
Write Timestamp Values to File. More... | |
TDC_API int TDC_CC | TDC_inputTimestamps (const Int64 *timestamps, const Uint8 *channels, Int32 count) |
Input Synthetic Timestamps. More... | |
TDC_API int TDC_CC | TDC_readTimestamps (const char *filename, TDC_FileFormat format) |
Read Timestamps. More... | |
TDC_API int TDC_CC | TDC_generateTimestamps (TDC_SimType type, double *par, Int32 count) |
Generate Timestamps. More... | |
Control and data acquisition functions for TDC.
The header defines functions that allow to control the TDC time-to-digital converter and acquire data from it. The received timestamp data can be retrieved programatically or stored in a file. They are also processed to a set of histograms internally.
Use TDC_init to start and connect to the device and TDC_deInit to close the connection. Set device parameters with TDC_setExposureTime etc. and enable Measurement with TDC_enableChannels. Customize the timestamp buffer with TDC_setTimestampBufferSize and retrieve timestamps with TDC_getLastTimestamps or TDC_writeTimestamps.
TDC_inputTimestamps, TDC_readTimestamps, and TDC_generateTimestamps allow to work with generated or saved timestamps. Interference with real data from the device should be avoided (see TDC_enableTdcInput).
If no device is connected, the library falls into a demo mode where all parameter setting and getting calls return without error.
Definition in file tdcbase.h.
enum TDC_DevType |
enum TDC_FileFormat |
enum TDC_FilterType |
enum TDC_SignalCond |
enum TDC_SimType |
Type of generated timestamps.
Check for HBT feature.
Checks if the HBT feature is available for the connected device. This feature is necessary to use the functions of tdchbt.h .
Check for lifetime feature.
Checks if the Lifetime feature is available for the connected device. This feature is necessary to use the functions of tdclifetm.h .
TDC_API TDC_FeatureFlags TDC_CC TDC_checkFeatures | ( | ) |
Check for device features.
Retreives all available device features.
TDC_API int TDC_CC TDC_configureFilter | ( | Int32 | channel, |
TDC_FilterType | type, | ||
Int32 | chMask | ||
) |
Configure Output Filters.
Configures filters for the output (and data transfer) of time tags. Filtered events are registered by the device and processed for coincidence detection, but not transferred to the PC.
channel | Number of the input channel to configure. Channel 0 can't be filtered (but channel 5, if available). |
type | Type of the filter. By default, no filter is active. |
chMask | Bitfield to select channels for "Coinc" and "Sync" filters. (e.g. 6 means correlate with channels 1 and 2). Channel 0 (start) can't be used here (but channel 5, if available). |
TDC_API int TDC_CC TDC_configureSelftest | ( | Int32 | channelMask, |
Int32 | period, | ||
Int32 | burstSize, | ||
Int32 | burstDist | ||
) |
Configure Selftest.
The function enables the generation of test signals in the device.
channelMask | Bitfield that selects the channels to be fired internally (e.g. 5 means signal generation on channels 1 and 3) |
period | Period of all test singals in units of 5ns, Range = 2 ... 60 |
burstSize | Number of periods in a burst, Range = 1 ... 65535 |
burstDist | Distance between bursts in units of 20ns, Range = 0 ... 10000 |
TDC_API int TDC_CC TDC_configureSignalConditioning | ( | Int32 | channel, |
TDC_SignalCond | conditioning, | ||
Bln32 | edge, | ||
double | threshold | ||
) |
Configure Signal Conditioning.
Configures a channel's signal conditioning. Primarily, a conditioning type is selected. Depending on the type, the detailed settings may be relevant or ignored by the function, see TDC_SignalCond. For full access to the details use SCOND_MISC as type.
channel | Number of the input channel to configure. |
conditioning | Type of signal conditioning. By default it is SCOND_MISC |
edge | Selects the signal edge that is processed as an event: rising (1, default) or falling (0) |
threshold | Voltage threshold that is used to identify events, in V. Allowed range: -2 ... 3V; default value: 1V; internal resolution: 1.47mV |
Configure Signal Conditioning Input Divider.
Configures the input divider of channel 0.
divider | Number of events to skip before one is passed + 1. Only the following values are allowed: 1, 2, 4, 8 |
reconstruct | Reconstruct the skipped events in software. |
Disconnect and uninitialize.
Disconnects a connected device and stops the internal event loop.
Enable TDC Channels.
Selects the channels that contribute to the timestamp output stream. Bit 0 Enables the start input that doesn't trigger timestamps but may affect timestamps from other channels. In five channel mode, bit 0 has no effect. see TDC_setFiveChannelMode.
channelMask | Bitfield with activation flags for every TDC channel. (e.g. 5 means activate channels 0 and 2) |
Enable Markers.
The markers are low resolution timestamps triggered over the GPIO port. Markers 0-3 are triggerd by the rising edges of the signals, markers 5-9 by the falling edges. Marker 4 is a 1ms timer tick. If enabled, the Markers are included in timestamp protocol files with channel numbers 100-104 and 200-203. By default, all markers are deactivated. The function allows to enable or disable the single marker channels.
markerMask | Bitfield with activation flags for every marker channel. (e.g. 5 means activate markers 0 and 2) |
Enable Physical Input.
Enables input from the physical channels of the TDC device or the internal selftest. If disabled, the software ignores those "real" events, the device and its coincidence counters are not affected. By default the input is enabled.
When working with software input (TDC_readTimestamps, TDC_generateTimestamps, ...) this function can be used to avoid real and simulated input to be mixed up.
enable | Enable (1) or disable (0) TDC input |
Freeze internal Buffers.
The function can be used to freeze the internal buffers, allowing to retrieve multiple histograms with the same integration time. When frozen, no more events are added to the built-in histograms and timestamp buffer. The coincidence counters are not affected. Initially, the buffers are not frozen. All types of histograms calculated by software are affected.
freeze | freeze (1) or activate (0) the buffers |
TDC_API int TDC_CC TDC_generateTimestamps | ( | TDC_SimType | type, |
double * | par, | ||
Int32 | count | ||
) |
Generate Timestamps.
The function generates synthetic timestamps for demonstration and simulation purposes. Timesamps are processed just like "raw" data from a real device.
The channel mask (see TDC_enableChannels) is considered. At least one channel has to be enabled!
type | Type of time diff distribution |
par | Type specific parameter set. Parameters should be chosen so that most time diffs are positive. Negative diffs are dropped. |
count | Number of timestamps to generate |
Inquire Calibration State.
Returns if the internal calibration is active, see TDC_startCalibration.
active | output: if the calibration procedure is currently running |
Retrieve Position in Chain.
quTAG devices can be coupled in a chain to allow syncronized time tagging. The function returns the length of the chain and the position of the current device in it.
position | Output: position of the current device in the chain, 0 for isolated devices |
length | Output: length the chain, 1 for isolated devices |
Read back Channel Delay Times.
Reads back the delay times as set with TDC_setChannelDelays.
delays | Ouput: channel delays, in TDC units. The array must have at least 8 elements. |
Retrieve channel link.
Returns if the channel link is enabled; see TDC_setChannelLink.
on | Output: channel link enabled (true) or disabled (false). |
Retrieve active channels.
Returns the channel mask as set with TDC_enableChannels.
channelMask | Output: Bitfield with activation flags. |
Inquire Clock Sync State.
Returns the current state of clock synchronisation.
locked | output: if the device's clock is locked to an external source (a downlink or an external clock input) |
uplink | output: if a clock uplink to another device has been established |
Retrieve Coincidence Counters.
Retrieves the most recent values of the built-in coincidence counters. The coincidence counters are not accumulated, i.e. the counter values for the last exposure (see TDC_setExposureTime ) are returned.
The array contains count rates for all 5 channels, and rates for coincidences of events detected on different channels. Events are coincident if they happen within the coincidence window (see TDC_setCoincidenceWindow ).
data | Output: Counter Values. The array must have at least 31 elements. The Counters come in the following order: 0(5), 1, 2, 3, 4, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/2/3, 1/2/4, 1/3/4, 2/3/4, 1/2/5, 1/3/5, 2/3/5, 1/4/5, 2/4/5, 3/4/5, 1/2/3/4, 1/2/3/5, 1/2/4/5, 1/3/4/5, 2/3/4/5, 1/2/3/4/5 |
updates | Output: Number of data updates by the device since the last call. Pointer may be NULL. |
Check for data loss.
Timestamps of events detected by the device can get lost if their rate is too high for the USB interface or if the PC is unable to receive the data in time. The TDC recognizes this situation and signals it to the PC (with high priority).
The function checks if a data loss situation is currently detected or if it has been latched since the last call. If you are only interested in the current situation, call the function twice; the first call will delete the latch.
lost | Output: Current and latched data loss state. |
Read back Dead Time.
Reads back the dead time as set with TDC_setDeadTime.
channel | Input channel to read out |
dTime | Ouput: dead time of the specified channel, in ps |
Read Back Device Parameters.
Reads the device parameters back from the device. All Parameters are output parameters but may be NULL-Pointers if the result is not required.
coincWin | Output: Coincidence window, see TDC_setCoincidenceWindow |
expTime | Output: Exposure time, see TDC_setExposureTime |
TDC_API TDC_DevType TDC_CC TDC_getDevType | ( | ) |
Get type of connected device.
Returns the type of the device connected. Requires initialisation.
TDC_API int TDC_CC TDC_getFilter | ( | Int32 | channel, |
TDC_FilterType * | type, | ||
Int32 * | chMask | ||
) |
Read back Output Filters.
Reads back the output filtering parameters.
channel | Number of the input channel to read out. |
type | Type of the filter. |
chMask | Bitfield to select channels for "Coinc" and "Sync" filters. |
Retrieve five channel mode.
Returns if the five channel mode is active, see TDC_setFiveChannelMode.
on | Output: Five channel mode (true) or four channel mode (false). |
TDC_API int TDC_CC TDC_getLastTimestamps | ( | Bln32 | reset, |
Int64 * | timestamps, | ||
Uint8 * | channels, | ||
Int32 * | valid | ||
) |
Retrieve Last Timestamp Values.
Retrieves the timestamp values of the last n detected events on all TDC channels. The buffer size must have been set with TDC_setTimestampBufferSize , otherwise 0 data will be returned.
reset | If the data should be cleared after retrieving. |
timestamps | Output: Timestamps of the last events in base units, see TDC_getTimebase . The array must have at least size elements, see TDC_setTimestampBufferSize . A NULL pointer is allowed to ignore the data. |
channels | Output: Numbers of the channels where the events have been detected. Every array element belongs to the timestamp with the same index. Range is 0...7 for channels 1...8. The array must have at least size elements, see TDC_setTimestampBufferSize . A NULL pointer is allowed to ignore the data. |
valid | Output: Number of valid entries in the above arrays. May be less than the buffer size if the buffer has been cleared. |
Retrieve active markers.
Returns the marker mask as set with TDC_enableMarkers.
markerMask | Output: Bitfield with activation flags. |
Read back Signal Conditioning Parameters.
Reads back the signal conditioning parameters. These are the parameters that are actually in effect, they may differ from those set by TDC_configureSignalConditioning in two cases:
channel | Number of the input channel to read out. |
edge | The signal edge that is processed as an event: rising (1) or falling (0) |
threshold | Voltage threshold that is used to identify events, in V. |
Preselection mode.
Retrieves the histogram preselection mode as controlled by TDC_preselectSingleStop.
single | Output: start stop (true) or start multistop (false) mode |
Read back Signal Conditioning Input Divider.
Reads back the input divider configuration of channel 0, see TDC_configureSyncDivider.
divider | Output: Number of events to skip before one is passed + 1. |
reconstruct | Output: Reconstruct the skipped events in software. |
Get Time Base.
Returns the time base (the resolution) of the TDC device. It is used as time unit by many other functions.
timebase | Output: Time base in seconds |
Read back Timestamp Buffer Size.
Reads back the buffer size as set by TDC_setTimestampBufferSize.
size | Output: Buffer size; |
Get Library Version.
Returns the version number of the library. The integer part of the number denotes main releases, the fractional part Bugfixes without API change.
Initialize and Start.
The function disconnects from any connected devices, initializes internal data and starts an event loop for data acquisition. It discovers devices connected to the computer, and connects to the first device that matches the given device ID. (The device ID is an identification number programmed by the user.)
The function should be called before any other TDC functions, except TDC_getVersion and TDC_getTimebase. Alternatively TDC_discover and TDC_connect can be used to handle multiple devices from one program.
If no device is found, the function returns TDC_NotConnected. If that error code is ignored, the library falls into a demo mode where all parameter setting and getting calls return without error.
deviceId | Identification number of the device to connect. The special value -1 matches all devices. |
TDC_API int TDC_CC TDC_inputTimestamps | ( | const Int64 * | timestamps, |
const Uint8 * | channels, | ||
Int32 | count | ||
) |
Input Synthetic Timestamps.
The function allows to input synthetic timestamps for demonstration and simulation purposes. Timesamps are processed just like "raw" data from a real device. is connected; otherwise it will return an error.
timestamps | Input: Array of timestamps to process. The timestamps should be in strictly increasing order, otherwise some functions will fail. |
channels | Input: Array of corresponding channel numbers. |
count | Number of valid elements in both arrays. |
Get Error Message.
Returns the error message corresponding to the given return code.
rc | A TDC return code |
Preselect histogram mode.
In four channel mode (with start input active) start events are not transferred to the PC. It therefore can't decide if a stop event is the first or a subsequent one following the start. This setting allows to produce valid start stop histograms even in four channel mode by filtering subsequent stops already in the device. Note that start multistop histograms (HBT and Lifetime features) will also be affected.
single | preselect start stop (true) or start multistop histograms (false, default) |
TDC_API int TDC_CC TDC_readTimestamps | ( | const char * | filename, |
TDC_FileFormat | format | ||
) |
Read Timestamps.
The function allows to read timestamps from file for demonstration or delayed processing. It works only with files in a binary format (see TDC_FileFormat). It can read files with or without the 40 bytes header. When the header is present in demo mode (i.e. without a device connected), the HBT and Lifetime options from the source device come into effect.
In the compressed format, the reconstruction of the original timestamps can't be guaranteed. Detector delays (see TDC_setChannelDelays) are not compensated in this function because this is already done in TDC_writeTimestamps.
filename | Name of the binary input file |
format | Input format. Only binary formats are valid. If the file has a valid header, the parameter is not used; the format is retrieved from the file itself. |
Set Channel Delay Times.
Different signal runtimes cause relative delay times of the signals at different channels. The function allows to configure a delay per channel that will be compensated including the changed sorting of events. If not set, all delays are 0. The compensation is carried out in hardware.
delays | Input: channel delays [ps], Range=-100ns ... 100ns The array must have at least 5 elements. Enter 0 for unused channels. Using a NULL pointer sets all delays to 0. |
Enable channel link.
Allows to link two channels for higher time resolution / jitter reduction. If enabled, channels 2 and 4 are internally linked to 1 and 3; measurement results are averaged. Consequently only the inputs 1 and 3 can be used, 2 and 4 will be disabled. The function requires the HiRes / Jitter upgrade option.
on | Channel link on (true) or off (false). |
Set Coincidence Window.
Sets the coincidence time window for the integrated coincidence counting.
coincWin | Coincidence window in bins, Range = 0 ... 2000000000 see TDC_getTimebase |
Set Dead Time.
Sets a dead time for the specified input channel. After detecting an event, all subsequent events on the same channel are ignored for this time.
channel | Iput Channel to be configured (use 0 for output channel 5) |
dTime | Dead time for the specified channel, in ps. Must be positive. |
Set Exposure Time.
Sets the exposure time (or integration time) of the internal coincidence counters.
expTime | Exposure time in ms, Range = 0 ... 65535 |
Enable five channel mode.
Switches on/off the five channel mode (if available). In the four channel mode (default), the start input of the device (connector 0) is used to reset the internal clock. Those events themselves are not transmitted to the PC. In histograms etc. it is referred as channel 0. In the five channel mode, the start input is used as regular channel 5. The clock is never resetted.
on | Five channel mode (true) or four channel mode (false). |
Set Timestamp Buffer Size.
Sets the size of a ring buffer that stores the timestamps of the last detected events. The buffer's contents can be retrieved with TDC_getLastTimestamps. By default, the buffersize is 0. When the function is called, the buffer is cleared.
size | Buffer size; Range = 1 ... 1000000 |
Internal Calibration.
Starts the internal calibration procedure. The procedure takes some seconds and can't be stopped. During calibration, no time tags output.
TDC_API int TDC_CC TDC_writeTimestamps | ( | const char * | filename, |
TDC_FileFormat | format | ||
) |
Write Timestamp Values to File.
Starts or stops writing the timestamp values to a file continously. The timestamps written are already corrected by the detector delays, see TDC_setChannelDelays.
Timestamps come in base units, see TDC_getTimebase; channel Numbers start with 0 in binary formats, with 1 in ASCII. A channel number of (100 + Marker Number) is associated with marker input events; 104 is a millisecond tick. The follwing file formats are available:
The header of the binary formats is dedicated for use in TDC_readTimestamps; it should be skipped when evaluating with external tools.
Writing in the ASCII format requires much more CPU power and about twice as much disk space than using the binary format. The compressed format again saves half of the disk space, allowing higher event rates with not-so-fast disks. The Timestamps are truncated in this format leading to an overflow every 11 s. It is possible to convert a binary file to ASCII format offline by using this function together with TDC_readTimestamps.
If the specified file exists it will be overwritten. The function checks if the file can be opened; write errors that occur later in the actual writing process (disk full e.g.) will not be reported.
filename | Name of the file to use. To stop writing, call the function with an empty or null filename. |
format | Output format. Meaningless if writing is to be stopped. FORMAT_NONE also stops writing. |