National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference Config_ATrig_Event_Message
©
National Instruments Corporation 2-69 NI-DAQ FRM for PC Compatibles
windowSize is the number of volts below trigLevel for positive slope or above the analog
trigger level for negative slope that the input signal must go before NI-DAQ recognizes a valid
trigger crossing at the analog trigger level.
trigSlope is the slope the input signal should trigger on.
0: Trigger on either positive and negative slope.
1: Trigger on positive slope.
2: Trigger on negative slope.
trigSkipCount is the number of valid triggers NI-DAQ ignores. It can be any value greater
than or equal to zero. For example, if trigSkipCount is 3, you are notified when the fourth
trigger occurs.
preTrigScans is the number of scans of data NI-DAQ collects before looking for the very first
trigger. Setting preTrigScans to 0 causes NI-DAQ to look for the first trigger as soon as the
DAQ process begins.
postTrigScans is the number of scans of data NI-DAQ collects after the trigSkipCount
triggers before notifying you.
handle is the handle to the window you want to receive a Windows message in when
DAQEvent happens.
message is a message you define. When DAQEvent happens, NI-DAQ passes message back
to you. message can be any value.
In Windows, you can set message to a value including any Windows predefined messages
(such as
WM_PAINT
)
. However, to define your own message, you can use any value ranging
from
WM_USER (0x400) to 0x7fff. This range is reserved by Microsoft for messages you
define.
callbackAddr is the address of the user callback function. NI-DAQ calls this function when
DAQEvent occurs. See
Config_DAQ_Event_Message for restrictions on this parameter.
Using This Function
To meet the positive trigger condition, the input signal must first go below (trigLevel –
windowSize) and then go above trigLevel. On the other hand, to meet the negative trigger
condition, the input signal must first go above (trigLevel + windowSize) and then go below
trigLevel. Figure 2-3 shows these conditions.