National Instruments cRIO-904 Series User Manual

National Instruments cRIO-904 Series User Manual

Embedded compactrio controller with real-time processor and reconfigurable fpga
Table of Contents

Advertisement

USER MANUAL
cRIO-904x
Embedded CompactRIO Controller with Real-Time Processor and
Reconfigurable FPGA
This document describes the features of the cRIO-904x and contains information about
mounting and operating the device.
In this document, the cRIO-9040, cRIO-9041, cRIO-9042, cRIO-9043, cRIO-9045,
cRIO-9046, cRIO-9047, cRIO-9048, and cRIO-9049 are referred to collectively as cRIO-904x.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the cRIO-904 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for National Instruments cRIO-904 Series

  • Page 1 USER MANUAL cRIO-904x Embedded CompactRIO Controller with Real-Time Processor and Reconfigurable FPGA This document describes the features of the cRIO-904x and contains information about mounting and operating the device. In this document, the cRIO-9040, cRIO-9041, cRIO-9042, cRIO-9043, cRIO-9045, cRIO-9046, cRIO-9047, cRIO-9048, and cRIO-9049 are referred to collectively as cRIO-904x.
  • Page 2: Table Of Contents

    Contents Configuring the cRIO-904x...................... 3 Connecting the cRIO-904x to the Host Computer Using USB........3 Connecting the cRIO-904x to the Host Computer or Network Using Ethernet....4 Configuring Startup Options..................... 4 cRIO-904x Features........................6 Ports and Connectors......................6 Buttons..........................12 LEDs..........................
  • Page 3: Configuring The Crio-904X

    If the device driver software does not detect the cRIO-904x, verify that you installed the appropriate NI software in the correct order on the host computer as described in "Installing Software on the Host Computer" in the cRIO-904x Getting Started Guide. cRIO-904x User Manual | © National Instruments | 3...
  • Page 4: Connecting The Crio-904X To The Host Computer Or Network Using Ethernet

    Connecting the cRIO-904x to the Host Computer or Network Using Ethernet Complete the following steps to connect the cRIO-904x to a host computer or Ethernet network using the RJ-45 Gigabit Ethernet port 0. NI recommends using the RJ-45 Gigabit Ethernet port 0 for communication with deployed systems. Note You can configure the RJ-45 Gigabit Ethernet port 1 in Measurement &...
  • Page 5 Rebooting the cRIO-904x with this setting on starts sshd on the Shell (SSH) cRIO-904x. Starting sshd enables logins over SSH, an encrypted Logins communication protocol. Note Visit ni.com/info and enter the Info Code openssh more information about SSH. cRIO-904x User Manual | © National Instruments | 5...
  • Page 6: Crio-904X Features

    Table 1. cRIO-904x Startup Options (Continued) Startup Option Description LabVIEW Rebooting the cRIO-904x with this setting on enables you to add the Project Access target to a LabVIEW project. Enable Rebooting the cRIO-904x with this setting on enables the embedded UI, Embedded UI which allows you to interact with the front panels of VIs running on the cRIO-904x using input and display devices connected directly to the...
  • Page 7 Alternatively, this port may be used as a standard USB host port and supports common USB devices such as mass-storage devices, keyboards, mice, and USB cameras. Use a USB Type-C male to USB Type-A female adapter to use this port with USB devices cRIO-904x User Manual | © National Instruments | 7...
  • Page 8 implementing a type-A male connector. Use a USB Type-C multiport adapter to simultaneously use this port as a display output and a USB host port. The following NI USB Type-C adapters are available for the cRIO-904x. Table 2. NI USB Type-C Adapters for cRIO-904x Adapter Length Part Number USB to DVI Adapter with Retention, USB Type-C Male to DVI-D...
  • Page 9 Using SD cards that are not approved by NI might invalidate specifications and result in unreliable performance. Notice Full and high-speed SD cards are prohibited for use with the cRIO-904x. The following accessories are available from the SD card slot. cRIO-904x User Manual | © National Instruments | 9...
  • Page 10 Table 7. cRIO-904x SD Storage Accessories SD Card Capacity Part Number Industrial SD Card, -40 to 85 °C, UHS-I 16 GB 786362-01 32 GB 786363-01 SD Door (x3) 786218-01 SD Card Slot Cover You must use the SD card slot cover to protect the SD card in hazardous locations. Do not remove an SD card while either LED is flashing or lit because file corruption may result.
  • Page 11 Find examples on how to use NI-Serial or NI-VISA to perform serial communication in the NI Example Finder. The NI Example Finder is located on the Help menu in the LabVIEW Help. The following table shows the pinout for the RS-485 serial port. cRIO-904x User Manual | © National Instruments | 11...
  • Page 12: Buttons

    Table 10. RS-485 Serial Port Pinout Pinout Signal No Connect TXD- TXD+ No Connect No Connect RXD- RXD+ No Connect No Connect Isolated GND The following accessory is available to connect the RS-485 serial port to a 9-pin DSUB plug. Notice To ensure the specified EMC performance, you must use an isolated cable with the RS-485 serial port.
  • Page 13 • RT Startup App disabled • FPGA Startup App disabled Press and hold RESET button for ≥ 5 s For more information about using the RESET button for network troubleshooting, see Troubleshooting Network Connectivity. cRIO-904x User Manual | © National Instruments | 13...
  • Page 14: Leds

    Troubleshooting Network Connectivity You can use the RESET button to troubleshoot network connectivity. Complete the following steps to reset the network adapters to default settings. Hold the RESET button for 5 seconds, and then release it to boot the controller in safe mode and enable Console Out.
  • Page 15 For more information about connecting the cRIO-904x to power, refer to "Connecting the Controller to Power" in the cRIO-904x Getting Started Guide . STATUS LED Indicators The following table describes the STATUS LED indicators. cRIO-904x User Manual | © National Instruments | 15...
  • Page 16 Table 14. STATUS LED Indicators LED Pattern Indication Color Yellow Blinks twice and The cRIO-904x is in safe mode. Software is not installed, pauses which is the factory default state, or software has been improperly installed on the cRIO-904x. An error can occur when an attempt to upgrade the software is interrupted.
  • Page 17 SD In Use LED Indicator The cRIO-904x has a SD In Use LED to indicate the card drive mount status. The following table lists details of the SD In Use LED indicator. cRIO-904x User Manual | © National Instruments | 17...
  • Page 18: Chassis Grounding Screw

    Table 16. SD In Use LED Indicator LED Color LED Pattern Indication SD IN USE Green There is no SD card present in the slot or the cRIO-904x has unmounted the SD card from the operating system. It is safe to remove the SD card from the slot.
  • Page 19: Digital Routing

    12.8 MHz Carrier Clock 10 MHz Carrier Clock Note When switching between programming modes, you may notice the terms timebase and clock used interchangeably. This is due to the DAQ ASIC and the RIO cRIO-904x User Manual | © National Instruments | 19...
  • Page 20: Synchronization Across A Network

    FPGA using different terminology for timing and clock mechanisms. The documentation will use the term based on the programming mode discussed. 80 MHz Timebase When programming C Series modules in Real-Time (NI-DAQmx) mode, the 80 MHz timebase can function as the source input to the 32-bit general-purpose counter/timers. The 80 MHz timebase is generated from the onboard oscillator.
  • Page 21 IEEE 802.1AS-2011 assumes all communication between devices is done on the OSI layer 2, while IEEE 1588-2008 can support various layer 2 and layer 3-4 communication methods. The IEEE 1588-2008 profile National Instruments implements on the cRIO-904x only supports layer 3-4 communication methods. Operating on the layer 2 yields better performance for the IEEE 802.1AS-2011.
  • Page 22: Cmos Battery

    configuration challenges compared to IEEE 1588-2008. A cRIO-904x controller acts as a time-aware end station for both protocols. IEEE 1588 External Switch Requirements To take advantage of the network synchronization features of the cRIO-904x controllers, ensure that your network infrastructure meets certain requirements depending on which IEEE 1588 profile is implemented for your application: •...
  • Page 23 Torx T10 and T20. The other set is a tamper-resistant set of screws that require a security driver type, Torx T10H and T20H. Use the tamper-resistant set to help prevent unintended modification of the system. cRIO-904x User Manual | © National Instruments | 23...
  • Page 24: Module Immobilization Accessory Dimensions

    Figure 8. 8-slot cRIO-904x Module Immobilization Accessory Installation Ensure that all the C Series modules are installed in the cRIO-904x and the latches are locked in place. Remove the center right panel screw from the top and bottom of the cRIO-904x using the Torx T10 driver.
  • Page 25: Mounting The Controller

    C Series module accuracy. Observe the following guidelines to mount the cRIO-904x in the reference mounting configuration. cRIO-904x User Manual | © National Instruments | 25...
  • Page 26 Figure 11. cRIO-904x Reference Mounting Configuration Horizontal mounting orientation. Mounting substrate options: • Mount the cRIO-904x directly to a metallic surface that is at least 1.6 mm (0.062 in.) thick and extends a minimum of 101.6 mm (4 in.) beyond all edges of the device.
  • Page 27: Alternate Mounting Configurations

    The different connector types on C Series modules require different cabling clearances. For a complete list of cabling clearances for C Series modules, visit ni.com/info and enter the Info Code crioconn cRIO-904x User Manual | © National Instruments | 27...
  • Page 28: Dimensions

    Figure 13. cRIO-904x Cabling Clearance Cabling Clearance 29.1 mm (1.14 in.) Measure the ambient temperature at each side of the cRIO-904x, 63.5 mm (2.50 in.) from the side and 38.1 mm (1.50 in.) forward from the rear of the cRIO-904x, as shown in the following figure.
  • Page 29: Mounting On A Flat Surface

    (2.10 in.) Mounting on a Flat Surface For environments with high shock and vibration, NI recommends mounting the cRIO-904x directly on a flat, rigid surface using the mounting holes in the cRIO-904x. cRIO-904x User Manual | © National Instruments | 29...
  • Page 30 What to Use • cRIO-904x • M4 screws, user provided, which must not exceed 8 mm of insertion into the cRIO-904x – x4 for 4-slot models – x6 for 8-slot models Figure 18. Mounting the 4-slot cRIO-904x Directly on a Flat Surface 30 | ni.com | cRIO-904x User Manual...
  • Page 31 Screws must not exceed 8 mm of insertion into the cRIO-904x. Tighten the screws to a maximum torque of 1.3 N · m (11.5 lb · in.). Surface Mounting Dimensions The following figures show the surface mounting dimensions for the 4-slot and 8-slot cRIO-904x models. cRIO-904x User Manual | © National Instruments | 31...
  • Page 32: Mounting On A Panel

    Figure 20. 4-slot cRIO-904x Surface Mounting Dimensions 116.5 mm (4.59 in.) 29.0 mm (1.14 in.) 2× 20.3 mm (0.80 in.) 2× 20.3 mm (0.80 in.) 2× 23.7 mm (0.94 in.) 6× ISO M4 × 0.7 Thread 8 mm Maximum Insertion Depth Figure 21.
  • Page 33 Tighten the screws to a maximum torque of 1.3 N · m (11.5 lb · in.). You must use the screws provided with the NI panel mounting kit because they are the correct depth and thread for the panel mounting plate. cRIO-904x User Manual | © National Instruments | 33...
  • Page 34: Mounting On A Din Rail

    Fasten the panel mounting plate to the surface using the screwdriver and screws that are appropriate for the surface. The maximum screw size is M5 or number 10. Panel Mounting Dimensions The following figures show the panel mounting dimensions for the 4-slot and 8-slot cRIO-904x models.
  • Page 35 • M4 x 10 screws (x2) – 8-slot models - 157268-01 • DIN rail clip • M4 x 10 screws (x3) Figure 26. Mounting the 4-slot cRIO-904x on a DIN Rail cRIO-904x User Manual | © National Instruments | 35...
  • Page 36 Figure 27. Mounting the 8-slot cRIO-904x on a DIN Rail Align the cRIO-904x and the DIN rail clip. Fasten the DIN rail clip to the cRIO-904x using the screwdriver and M4 x 10 screws. Tighten the screws to a maximum torque of 1.3 N · m (11.5 lb · in.). You must use the screws provided with the NI DIN rail kit because they are the correct depth and thread for the DIN rail clip.
  • Page 37: Mounting On A Rack

    You can use the NI desktop mounting kit to mount the cRIO-904x on a desktop. What to use • cRIO-904x • Screwdriver, Phillips #2 • NI desktop mounting kit, 779473-01 – Desktop mounting brackets (x2) Figure 29. Mounting the 4-slot cRIO-904x on a Desktop cRIO-904x User Manual | © National Instruments | 37...
  • Page 38 Figure 30. Mounting the 8-slot cRIO-904x on a Desktop Align the brackets with the mounting holes on the ends of the cRIO-904x. Use the screwdriver to tighten the captive screws on the end of the brackets. Desktop Mounting Dimensions The following figures show the desktop mounting dimensions for the 4-slot and 8-slot cRIO-904x models.
  • Page 39 253.9 mm (10.00 in.) 2× 17.2 mm (0.68 in.) 39.1 mm (1.54 in.) Figure 32. 8-slot cRIO-904x Desktop Mounting Dimensions 361.7 mm (14.24 in.) 2× 17.2 mm (0.68 in.) 39.1 mm (1.54 in.) cRIO-904x User Manual | © National Instruments | 39...
  • Page 40: Bios Configuration

    Figure 33. cRIO-904x Desktop Mounting Side Dimensions 127.2 mm (5.01 in.) 132.8 mm (5.23 in.) BIOS Configuration Resetting the System CMOS and BIOS Settings The cRIO-904x BIOS configuration information is stored in a nonvolatile memory location that does not require a battery to preserve the settings. Additionally, the BIOS optimizes boot time by saving specific system information to memory backed up by a battery (CMOS).
  • Page 41: Bios Setup Utility

    Enter a submenu or display all available settings for a highlighted configuration option. <Esc> Return to the parent menu of a submenu. At the top-level menus, this key serves as a shortcut to the Exit menu. cRIO-904x User Manual | © National Instruments | 41...
  • Page 42: Main Setup Menu

    Table 17. Navigation Keys (Continued) Key(s) Function(s) <+>, <-> Cycle between all available settings for a selected configuration option. <F8> Load the previous values for all BIOS configuration settings. <F9> Load the optimal default values for all BIOS configuration settings. The optimal default values are the same as the shipping configuration default values.
  • Page 43 Display Port Type-C FW Ver— This items shows the firmware version for the DisplayPort USB type-C port. • USB Devices—This item lists the total number of devices detected in the system, categorized by device type. cRIO-904x User Manual | © National Instruments | 43...
  • Page 44: Boot Setup Menu

    • Legacy USB Support—This setting specifies whether legacy USB support is enabled. Legacy USB support refers to the ability to use a USB keyboard and mouse during system boot or in a legacy operating system such as DOS. Valid options are Enabled, Disabled, and Auto.
  • Page 45: Save & Exit Menu

    BIOS setup options, the system will continue booting to the selected device without first rebooting. If BIOS setup options have been changed and saved, a reboot will be required and the boot override selection will not be valid. cRIO-904x User Manual | © National Instruments | 45...
  • Page 46: Choosing Your Programming Mode

    Choosing Your Programming Mode The cRIO-904x supports three programming modes. The programming modes are set per slot on a chassis. Real-Time Enables you to use C Series modules directly from LabVIEW Real- Time, using NI DAQmx. C Series modules appear under the Real-Time Resources item in the MAX Project Explorer window and I/O channels appear as I/O variables under the modules.
  • Page 47: Analog Input With Ni-Daqmx

    Real-Time (NI-DAQmx) mode. The measurement specifications, such as number of channels, channel configuration, sample rate, and gain, are determined by the type of C Series module used. For more cRIO-904x User Manual | © National Instruments | 47...
  • Page 48 information and wiring diagrams, refer to the documentation included with your C Series modules. The cRIO controller has eight input timing engines, which means that up to eight hardware- timed analog input tasks can be running at a time on the controller. An analog input task can include channels from multiple analog input modules.
  • Page 49 The AI Sample Clock Timebase signal is divided down to provide a source for Sample Clock. AI Sample Clock Timebase can be generated from external or internal sources. AI Sample Clock Timebase is not available as an output from the controller. cRIO-904x User Manual | © National Instruments | 49...
  • Page 50 AI Start Trigger Signal Use the Start Trigger signal to begin a measurement acquisition which consists of one or more samples. Once the acquisition begins, configure the acquisition to stop in one of the following ways: • When a certain number of points has been sampled (in finite mode) •...
  • Page 51 Analog Comparison Event signal, depending on the trigger properties. Routing the Reference Trigger Signal to an Output Terminal You can route a reference trigger to any output PFI terminal. Reference Trigger is active high by default. cRIO-904x User Manual | © National Instruments | 51...
  • Page 52 AI Pause Trigger Signal You can use the Pause Trigger to pause and resume a measurement acquisition. The internal sample clock pauses while the external trigger signal is active and resumes when the signal is inactive. You can program the active level of the pause trigger to be high or low. Using a Digital Source To use the Pause Trigger, specify a source and a polarity.
  • Page 53 In this scenario, the first sample of a hardware- timed acquisition with a slow sampled C Series module is sampled when the task is committed. cRIO-904x User Manual | © National Instruments | 53...
  • Page 54: Analog Output With Ni-Daqmx

    For more information about which C Series modules are compatible with the cRIO controller, go to ni.com/info and enter the Info Code rdcdaq Getting Started with AI Applications in Software You can use the cRIO controller in the following analog input applications: •...
  • Page 55 In regeneration mode, you define a buffer in host memory. The data from the buffer is continually downloaded to the FIFO to be written out. New data can be written to cRIO-904x User Manual | © National Instruments | 55...
  • Page 56 the host buffer at any time without disrupting the output. There is no limitation on the number of waveform channels supported by regeneration mode. – With onboard regeneration, the entire buffer is downloaded to the FIFO and regenerated from there. After the data is downloaded, new data cannot be written to the FIFO.
  • Page 57 If you are using an internal sample clock, you can specify a delay from the start trigger to the first sample. For more information, refer to the NI-DAQmx Help. cRIO-904x User Manual | © National Instruments | 57...
  • Page 58 Using a Digital Source To use AO Start Trigger, specify a source and a rising or falling edge. The source can be one of the following signals: • A pulse initiated by host software • Any PFI terminal • AI Reference Trigger •...
  • Page 59: Digital Input/Output With Ni-Daqmx

    I/O specifications, such as number of lines, logic levels, update rate, and line direction, are determined by the type of C Series module used. For more information, refer to the documentation included with your C Series module(s). cRIO-904x User Manual | © National Instruments | 59...
  • Page 60 Serial DIO versus Parallel DIO Modules Serial digital modules have more than eight lines of digital input/output. They can be used in any controller slot and can perform the following tasks: • Software-timed and hardware-timed digital input/output tasks Parallel digital modules can be used in any controller slot and can perform the following tasks: •...
  • Page 61 Use the DI Sample Clock signal to sample digital I/O on any slot using parallel digital modules, and store the result in the DI waveform acquisition FIFO. If the cRIO controller cRIO-904x User Manual | © National Instruments | 61...
  • Page 62 receives a DI Sample Clock signal when the FIFO is full, it reports an overflow error to the host software. A sample consists of one reading from each channel in the DI task. DI Sample Clock signals the start of a sample of all digital input channels in the task. DI Sample Clock can be generated from external or internal sources as shown in the following figure.
  • Page 63 "Device Routing in MAX" topic in the NI-DAQmx Help or the LabVIEW Help for more information. Routing DI Start Trigger to an Output Terminal You can route DI Start Trigger to any output PFI terminal. The output is an active high pulse. cRIO-904x User Manual | © National Instruments | 63...
  • Page 64 DI Reference Trigger Signal Use a reference trigger signal to stop a measurement acquisition. To use a reference trigger, specify a buffer of finite size and a number of pretrigger samples (samples that occur before the reference trigger). The number of posttrigger samples (samples that occur after the reference trigger) desired is the buffer size minus the number of pretrigger samples.
  • Page 65 You can use the cRIO controller in the following digital input applications: • Single-point acquisition • Hardware-Timed Single Point acquisition Tp is a nominal value; the accuracy of the controller timebase and I/O distortion will affect this value. cRIO-904x User Manual | © National Instruments | 65...
  • Page 66 • Finite acquisition • Continuous acquisition For more information about programming digital input applications and triggers in software, refer to the NI-DAQmx Help or the LabVIEW Help for more information. Change Detection Event The Change Detection Event is the signal generated when a change on the rising or falling edge lines is detected by the change detection task.
  • Page 67 After the specified number of samples is written out, the generation stops. • Continuous—Continuous generation refers to the generation of an unspecified number of samples. Instead of generating a set number of data samples and stopping, a continuous cRIO-904x User Manual | © National Instruments | 67...
  • Page 68 generation continues until you stop the operation. There are three different continuous generation modes that control how the data is written. These modes are regeneration, onboard regeneration, and non-regeneration: – In regeneration mode, you define a buffer in host memory. The data from the buffer is continually downloaded to the FIFO to be written out.
  • Page 69 To use the Start Trigger signal with a time source, configure a specific time in NI-DAQmx. Refer to the "Timestamps" and "Time Triggering" topics in the NI-DAQmx Help for more information on accessing time-based features in the NI-DAQmx API. cRIO-904x User Manual | © National Instruments | 69...
  • Page 70 Using a Digital Source To use DO Start Trigger, specify a source and a rising or falling edge. The source can be one of the following signals: • A pulse initiated by host software • Any PFI terminal • AI Reference Trigger •...
  • Page 71: Pfi With Ni-Daqmx

    You can configure each PFI individually as the following: • Timing input signal for AI, AO, DI, DO, or counter/timer functions • Timing output signal from AI, AO, DI, DO, or counter/timer functions cRIO-904x User Manual | © National Instruments | 71...
  • Page 72 PFI Filters You can enable a programmable debouncing filter on each PFI signal. When the filter is enabled, the controller samples the inputs with a user-configured Filter Clock derived from the controller timebase. This is used to determine whether a pulse is propagated to the rest of the circuit.
  • Page 73: Counters With Ni-Daqmx

    For sample clocked operations, an external signal must be provided to supply a clock source. The source can be any of the following signals: • AI Sample Clock • AI Start Trigger • AI Reference Trigger • AO Sample Clock cRIO-904x User Manual | © National Instruments | 73...
  • Page 74 • DI Sample Clock • DI Start Trigger • DO Sample Clock • CTR n Internal Output • Freq Out • • Change Detection Event • Analog Comparison Event Not all timed counter operations require a sample clock. For example, a simple buffered pulse width measurement latches in data on each edge of a pulse.
  • Page 75 LabVIEW Help for a list of default PFI lines for counter functions. Other Counter Features The following sections list the other counter features available on the cRIO controller. • Cascading Counters • Prescaling • Synchronization Modes cRIO-904x User Manual | © National Instruments | 75...
  • Page 76 Cascading Counters You can internally route the Counter n Internal Output and Counter n TC signals of each counter to the Gate inputs of the other counter. By cascading two counters together, you can effectively create a 64-bit counter. By cascading counters, you also can enable other applications.
  • Page 77: Counter Input Applications

    In edge counting applications, the counter counts edges on its Source after the counter is armed. You can configure the counter to count rising or falling edges on its Source input. You cRIO-904x User Manual | © National Instruments | 77...
  • Page 78 also can control the direction of counting (up or down), as described in the Controlling the Direction of Counting section. The counter values can be read on demand or with a sample clock. Refer to the following sections for more information about edge counting options: •...
  • Page 79 A pulse-width measurement will be accurate even if the counter is armed while a pulse train is in progress. If a counter is armed while the pulse is in the active state, it will wait for the next transition to the active state to begin the measurement. cRIO-904x User Manual | © National Instruments | 79...
  • Page 80 Refer to the following sections for more information about cRIO controller pulse-width measurement options: • Single Pulse-Width Measurement • Implicit Buffered Pulse-Width Measurement • Sample Clocked Buffered Pulse-Width Measurement Single Pulse-Width Measurement With single pulse-width measurement, the counter counts the number of edges on the Source input while the Gate input remains active.
  • Page 81 Source signal by the number of edges returned by the counter. Refer to the following sections for more information about cRIO controller pulse measurement options: • Single Pulse Measurement • Implicit Buffered Pulse Measurement • Sample Clocked Buffered Pulse Measurement cRIO-904x User Manual | © National Instruments | 81...
  • Page 82 Single Pulse Measurement Single (on-demand) pulse measurement is equivalent to two single pulse-width measurements on the high (H) and low (L) ticks of a pulse, as shown in the figure below. Figure 56. Single (On-Demand) Pulse Measurement Counter Armed Gate Source Latched Value...
  • Page 83 In implicit buffered semi-period measurements, on each edge of the Gate signal, the counter stores the count in the FIFO. The sampled values will be transferred to host memory using a high-speed data stream. cRIO-904x User Manual | © National Instruments | 83...
  • Page 84 The counter begins counting when it is armed. The arm usually occurs between edges on the Gate input. You can select whether to read the first active low or active high semi-period using the CI.SemiPeriod.StartingEdge property in NI-DAQmx. The following figure shows an example of an implicit buffered semi-period measurement. Figure 59.
  • Page 85 If you measure the width of pulse T to be N periods of fx, the frequency of fx is N/T. The image below illustrates this method. Another option is to measure the width of a known period instead of a known pulse. cRIO-904x User Manual | © National Instruments | 85...
  • Page 86 Figure 61. High Frequency with Two Counters Width of Pulse (T) Pulse Pulse Gate … Source Pulse-Width Width of Measurement Pulse Frequency of fx = Large Range of Frequencies with Two Counters By using two counters, you can accurately measure a signal that might be high or low frequency.
  • Page 87 T2 is the number of ticks counted of the known timebase as shown in the following figure. The frequency measured is fx = fk * (T1/T2). cRIO-904x User Manual | © National Instruments | 87...
  • Page 88 Figure 63. Sample Clocked Buffered Frequency Measurement (Averaging) Counter Armed Gate (fx) Source (fk) Sample Clock T1 T2 T1 T2 T1 T2 Buffer 2 10 2 10 When CI.Freq.EnableAveraging is set to False, the frequency measurement returns the frequency of the pulse just before the sample clock. This single measurement is a single frequency measurement and is not an average between clocks as shown in the following figure.
  • Page 89 N × fk − fx fk × − 1 Max. error % Note Accuracy equations do not take clock stability into account. Refer to the specifications document for your chassis for information about clock stability. cRIO-904x User Manual | © National Instruments | 89...
  • Page 90 Which Method Is Best? This depends on the frequency to be measured, the rate at which you want to monitor the frequency and the accuracy you desire. Take for example, measuring a 50 kHz signal. Assuming that the measurement times for the sample clocked (with averaging) and two counter frequency measurements are configured the same, the following table summarizes the results.
  • Page 91 Large Range Number of counters 1 or 2 used Number of measurements returned Measures high Good Poor Good Good frequency signals accurately Measures low frequency Good Good Good Poor signals accurately cRIO-904x User Manual | © National Instruments | 91...
  • Page 92 For information about connecting counter signals, refer to the Default Counter/Timer Routing section. Period Measurement In period measurements, the counter measures a period on its Gate input signal after the counter is armed. You can configure the counter to measure the period between two rising edges or two falling edges of the Gate input signal.
  • Page 93 Z is high. Incrementing and decrementing takes priority over reloading. Thus, when the channel B goes low to enter the reload phase, the increment occurs first. The reload occurs within one maximum timebase period after the cRIO-904x User Manual | © National Instruments | 93...
  • Page 94 reload phase becomes true. After the reload occurs, the counter continues to count as before. The figure below illustrates channel Z reload with X4 decoding. Figure 68. Channel Z Reload with X4 Decoding Ch A Ch B Ch Z Max Timebase Counter Value A = 0 B = 0...
  • Page 95 Aux signal. The counter then stores the count in the FIFO and ignores other edges on its inputs. Software then reads the stored count. The following figure shows an example of a single two-signal edge-separation measurement. cRIO-904x User Manual | © National Instruments | 95...
  • Page 96 Figure 71. Single Two-Signal Edge-Separation Measurement Counter Armed Measured Interval GATE SOURCE Counter Value Latched Value Implicit Buffered Two-Signal Edge-Separation Measurement Implicit buffered and single two-signal edge-separation measurements are similar, but implicit buffered measurement measures multiple intervals. The counter counts the number of rising (or falling) edges on the Source input occurring between an active edge of the Gate signal and an active edge of the Aux signal.
  • Page 97: Counter Output Applications

    You can specify a delay from when the counter is armed to the beginning of the pulse. The delay is measured in terms of a number of active edges of the Source input. cRIO-904x User Manual | © National Instruments | 97...
  • Page 98 You can specify a pulse width. The pulse width is also measured in terms of a number of active edges of the Source input. You also can specify the active edge of the Source input (rising or falling). The following figure shows a generation of a pulse with a pulse delay of four and a pulse width of three (using the rising edge of Source).
  • Page 99 The figure below shows a generation of two pulses with a pulse delay of five and a pulse width of three (using the rising edge of Source) with CO.EnableInitalDelayOnRetrigger set to the default True. cRIO-904x User Manual | © National Instruments | 99...
  • Page 100 Figure 77. Retriggerable Single Pulse Generation with Initial Delay on Retrigger Counter Load Values 4 3 2 1 0 2 1 0 4 3 2 1 0 2 1 0 GATE (Start Trigger) SOURCE The figure below shows the same pulse train with CO.EnableInitalDelayOnRetrigger set to the default False.
  • Page 101 (pulse specifications) you write determines the number of pulses generated. All points are generated back to back to create a user defined pulse train. The following table and figure detail a finite implicit generation of three samples. cRIO-904x User Manual | © National Instruments | 101...
  • Page 102 Table 25. Finite Implicit Buffered Pulse Train Generation Sample Idle Ticks Active Ticks Figure 80. Finite Implicit Buffered Pulse Train Generation SOURCE Counter Armed Continuous Buffered Implicit Pulse Train Generation This function generates a continuous train of pulses with variable idle and active times. Instead of generating a set number of data samples and stopping, a continuous generation continues until you stop the operation.
  • Page 103 The frequency generator can output a square wave at many different frequencies. The frequency generator is independent of the four general-purpose 32-bit counter/timer modules on the cRIO controller. The following figure shows a block diagram of the frequency generator. cRIO-904x User Manual | © National Instruments | 103...
  • Page 104 Figure 82. Frequency Generator Block Diagram Frequency Output ÷ 20 MHz Timebase Timebase Frequency Generator FREQ OUT 100 kHz Timebase Divisor (1–16) The frequency generator generates the Frequency Output signal. The Frequency Output signal is the Frequency Output Timebase divided by a number you select from 1 to 16. The Frequency Output Timebase can be either the 20 MHz Timebase, the 20 MHz Timebase divided by 2, or the 100 kHz Timebase.
  • Page 105: Counter Timing Signals

    Counter n Aux Signal • Counter n A, Counter n B, and Counter n Z Signals • Counter n Up_Down Signal • Counter n HW Arm Signal • Counter n Sample Clock Signal cRIO-904x User Manual | © National Instruments | 105...
  • Page 106 • Counter n Internal Output and Counter n TC Signals • Frequency Output Signal In this section, n refers to the cRIO controller Counter 0, 1, 2, or 3. For example, Counter n Source refers to four signals—Counter 0 Source (the source input to Counter 0), Counter 1 Source (the source input to Counter 1), Counter 2 Source (the source input to Counter 2), or Counter 3 Source (the source input to Counter 3).
  • Page 107 Each counter has independent input selectors for the Counter n Aux signal. Any of the following signals can be routed to the Counter n Aux input: • Any PFI terminal • AI Reference Trigger • AI Start Trigger cRIO-904x User Manual | © National Instruments | 107...
  • Page 108 • Analog Comparison Event • Change Detection Event In addition, a counter’s Internal Output, Gate or Source can be routed to a different counter’s Aux. A counter’s own gate can also be routed to its Aux input. Some of these options may not be available in some driver software. Refer to the "Device Routing in MAX"...
  • Page 109 Routing Counter n Sample Clock to an Output Terminal You can route Counter n Sample Clock out to any PFI terminal. The PFI circuitry inverts the polarity of Counter n Sample Clock before driving the PFI terminal. cRIO-904x User Manual | © National Instruments | 109...
  • Page 110: Worldwide Support And Services

    NI trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies. For patents covering NI products/technology, refer to the appropriate location: Help»Patents in your software, the file on your media, or the National Instruments Patent Notice at . You can find patents.txt ni.com/patents...

Table of Contents

Save PDF