| Homepage Products News Ordering Download Support Contact |
There are many steps that need to be followed in order to use your DAQNI card. This document explains the procedure. 1. Verify proper installation of your DAQ card. The best way to do this is to bring up the Measurement & Automation Wizard. Click on the Devices and Interfaces folder. Right-click on your device and select Properties. A window should appear like the following:
Left-click on the Test Resources button. If the device is working properly, a dialog box will appear like this one:
If there are resource conflicts, fix them before proceeding. Finally, left-click on the Run Test Panels button. This verifies that your card can enter and output data. An example of the window is:
Once everything has been checked and verified, the card is now ready to use with HTBasic. 2. In order to use the DAQ card with HTBasic, the device number from the NI software is needed. Start up the Measurement & Automation Wizard and Select Devices and Interfaces. The device number can be found in parenthesis next to the name of the device. Here is an example:
An example of Digital Input/Output will be given to give a better feel of how to use the file. EXAMPLE To use the DAQ card for Digital Input/Output, it is necessary to use register 1803. This example will best be understood if you follow along in the daqni.rtf file. Go to the section with the heading 1803—Digital Input/Output. As you can see, there are sub-register numbers underneath the main heading. Each register allows you to control a different aspect of your input/output. All of these registers are used with the CONTROL command.
This statement can be understood as follows: 1803 signifies it is a Digital Input/Output register, 0 indicates it is sub-register 0, and the 1 after the semicolon means that all the Digital Input/Output registers are reset. Every CONTROL statement is similar to the one above. The first 4 numbers are the register, the comma followed by a number is the sub-register, and the semicolon followed by a number is the value sent to that register. Here is an example of a program that outputs digital data.All programs will follow this same format. You setup your card with CONTROL statements and then do simple ENTER and OUTPUT calls. All the information you need on each register is found in the daqni.rtf file. Some subregisters refer to NI function calls. These functions can be found either in this document or in the NI-DAQ Function Reference Manual which should have come with your card. Format
Purpose Configures a specific line on a port for direction (input or output). Parameters Input
Parameter Discussion port is the digital I/O port number. Range: 0 for
the E Series devices. line is the digital line for which to configure. Range: 0 through 7. dir indicates the direction, input or output, to which the line is to be configured. 0:
Line is configured as an input line (default). Using This Function With this function, a PC-TIO-10, DIO 6533, VXI-AO-48XDC, E Series, or DSA port can have any combination of input and output lines. Use DIG_Prt_Config to set all lines on the port to be either all input or all output lines. Format
Purpose Configures the specified port for direction (input or output). DIG_Prt_Config also sets the handshake mode for the DIO-24, 6025E devices, AT-MIO-16DE-10, DIO-96, and Lab and 1200 Series devices. Parameters Input
Parameter Discussionport is the digital I/O port number. Range: 0 or 1 for the
AT-AO-6/10, DAQCard-500/700, PC-TIO-10, PC-OPDIO-16, 516
devices, AO-2DC, and LPM devices. mode indicates the handshake mode that the port uses. 0: Port is configured
for no-handshaking (nonlatched) mode. You must use mode
= 0 for all other ports and boards. You can use the DIO-32F and DIO
6533 (DIO-32HS) for handshaking, but only through the group calls (see
DIG_Grp_Config). 1: Port is configured for handshaking (latched) mode. mode = 1 is valid only for ports 0 and 1 of the DIO-24 and Lab and 1200 Series devices; for ports 2 and 3 of the 6025E devices and AT-MIO-16DE-10; and for ports 0, 1, 3, 4, 6, 7, 9, and 10 of the DIO-96. dir indicates the direction, input or output, to which the port is to be configured. Range: 0 through 3. Note mode must be set to handshaking in order to use bidirectional. The following ports can be configured as bidirectional:
Note: The only ports that can be configured as wired-OR output ports are DIO 6533 ports 0 through 3. Using This Function DIG_Prt_Config configures the specified port according to the specified direction and handshake mode. Any configurations not supported by or invalid for the specified port return an error, and NI-DAQ does not change the port configuration. Information about the valid configuration of any digital I/O port is in the DAQ Hardware Overview Guide, and Chapter 3, Software Overview, of the NI-DAQ User Manual for PC Compatibles. For the DIO-24, DIO-32F, DIO 6533, DIO-96, and Lab and 1200 Series devices, DIG_Prt_Config returns an error if the specified port has been assigned to a group by a previous call to DIG_Grp_Config or DIG_SCAN_Setup. DIG_Prt_Config also returns an error for the DIO-32F and DIO 6533 if the specified port is port 4. After system startup, the digital I/O ports on all the boards supported by this function are configured as follows:
Also, ports on the DIO-24, DIO-32F, DIO 6533, DIO-96, and Lab and 1200 Series devices are not assigned to any group. If this is not the digital I/O configuration you want, you must call DIG_Prt_Config to change the port configuration. You must call DIG_Grp_Config instead to use handshaking modes on the DIO-32F and DIO 6533. Note: 6025E devices, AT-MIO-16DE-10, Lab and 1200 Series, PC-AO-2DC, PC-DIO-24/PnP, and DIO-96 users—Because of the design of the Intel 8255 chip, calling this function on one port will reset the output states of lines on other ports on the same 8255 chip. The other ports will remain in the same configuration; input ports are not affected. Therefore, you should configure all ports before outputting data. Note: If you have connected one or more AMUX-64T boards or an SCXI chassis module to your MIO or AI device, DIG_Prt_Config returns a badPortError if called with port equal to 0. Format
Purpose Configures the hardware analog trigger. The hardware analog triggering circuitry produces a digital trigger that you can use for any of the signals available through the Select_Signal function by selecting source = ND_PFI_0). Parameters Input
Parameter Discussion Legal ranges for the onOrOff, mode, and trigSource parameters are given in terms of constants that are defined in a header file. The header file you should use depends on which of the following languages you are using:
lowValue and highValue specify the levels you want to use for triggering. For E Series devices, the legal range for the two values is 0 to 255 (0–4,095 for 16-bit boards). In addition, lowValue must be less than highValue. The voltage levels corresponding to lowValue and highValue are as follows:
See the end of this section for an example calculation for lowValue. For DSA devices, the legal range for lowValue and highValue is –65,536 to +65,535. These values correspond to the lower limit of the voltage range to the higher limit of the voltage range for the current configuration of the trigger channel. For example, when the channel is configured for 0 dB of gain, –65,536 corresponds to –10 V and +65, 535 corresponds to +10 V. mode tells NI-DAQ how you want analog triggers to be converted into digital triggers that the onboard hardware can use for timing. Note: The PCI-6110E and PCI-6111E can use any of the analog input channels for the trigSource. For these devices set trigSource to the channel number you want, instead of the constant ND_THE_AI_CHANNEL. Note: This also applies to the PCI-445X and PCI-455X devices. The following paragraphs show all of the available modes and illustrations of corresponding trigger generation scenarios. Values specified by highValue and lowValue are represented using dashed lines, and the signal used for triggering is represented using a solid line.
Use the trigSource parameter to specify the source of the trigger you want to use. For E Series devices, the legal values are ND_PFI_0 and ND_THE_AI_CHANNEL. Set trigSource to ND_PFI_0 if you want the trigger to come from the PFI0/TRIG1 pin. You need to connect the analog signal you want to use for triggering to the PFI0/TRIG1 pin. To generate triggers based on an analog signal that takes a wide range of values between –10 V and +10 V, you should use this setting. You should select ND_THE_AI_CHANNEL for trigSource only to generate triggers based on a low-range analog signal, if you are concerned about signal quality and are using a shielded cable, or if you want the trigger to be based on an analog input channel in the differential mode. Using this selection is non-trivial. If you set trigSource to ND_THE_AI_CHANNEL, you can use the signal connected to one of the analog input pins for triggering. In this case, the signal is amplified on the device before it is used for trigger generation. You can use this source selection under the following conditions:
Note: The PCI-6110E and PCI-6111E can use any analog input channel.
The reason for using these constraints is that if you are scanning among several analog input channels, signals from those channels are multiplexed in time, and the analog triggering circuitry is unable to distinguish between signals from individual channels in this case. For DSA devices only, any of the analog input channels can be the source of the analog trigger, even channels that are not part of the channel list set in DAQ_Start or SCAN_Setup. Set trigSource to the channel number of the channel to monitor for the analog trigger. Using This Function When you use this function, you activate the onboard analog triggering hardware. This onboard hardware generates a digital trigger that the DAQ-STC then uses for timing and control. To use the analog trigger, you need to use this function and the Select_Signal function. To use analog triggering, use as much hysteresis as your application allows because the circuitry used for this purpose is very noise-sensitive. When you use Select_Signal for E series devices, set source to ND_PFI_0 for your signal and sourceSpec as appropriate. Notice that the two polarity selections give you timing control in addition to the five triggering modes listed here. For DSA devices, when you use Select_Signal, set source to ND_ATC_OUT for your signal and sourceSpec to ND_DONT_CARE. NI-DAQ, which will route the analog trigger circuit output as appropriate for the device. For example, if you set source to ND_THE_AI_CHANNEL, the channel you are interested in is in bipolar mode, you want a gain of 100, and you want to set the voltage window for triggering to +35 mV and +45 mV for your original signal (that is, signal before amplification by the onboard amplifier), you should make the following programming sequence: 12-bit boards:
16-bit boards:
To calculate lowValue in the previous example, do the following:
Use the following formula to map the 3.5 V from the –10 V to +10 V scale to a value on the 0 to 4,095 scale:
In general, the scaling formulas are as follows:
If you apply any of the formulas and get a value equal to 256, use the value 255 instead; if you get 4,096 with the 16-bit boards, use 4,095 instead. You can use the following programming sequence to set up an acquisition to be triggered using the hardware analog trigger, where the trigger source is the PFI0/TRIG1 pin:
Format
Purpose Establishes a timeout limit that is used by the synchronous functions to ensure that these functions eventually return control to your application. Examples of synchronous functions are DAQ_Op, DAQ_DB_Transfer and WFM_from_Disk. Parameters Input
Parameter Discussion timeout is the number of timer ticks. The duration of a tick is 55 ms (0.055 s), and there are approximately 18 ticks/s.
Using This Function The synchronous functions do not return control to your application until they have accomplished their task. If you have indicated a large amount of data and/or a slow acquisition or generation rate, you might want to terminate the function prematurely, short of restarting your computer. By calling Timeout_Config before calling the synchronous function, you can set an upper bound on the amount of time the synchronous function takes before returning. If the synchronous function returns the error code timeOutError, you know that the number of ticks indicated in the timeout parameter have elapsed and the synchronous function has returned because of the timeout. The following is a list of the synchronous functions:
Format
Purpose Configures the specified group for port assignment, direction (input or output), and size. ParametersInput
Parameter Discussion group is the group to be configured. Range: 1 or 2 for the DIO 6533 devices and the AT-DIO-32F. groupSize indicates the size of the group. The following values are permitted for groupSize:
Note: For the DIO-32F, you must use port = 0 or 1 if group = 1, and port = 2 or 3 if group = 2. Note: For the DIO-32F, block operations are not allowed for groups of size = 1. For the DIO 6533 (DIO-32HS), you can use block operations for groups of size = 1 if you set group = 1 and port = 0, or group = 2 and port = 2. port indicates the digital I/O port or ports assigned to the group. The assignments made depend on the values of port and of groupSize: groupSize = 1
groupSize = 2
groupSize = 4
dir indicates the direction, input, or output for which the group is to be configured.
Using This Function DIG_Grp_Config configures the specified group according to the port assignment and direction. If groupSize = 0, NI-DAQ releases any ports assigned to the group specified by group and clears the group handshake circuitry. If groupSize = 1, 2, or 4, NI-DAQ assigns the specified ports to the group and configures the ports for the specified direction. NI-DAQ subsequently writes to or reads from ports assigned to a group using the DIG_In_Grp and DIG_Out_Grp or the DIG_Block_In and DIG_Block_Out functions. NI-DAQ can no longer access any ports assigned to a group through any of the nongroup calls listed previously. Only the DIG_Block calls can use a group of size 4. If you are using an AT-DIO-32F and intend to perform block I/O, you are limited to group sizes of 2 and 4. If you are using a DIO 6533 (DIO-32HS) and intend to perform block I/O, you also can use a group size of 1. After system startup, no ports are assigned to groups. See your hardware user manual for information about group handshake timing. Format
Purpose Configures the specified group for port assignment, direction (input or output), and size. Parameters Input
Parameter Discussion group is the group to be configured. Range: 1 or 2 for most
devices. groupSize selects the number of 8-bit ports in the group. Range: 0 through
2 for most devices. Note: Zero is to unassign any ports previously assigned to group. portList is the list of ports in group. The order of the ports in the list determines how NI-DAQ interleaves data in your buffer when you call DIG_Block_In or DIG_Block_Out. The last port in the list determines the port whose handshaking signal lines NI-DAQ uses to communicate with the external device and to generate hardware interrupt. Range: 0 or 1 for most
devices. dir selects the direction, input or output, to which the group is to be configured.
The following ports can be configured as bidirectional:
Using This Function DIG_SCAN_Setup configures the specified group according to the specified port assignment and direction. If groupSize is 0, NI-DAQ releases any ports previously assigned to group. Any configurations not supported by or invalid for the specified group return an error, and NI-DAQ does not change the group configuration. NI-DAQ subsequently writes to or reads from ports assigned to a group as a group using DIG_Block_In and DIG_Block_Out. NI-DAQ can no longer access any ports assigned to a group through any of the non-group calls listed previously. Because each port on the DIO-24, 6025E devices, AT-MIO-16DE-10, and Lab and 1200 Series devices has its own handshaking circuitry, extra wiring might be necessary to make data transfer of a group with more than one port reliable. If the group has only one port, no extra wiring is needed. Each input port has a different Strobe Input (STB*) control signal.
Each input port also has a different Input Buffer Full (IBF) control signal.
Each output port has a different Output Buffer Full (OBF*) control signal.
Each output port also has a different Acknowledge Input (ACK*) control signal.
On the DIO-96 I/O connector, you can find four different sets of PC pins. They are APC, BPC, CPC, and DPC. APC pins correspond to port 0 and port 1, BPC pins correspond to port 3 and port 4, CPC pins correspond to port 6 and port 7, and DPC pins correspond to port 9 and port 10. For example, CPC7 is the OBF control signal for port 6 and CPC1 is the OBF for port 7 if both ports are configured as handshaking output ports. If a group of ports is configured as input, you need to tie all the corresponding STB* together and connect them to the appropriate handshaking signal of the external device. You should connect only the IBF of the last port on portList to the external device. No connection is needed for the IBF of the other port on portList. If a group of ports is configured as output, you should not make any connection on the control signals except those for the last port on portList. You should make the connection with the external device as if only the last port on portList is in the group. No connection is needed for any other port on the list. For DIO-24 users, the correct W1 jumper setting is required to allow DIG_Block_In and DIG_Block_Out to function properly. If port 0 is configured as a handshaking output port, set jumper W1 to PC4; otherwise, set the jumper to PC6. However, if port 0 is configured as bidirectional, set the jumper to PC2. Also, if port 0 is configured as bidirectional on a PC-DIO-24, port 1 will not be available.Format
Purpose Translates an array of floating-point values that represent voltages into an array of binary values that produce those voltages when NI-DAQ writes the binary array to one of the board DACs. This function uses the current analog output configuration settings to perform the conversions. Parameters Input
Output
Parameter Discussion chan indicates to which analog output channel the binary array is to be assigned. Range: 0 or
1 for most devices. count is the number of points in your buffer. Range: 1 through 32. gain is a multiplier applied to the array as NI-DAQ performs the translation. If the result of multiplying each element in the array by the value of gain produces a voltage that is out of range, NI-DAQ sets the voltage to the maximum or minimum value and returns an error. NI-DAQ still completes the translation, however. Range: Any real number that produces a voltage within the analog output range. voltArray is the input array of double-precision values that represents the voltages NI-DAQ is to produce at one of the outputs. Range: Any real number that produces a voltage within the analog output range. binArray is the array of binary values converted from the voltages contained in voltArray. The values in binArray produce the original voltages when NI-DAQ writes them to a DAC on your device. Refer to Appendix B, Analog Input Channel, Gain Settings, and Voltage Calculation, for the calculation of binary value. Using This Function WFM_Scale calculates each binary value using the following formulas:
The DSA devices use 32-bit data buffers. If you are using C or Delphi, you need to typecast your i32 array to i16 when you call WFM_Scale. If you are using Visual Basic, you should use the nidaqr32.bas file (instead of nidaq32.bas) to relax type checking on binArray. Each 18-bit binVal is shifted into the upper 18 bits of the array element. Format
Purpose Assigns a waveform buffer to one or more analog output channels, selects the rate and the number of times the data in the buffer is to be generated, and starts the generation. If the number of buffer generations is finite, WFM_Op waits for completion before returning, unless you call Timeout_Config. Parameters Input
Parameter Discussion numChans indicates the number of analog output channels specified in the array chanVect. chanVect is the array of channel numbers indicating which analog output channels are to receive output data from the buffer. Channel number range:
buffer is an array of integer values that DACs convert to voltages. If your device has 12-bit DACs, data ranges from 0 to 4,095 in unipolar mode and from –2,048 to 2,047 in bipolar from –32,768 to +32,767 in bipolar mode. The DSA devices have 18-bit DACs and operate in bipolar mode only. Data ranges from –131,072 to +131,071. For DSA devices each buffer element is 32 bits wide. Each data point goes in the upper 18 bits of its buffer element. You should set the lower bits to zero. count is the number of points in your buffer. When NI-DAQ is using interleaved waveform generation, count should be a multiple of numChans and not less than 2 * numChans. Range: 1 through 2 32
– 1 (except E Series devices). On PCI-61XX and 671X devices, the buffer must contain an even number of samples because of the 32-bit FIFO. iterations is the number of times the waveform generation steps through buffer. A value of 0 means that waveform generation proceeds indefinitely. Range: 0 through 2 32 – 1. rate is the rate of waveform generation you want in points per second (pts/s). A value of 0.0 for rate means that external update pulses (applied to EXTUPDATE for the AT-AO-6/10 and Lab and 1200 Series analog output devices, and to PFI Pin 5 on E Series and 671X devices) will determine the waveform generation rate. Range: 0.0 for external update or approximately 0.0015 to 500,000 pts/s. Your maximum rate depends on your device type and your computer system. If the number of points that represents represent one cycle of the waveform equals count, the frequency of the generated waveform is related to the rate by this the following formula: frequency = (rate/count) cycles per second Using This FunctionWFM_Op initiates a waveform generation operation. NI-DAQ writes the data in the buffer to the specified analog output channels at a rate as close to the rate you want as the specified rate hardware permits (see WFM_Rate for a further explanation). With the exception of indefinite waveform generation, WFM_Op waits until NI-DAQ completes the waveform generation is complete before returning (that is, it is synchronous). If you have changed the analog output configuration from the defaults by changing the jumpers on the device, you must call AO_Configure to set the software copies of the settings prior to calling WFM_Op. NI-DAQ ignores the group settings made by calling WFM_Group_Setup when you call WFM_Op and the settings are not changed after NI-DAQ executes you execute WFM_Op. For Lab and 1200 Series analog output devices, if the rate is smaller than 15.26 pts/s and counter B0 is busy in a data acquisition or counting operation, waveform generation cannot proceed. WFM_OP uses either the default gating mode (none) or the gating mode you specify through the CTR_Config function. You need to connect your trigger signal to the gate pin on the I/O connector. Refer to the CTR_Config function description for details. On E Series and 671X devices, you can externally trigger a waveform generation operation in a variety of ways. Refer to the Select_Signal function for more details. The DSA devices use 32-bit data buffers. If you are using C or Delphi, you need to typecast your i32 array to i16 when you call WFM_Op. If you are using Visual Basic, you should use the nidaqr32.bas file (instead of nidaq32.bas) to relax type checking on buffer. The DSA devices use the upper 18 bits of each buffer element. The lower 14 bits are ignored and you should set them to 0. You can move each data point into the upper 18 bits with a left shift operation by multiplying it by 16,384. Format
Purpose Enables or disables the pattern generation mode of buffered digital I/O. When pattern generation is enabled, this function also determines the source of the request signals and, if these are internal, the signal rate and gating mode. Parameters Input
Parameter Discussion group is the group for which pattern generation is to be enabled or disabled. Range: 1 or 2. config is a flag that enables or disables pattern generation. 0: Disable pattern
generation. reqSource 0: Internal.
The board generates requests internally from onboard counters. When using internally generated requests (reqSource 0 or 2), the REQ signal is an output; do not drive any external signal onto the REQ pin of the I/O connector. NI-DAQ considers all of the group’s lines significant for change detection by default. However, you can set a mask specifying that only certain lines should be compared. The same lines that are significant for pattern detection, if used, are also significant for change detection. If you are using pattern-detection messaging (DAQEvent 7 or 8), use the DAQTrigVal0 parameter of the Config_DAQ_Event_Message function to set the pattern-and-change-detection mask. Otherwise, use the line-mask parameter of the DIG_Trigger_Config function. When using the DIG_Trigger_Config function to set a line mask, you do not need to select any particular start trigger, stop trigger, or search pattern. timebase determines the amount of time that elapses during a single reqInterval. The following values are possible for timebase:
reqInterval is a count of the number of timebase units of time that elapses between internally produced request signals. Range: 2 through 65,535. externalGate is an absolute parameter and should be set to 0. The AT-DIO-32F does support external gating but this simply requires making a connection at the I/O connector. If you use external gating for group 1, the signal connected to IN1 gates the pattern. If you use external gating for group 2, the signal connected to IN2 gates the pattern. For an AT-DIO-32F, the signal at INx must be high to enable the pattern. The DIO 6533 (DIO-32HS) devices use triggering instead of gating; for more information, refer to the DIG_Trigger_Config function. Using This Function DIG_Block_PG_Config enables or disables the pattern generation mode of digital I/O. If the config parameter equals 1 or 2, any subsequent DIG_Block_In or DIG_Block_Out call initiates a pattern generation operation. Pattern generation differs from handshaking I/O in that NI-DAQ produces the request signals at regularly clocked intervals. If reqSource equals 0, the timebase parameter equals 2, and the reqInterval parameter equals 10, NI-DAQ reads a new pattern from or writes a pattern to a group every 100 µs. DIG_Block_PG_Config enables or disables the pattern generation mode of digital I/O. If the config parameter equals 1 or 2, any subsequent DIG_Block_In or DIG_Block_Out call initiates a pattern generation operation. Pattern generation mode overrides any two-way handshaking mode set by the DIG_Grp_Mode function. The primary difference between pattern generation and two-way handshaking is that in pattern generation timing information travels in only one direction, over the REQ line. The board can generate request signals at regularly clocked intervals (internal mode), or you provide request signals to the board (external mode), or the board generates request signals whenever the input data changes (change detection). Either there is no return handshake on the ACK line (DIO 6533), or the return handshake can be ignored (DIO-32F). On the DIO 6533, pattern generation mode enables some additional features:
Only the DIO 6533 boards support change detection. In this mode, the board generates an internal request any time it detects activity on the group's significant input lines. As long as the rate of change is within the board's change-detection limits, the board captures exactly one copy of each new input pattern. If you set a pattern mask for change detection, you can select a subset of the group's input lines to be significant. However, when the board detects a change, it acquires data from all of the group's input lines, whether masked or not. Using change detection mode in conjunction with the Configure_DAQ_Event_Message function, you can also receive a message every time the input data changes. Use the Configure_DAQ_Event_Message function to generate a message after each pattern is acquired. To ensure best precision in messaging, use the interrupt-driven data transfer method. Otherwise, messages might be delayed. You can use the Set_DAQ_Device_Info function to select a transfer method. On the DIO-32F, the advantage of using double-buffered output is that the variability in update intervals is reduced to an absolute minimum, producing the highest quality output at high update rates. The disadvantage is that the first ACK pulse produced by the device is not preceded by the first pattern. Instead, the second ACK pulse signals the generation of the first pattern. Also, the last pattern generated is not followed by an ACK pulse. The advantage of single-buffered output is the elimination of these ACK pulse irregularities. The first ACK pulse signals generation of the first pattern and the last pattern is followed by a final ACK pulse. The disadvantage of single-buffered output is that at high update rates, variations in DMA bus arbitration times can increase the variability in update intervals, reducing the overall quality of the digital patterns. On the DIO 6533 (DIO-32HS), output is always double-buffered, thus minimizing the variability in update intervals. In addition, the ACK pulse irregularities are not present. Therefore, values 1 and 2 for the config parameter are equivalent for the DIO 6533. Format
Purpose Sets up trigger configuration for subsequent buffered digital operations with pattern generation mode only (either internal or external requests). Parameters Input
Parameter Discussion startTrig specifies the source of the start trigger.
startPol specifies the polarity of the start trigger.
stopTrig specifies the source of the stop trigger.
stopPol specifies the polarity of the stop trigger.
ptsAfterStopTrig is the number of data points to acquire following the trigger. This parameter is valid only if stopTrig is not 0. If stopTrig is 2, this number will include the matching pattern. Range: 2 through count, where count is the value of the count parameter in the DIG_Block_* functions. pattern is the digital pattern to be used as a trigger point. This parameter is used only when either startTrig or stopTrig is 2. lineMask selects the individual data lines to be compared when startTrig or stopTrig is 2 or 3 or when you enable change detection, using DIG_Block_PG_Config. This parameter allows you to set all the DONT_CARE bits in the pattern. A 0 means DONT_CARE, but a 1 is significant. Using This Function If startTrig is 0, a digital block operation begins as soon as you call a DIG_Block_* function. If startTrig is 1, a digital block operation does not begin until NI-DAQ receives an external trigger pulse on the group’s ACK (STARTTRIG) pin. If stopTrig is 0, a digital block operation ends as soon as the operation reaches the end of the buffer (unless you enable double buffering with the DIG_DB_Config function). If stopTrig is 1, a digital block operation continues in a cyclical mode until NI-DAQ receives an external trigger pulse on the group’s STOPTRIG pin, at which time NI-DAQ acquires an additional number of data points specified by ptsAfterStopTrig before terminating the operation. The DIG_Block_Check function rearranges the data into chronological order (from oldest to newest). If startTrig or stopTrig is 2 or 3, the board compares incoming data to the specified pattern. The DIO 6533 contains a single pattern-detection circuit per group. Therefore, you cannot set both startTrig and stopTrig to 2 or 3. You also cannot set startTrig or stopTrig to 2 or 3 and also configure a pattern-detection message (DAQEvent = 7 or 8) using Config_DAQ_Event_Message. If startTrig or stopTrig is 2, the operation starts or stops when the incoming data matches the pattern on all bits declared significant by lineMask. If startTrig or stopTrig is 3, the operation starts or stops when the incoming data ceases to match the pattern on all bits declared significant by lineMask. The lineMask also controls which bits are significant for change detection, if used. See DIG_Block_PG_Config for information about change detection. Bits that are significant for one purpose are significant for all purposes. If you configure both change detection and a start or stop trigger, the same lineMask applies to both. If you configure both change detection and a pattern-detection message using Config_DAQ_Event_Message, use DAQTrigVal0 instead of lineMask to control which bits are significant. |
|
© Copyright 1997-2006 Tech Soft GmbH. All rights reserved. HTBasic is a trademark of TransEra Corporation. |