Example 3 - 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 3

© National Instruments Corporation
if (buffer is not done and buffer is not full) then
{
current buffer value =save_1;
increase buffer pointer;
}
if (all the points have been written into the buffer) then
{
G0_Command_Register
G0_Disarm=1;
indicate buffer done;
}
Interrupt_A_Ack_Register
G0_Gate_Interrupt_Ack <=1;
/*read G_Status_Register and check for the G0_Gate_Error_St bit if
the bit is set means the hardware saves are too fast */
if (G0_Gate_Error_St==1)
{
Interrupt_A_Ack_Register
G0_Gate_Error_Confirm <=1;
}
if (G0_TC_St==1){
/*rollover error - counter value is not correct */
confirm user rollover has occurred.
Interrupt_A_Ack_Register
G0_TC_Interrupt_Ack<=1;
}
5.
Call
in a do-while loop.
ISR
do
{
call Buffered_Pulse_Width_Measurement_ISR();
} while (the buffer is not done);
print out the buffer values.
This is the example for continuous pulse train generation.
It generates continuous pulses on the
from the trigger, pulse interval of four clocks, and pulsewidth of three
clocks.
G_in_timebase
G_Out
(20 MHz) is
G_source
4-49
Chapter 4
Programming
pin with a three clock delay
. The waveform
PCI E Series RLPM

Advertisement

Table of Contents
loading

Table of Contents