Skip to main content
Skip table of contents

13.2 DIO Extended Features [T-Series Datasheet]

Overview

Basics: DIO Extended Features, commonly refered to as "DIO-EF", allow T-Series devices to measure and generate digital waveforms that are more advanced than logic high or logic low.  They expose features such as PWM output for servo motor control, Quadrature input for incremental/quadrature encoders, and more.

Device Control Basics:

  • All T-series device features are controlled by reading and writing Modbus TCP registers via Modbus TCP (either directly or through our LJM library).

  • We have register descriptions throughout documentation detailing relevant register names, starting addresses, types, and access permissions (read/write).

  • See Section 3.0 Communication for other detailed communication information.

Register Numbering: DIO-EFs are configured and used through the DIO#(0:22)_EF registers. The numbering of these registers corresponds with the DIO numbers documented in section 13.0 Digital I/O.

Configuration and how to use: The meanings of each of the DIO#_EF_CONFIG registers and DIO#_EF_READ registers changes depending on what DIO-EF index (DIO#_EF_INDEX) is configured, however the general configuration process is the same and is described below. It is helpful to think of DIO-EF features as "sub-systems" that need to be configured before they are started. Once they are started, they can be interacted with by reading the system state and updating system configurations.

DIO-EF System Configurations:

  1. Select a feature and determine the number of required DIO lines using the reference tables below.

  2. Ensure that the DIO-EF is disabled by writing a 0 to the appropriate DIO#_EF_ENABLE register.

  3. If required by the selected DIO-EF feature, configure the DIO-EF clock source.

  4. Write the selected feature's index value to the appropriate DIO#_EF_INDEX register.

  5. If required by the selected DIO-EF feature, write to the DIO#_EF_CLOCK_SOURCE register.

  6. If required by the selected DIO-EF feature, write to the DIO#_EF_CONFIG registers.

  7. Enable the selected DIO-EF feature by writing a 1 to the appropriate DIO#_EF_ENABLE register.

Once a DIO-EF has been started, it can be interacted with using the following registers

  • If the selected DIO-EF produces data, read the results from the DIO#_EF_READ registers.

  • (E.g., if DIO6 is configured as an Interrupt Counter, you can read the current count from DIO6_EF_READ_A.)

  • If the selected DIO-EF can be updated on the fly, write to the DIO#_EF_CONFIG registers.

  • (E.g., if DIO0 is configured as a PWM Out, you can update the duty cycle by writing to DIO0_EF_CONFIG_A.)

Supported Features by Device

Each T-series device supports DIO extended features on different IO. The following sections outline feature availability by device.

T4

Table 13.2-1.T4 Digital I/O Extended Features

T4 Digital I/O Extended FeaturesAIN (0-3)FIO (4-7)EIO (0-7)CIO (0-3)
DIO
FeatureIndex#    45678910111213141516171819
                      
PWM Out 0                  
PWM Out with Phase 1                  
Pulse Out 2                  
Frequency In 3,4                  
Pulse Width In 5                  
Line-to-Line In* 6                  
High-Speed Counter 7                
Interrupt Counter 8              
Interrupt Counter with Debounce 9              
Quadrature In* 10              
Interrupt Frequency In 11              
Conditional Reset 12              

*Line-to-Line In and Quadrature In both require two DIO lines.

T7

Table 13.2-2.T7 Digital I/O Extended Features

T7 Digital I/O Extended FeaturesFIO (0-7)EIO (0-7)CIO (0-3)MIO (0-2)
DIO
FeatureIndex#012345678910111213141516171819202122
                         
PWM Out 0                  
PWM Out with Phase 1                  
Pulse Out 2                  
Frequency In 3,4                     
Pulse Width In 5                     
Line-to-Line In* 6                     
High-Speed Counter 7                   
Interrupt Counter 8                 
Interrupt Counter with Debounce 9                 
Quadrature In* 10                 
Interrupt Frequency In 11                 
Conditional Reset 12                 

*Line-to-Line In and Quadrature In both require two DIO lines.

T8

Table 13.2-3.T8 Digital I/O Extended Features

T8 Digital I/O Extended FeaturesFIO (0-7)EIO (0-7)CIO (0-3)
DIO
FeatureIndex#012345678910111213141516171819
                      
PWM Out0           
PWM Out with Phase1           
Pulse Out2           
Frequency In3,4           
Pulse Width In5           
Line-to-Line In*6           
High-Speed Counter7             
Interrupt Counter8    
Interrupt Counter with Debounce9    
Quadrature In*10    
Interrupt Frequency In11    
Conditional Reset12    

*Line-to-Line In and Quadrature In both require two DIO lines.

Kipling Walkthroughs: Kipling's Register Matrix can be used to perform DIO-EF features. Some examples:

DIO-EF Enable/Disable

This register is used to disable a DIO-EF feature (in order to configure it) and also used to start or enable the DIO-EF subsystem.

A DIO-EF doesn't always need to be disabled for it to be configured, depending on the DIO-EF being enabled.

DIO-EF Index (Feature Selection)

This register is used to select the extended feature that will get enabled on a given DIO line. The valid DIO lines differ by device. For more specific details look at reference tables 13.2-1 and 13.2-2 as well as the appropriate DIO-EF feature subsection.

DIO-EF Clock Source Selection

This register isn't used by all DIO-EF features.

If a DIO-EF feature requires the configuration or selection of a clock source (such as PWM Out does), the configuration of this register is required, since it is required for selecting a clock source. See 13.2.1 EF Clock Source for more details about clock source selection.

DIO-EF Configuration

Configuration registers serve two purposes. They provide a location for settings that need to be configured upon DIO-EF enable and they provide a location for settings that users may need to use to update a DIO-EF feature once it has been enabled.

Initial Configuration: Configuration is the initial setup of the Extended Feature. Configuration requires that any DIO-EF running at the pin in question first be disabled. Options can then be loaded. Then the DIO-EF can be enabled.

Update: Some DIO#_CONFIG registers can be updated while a DIO-EF is running. Updating allows the DIO-EF to change its operation parameters without restarting. Note that the clock source and feature index cannot be changed in an update. Depending on the feature, reads and writes to the update registers have small differences. See the Update portion of each feature for more information.

DIO-EF Basic Read Registers

Some DIO-EF produce results or provide status information that can be read. This information is usually a binary integer. When possible, the T-series device will convert the binary integer into a real-world unit such as seconds. When available, converted values can be read from the registers designated with “_F”.

DIO-EF Read-and-Reset Registers

Some DIO-EF can be reset while they are running. Resetting can have different results depending on the feature. For instance, counters are reset to zero.

Streaming DIO-EF Results

Though all operations discussed in this section are supported in command-response mode, some DIO-EF features can be read fast enough to be streamed:

  • Frequency In

  • Pulse Width In

  • High-Speed Counter

  • Interrupt Counter

  • Interrupt Counter with Debounce

  • Quadrature In

  • Interrupt Frequency In

In stream mode, you can read from the integer READ registers (A, B, A_AND_RESET), but as mentioned in 3.2 Stream, those reads only return the lower 16 bits so you need to also use STREAM_DATA_CAPTURE_16 in the scan list to get the upper 16 bits.

Other Considerations

Specifications

See Appendix A-2 for specs including:

  • Frequency Output

  • Counter Input Frequency

  • Minimum High & Low Time

  • "Interrupt" Total Edge Rate

System Timer

Complications can occur if streaming while enabling a DIO-EF that requires the use of a system timer. Please contact LabJack support if you need to do this.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.