VXI SVM2608 user manual Timeout Counter = Timeout / Timeout Base Clock

Page 53

www.vxitech.com

Write 0x0016E360 @ Base address + 0xC00068

If the Sample Rate register from Example 1 (0x0012C4B0 corresponding to a sample rate of 123 ms) and the Trigger Delay in Example 4 above are set on the SVM2608, the first sample is taken 1,500,000 x 123 ms = 184,500 seconds (51.25 hours!!!) after the trigger event.

Example 5: Setting Channel 2 and 4 Timeout Register to Timeout after 2.5 s

The Timeout function is designed to prevent the SVM2608 from encountering indefinite time periods where the module waits for an external trigger event. The clock for the timeout counter is generated by dividing the reference clock (0.1 µs (10 MHz) for the low-speed Channels 0 – 3 and 8.333 ns (120 MHz) for high-speed channels 4 and 5), generated by an on-board oscillator, by a preset value determined by bits 15 - 13 of the Timeout register of the respective channel. This is called the Timeout Base Clock (or TOSEL). Bits 12 - 0 in the TIMEOUT register load a counter (Timeout Counter) that determines the number of Timeout Base Clocks after which the timeout flag is set.

To determine the minimum Timeout Base Clock for Channel 2, divide the desired Timeout value by the maximum value allowed in the Timeout Counter register and round it up to the next highest value available:

TIMEOUT BASE CLOCK ≥ TIMEOUT VALUE / (213 -1) = 2.5 s / 8191 ≈ 0.305 ms

The nearest Timeout Base Clock available, which is greater than or equal to 0.305 ms, is 1 ms. Set the TOSEL bits in the Timeout register to ‘010’.

To determine the value for the Timeout Counter, divide the desired Timeout value by the Timeout Base Clock:

TIMEOUT COUNTER = TIMEOUT / TIMEOUT BASE CLOCK

=2.5 s / 1 ms

=2.5 s / 10-3s

=2,500

The value that needs to be programmed in the Timeout Counter is 2,500 = 0x9C4

The value which needs to be programmed into the Timeout register is determined by multiplying the Timeout Base by 213 and adding it to the Timeout Counter value:

TIMEOUT REGISTER = TIMEOUT BASE * 213 + TIMEOUT COUNTER

=2 * 8192 + 2500

=18884

=0x49C4

To program the Timeout value for Channel 2, write 0x49C4 at address 0xC00044.

The Timeout Counter starts counting down from the value it is loaded with after the channel is Armed, all the Pre-Trigger samples (if any were specified) are acquired and the Delay Points (if any were specified) are acquired. It stops counting as soon as either a trigger event occurs or when it reaches zero. Terminating (aborting) the acquisition by resetting the ARM bit also stops the Timeout counter.

If the Timeout Counter reaches zero, the Timeout Occurred flag is asserted.

SVM2608 Programming

53

Image 53
Contents SVM2608 VXI Technology, Inc Table of Contents Self Test Command Limitation of Warranty WarrantyCertification Restricted Rights LegendSteve Mauga, QA Manager EMCTerms and Symbols Service should only be performed by qualified personnelUse Proper Power Cord Use Proper Power SourceGround the Product Avoid Electric ShockOperating Conditions Improper UseVXI Technology Cleveland Instrument Division VXI Technology World HeadquartersVXI Technology Lake Stevens Instrument Division Technical SupportVXI Technology, Inc SVM2608 Preface Overview IntroductionScale Triggering Acquiring DataPre-Trigger Linear ModeDelayed Trigger Commands Fifo ModeCalibrations Test BusOption SVM2608 Block Diagram Physical Description SVM2608 Environmental SpecificationsGND CH1I CH3I Front Panel Interface WiringGND CH1I+ GND CH3I+ Exttrigin CH0I CH2IMtbf SVM2608 SpecificationsOption 1 SVM2608-01 VXI Technology, Inc SVM2608 Introduction Setting the Chassis Backplane Jumpers Calculating System Power and Cooling RequirementsRotary Switch Locations Setting the Base AddressMSB LSB ExampleDivide Decimal Module INSTALLATION/REMOVAL Switch to C and the front switch toFunction Offset Device Memory MapsReserved Register OffsetMS = Most Significant LS = Least Significant SVM2608 A32 Register MAP0x72 Command Register Channel 0x74 Databyte Ordering Determining the Register Address Sysfailctl Accessing the RegistersDescription of Registers INTLVL2 Force Trigger, Start Register 0x02 Read & WriteHSTRIGSRC2 EXT Trig SlopeExternal Trigger Level 0x06 Read & Write TimeoutctlReserved 4WIREOHMS 2WIREOHMSLINEAR/FIFO ATTN-GAIN1-GAIN0KHz Channels 0-3/5 MHz Channels 4-5 LPF Control This bit Sample Rate 0x0C, 0x34, 0x5C, 0x84 Read & WriteSample Rate 0x0E, 0x36, 0x5E, 0x86 Read & Write Sample Rate, High-Speed 0xAE, 0xD6 Read & Write Sample Rate, High-Speed 0xAC, 0xD4 Read & WriteTimeout 0x1C, 0x44, 0x6C, 0x94, 0xBC, 0xE4 Read & Write Reserved Registers 0xF8 0xFC Fifo Data 0x24, 0x4C, 0x74, 0x9C, 0xC4, 0xEC Read OnlyFifo Data 0x26, 0x4E, 0x76, 0x9E, 0xC6, 0xEE Read Only Trigger Delay = Measurement Commands Microprocessor CommandsCaptured Data Calculations Resistance Measurement Dynamic Method Self Test CommandResistance Measurement Offset Method Example Preset Setting Measurement CommandsSample Points Calibration CommandsSample Rate Trigger Event Forced TriggerPage Error Processing There are no errors in the queue Diagnostic Commands Changes become effective the next time the module powers up Examples Example 2 Setting Channel 2 to Acquire 200,000 SamplesExample 3 Setting Channel 2 to Pre-acquire 100,000 Samples Timeout Register = Timeout Base * 213 + Timeout Counter Timeout Counter = Timeout / Timeout Base ClockVXI Technology, Inc SVM2608 Programming Data Swapping Example Appendix aVXI Technology, Inc SVM2608 Appendix a Index