Tbksettrigpret – Measurement Computing TempBook rev.3.0 User Manual
Page 86

9-26 tbkCommand Reference (Standard API)
TempBook User’s Manual
tbkSetTrigPreT
DLL Function
int tbkSetTrigPreT(uchar trigger, uint channel, uint level, uint precount,
uint postcount);
C
tbkSetTrigPreT(unsigned char source, unsigned int channel, unsigned int
level, unsigned int preCount, unsigned int postCount);
QuickBASIC
BtbkSetTrigPreT% (ByVal source%, ByVal channel%, ByVal level%, ByVal
preCount%, ByVal postCount%)
Visual Basic
VBtbkSetTrigPreT% (source%, channels%, level%, preCount%, postCount%)
Turbo Pascal
tbkSetTrigPreT( source:byte; channel:word; level:word; preCount:word;
postCount:word):integer;
Parameters
uchar trigger
The analog trigger source -
DtsAnalogRisePos, DtsAnalogFallPos, DtsAnalogRisNeg,
DtsAnalogFallNeg
uint channel
The channel in the current scan group to trigger on
uint level
The level for the specified channel at which to detect the trigger (0-4095)
uint precount
The number of pre-trigger scans to collect before arming the trigger (1-32767)
uint postcount
The number of post-trigger scans to collect after the occurrence of the trigger (1-32767)
Returns
TerrInvTrigSource
- Invalid trigger
TerrInvLevel
- Invalid level
TerrNoError
- No error
See Also
tbkSetFreq, tbkSetClk, tbkRdNForePreT, tbkRdNForePreTWait, tbkRdNBackPreT
Program References
PRETEX1, PRETEX2, PRETEX3 (ALL LANGUAGES)
tbkSetTrigPreT
sets the trigger for analog level triggering and initiates the collection of a pre-
trigger data acquisition. The tbkSetTrigPreT command will stop any current acquisition,
empty the TempBook/66 of any data previously acquired, arm the TempBook/66 using the specified
analog level trigger source and will immediately begin the collection of the specified amount of pre-
trigger data.
This command allows the configuration of a data acquisition that includes both pre-trigger and post-
trigger data. The specified pre-trigger amount indicates the number of pre-trigger scans to be
collected before the trigger is armed. The trigger event will only be recognized after the specified
pre-trigger amount has been satisfied and the trigger is armed. This means that the specified pre-
trigger amount represents the minimum amount of pre-trigger data which will actually be collected.
The specified post-trigger amount represents the number of scans taken after the detection of the
trigger event. This amount represents the exact number of scans taken subsequent to the detection of
the trigger event.
The pacer clock may be used to set up the sampling rate for the acquisition. The sampling rate can
best be set by using the tbkSetClk or tbkSetFreq commands.
The four analog trigger sources, rising or falling slope with either a positive or negative level, can be
used with any one of the channels in the currently defined scan group. This channel parameter
represents the relative channel within the scan group. It does not necessarily represent the actual
physical channel number.
When setting up a pre-trigger acquisition, a specific command set must be used to retrieve the data.
This command set includes tbkRdNForePreT, tbkRdNForePreTWait and
tbkRdNBackPreT
. For more information on these commands, refer to the command description
for each specific command in this chapter.