Example 6 - National Instruments PCI E Series Programmer's Manual

Register-level programmer manual, multifunction i/o boards for pci bus computers, register-level
Hide thumbs Also See for PCI E Series:
Table of Contents

Advertisement

Example 6

© National Instruments Corporation
Example 6 performs 20 scans as in Example 2. Additionally, an external
start and stop trigger control the acquisition.
Acquire 20 scans. The scan list contains channels 5, 4, 1, and 0,
respectively, each at a gain of 1 and in RSE mode. The acquisition should
begin on a start trigger applied to PFI0. Set the sample rate to 100 µs.
Connect the stop trigger to PFI1. Acquire 10 scans after the stop trigger,
leaving 10 scans before the stop trigger. Use polled input to read the AI
FIFO data.
1.
Perform Analog Input Example 1 Step 1.
2.
Perform Analog Input Example 1 Step 2 for each channel in the scan
list. Only channel 0 has Last channel set to 1.
3.
Perform Analog Input Example 1 Steps 3 through 8.
4.
Call
AI_Trigger_Signals
Joint_Reset_Register
AI configuration start = 1;
AI_Mode_1_Register
AI trigger once = 1;
AI_Trigger_Select_Register = 0xB161;
Joint_Reset_Register
AI configuration start = 0;
AI configuration end = 1;
5.
Call the function
Joint_Reset_Register
AI configuration start = 1;
AI_Mode_2_Register
AI pretrigger = 1;
AI_SC_Load_B_Registers (24 bits)
Number of pretrigger scans -1 = 9;
AI_Mode_2_Register
AI SC initial load source = 1;
AI SC reload mode = 1;
AI_SC_Load_A_Registers (24 bits)
Number of posttrigger scans -1 = 9;
AI_Command_1_Register
AI SC load = 1;
to set the triggering options.
to load the number of scans.
Number_of_Scans
4-23
Chapter 4
Programming
PCI E Series RLPM

Advertisement

Table of Contents
loading

Table of Contents