niHSDIO_ConfigurePatternMatchRefTrigger
- Updated2023-02-21
- 2 minute(s) read
ViStatus = niHSDIO_ConfigurePatternMatchRefTrigger ( ViSession vi, ViConstString channelList, ViConstString pattern, ViInt32 triggerWhen, ViInt32 pretrigSamples);
Purpose
Configures the Reference trigger for pattern-match triggering. If the Reference trigger asserts before all the pretrigger samples are acquired, then it is ignored. This function is valid only for acquisition sessions.
Valid Syntax:
Both of the following examples are
valid and do the same thing. The order of channelList
determines the order of the pattern string.
- niHSDIO_ConfigurePatternMatchAdvanceTrigger (vi, "19-0", "0000 0XXX XX11 1111 1111");
- niHSDIO_ConfigurePatternMatchAdvanceTrigger (vi, "0-19", "1111 1111 11XX XXX0 0000");
![]() |
Note The logic levels seen by pattern matching are affected by data interpretation. |
Related topics:
Parameters
| Input | ||
| Name | Type | Description |
| vi | ViSession | Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function. |
| Channel List | ViConstString | This string specifies which channels are configured for pattern matching using the pattern string. The order of channels in the list determines the order of the pattern string. |
| Pattern | ViConstString | This string expression describes the pattern to be matched. This expression is
composed of the following characters:
The first character in the expression corresponds to the first channel in channelList. The number of characters in pattern must correspond to the number of channels specified in channelList. |
| Trigger When | ViInt32 | Specifies when the trigger asserts. Defined Values NIHSDIO_VAL_PATTERN_MATCHES (36)—The trigger asserts when the pattern matches. NIHSDIO_VAL_PATTERN_DOES_NOT_MATCH (37)—The trigger asserts when the pattern does not match. |
| Pretrigger Samples | ViInt32 | Specifies the number of necessary pretrigger samples before the Reference trigger is acknowledged. |
Return Value
| Name | Type | Description | ||||||||
| Status | ViStatus | Reports the status of this operation. To obtain a text description of the status code, call the niHSDIO_error_message function. To obtain additional information concerning the error condition, use the niHSDIO_GetError and niHSDIO_ClearError functions. The general meaning of the status code is as follows:
|
