« Close

Datasheets and User Guides

App Notes

Software & Driver

 

13.2 DIO Extended Features [T-Series Datasheet]

DIO Extended Features 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.

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 table 13.2-1 or 13.2-2.
  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_OPTIONS 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.)

Available DIO-EF Features: A brief overview of each of the features is as follows:

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.

Name Start Address Type Access
DIO#(0:22)_EF_ENABLE 44000 UINT32 R/W
DIO#(0:22)_EF_ENABLE
- Starting Address: 44000
1 = enabled. 0 = disabled. Must be disabled during configuration. Note that DIO-EF reads work when disabled and do not return an error.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_ENABLE, DIO1_EF_ENABLE, DIO2_EF_ENABLE, DIO3_EF_ENABLE, DIO4_EF_ENABLE, DIO5_EF_ENABLE, DIO6_EF_ENABLE, DIO7_EF_ENABLE, DIO8_EF_ENABLE, DIO9_EF_ENABLE, DIO10_EF_ENABLE, DIO11_EF_ENABLE, DIO12_EF_ENABLE, DIO13_EF_ENABLE, DIO14_EF_ENABLE, DIO15_EF_ENABLE, DIO16_EF_ENABLE, DIO17_EF_ENABLE, DIO18_EF_ENABLE, DIO19_EF_ENABLE, DIO20_EF_ENABLE, DIO21_EF_ENABLE, DIO22_EF_ENABLE Show All 44000, 44002, 44004, 44006, 44008, 44010, 44012, 44014, 44016, 44018, 44020, 44022, 44024, 44026, 44028, 44030, 44032, 44034, 44036, 44038, 44040, 44042, 44044 Show All

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.

Name Start Address Type Access
DIO#(0:22)_EF_INDEX 44100 UINT32 R/W
DIO#(0:22)_EF_INDEX
- Starting Address: 44100
An index to specify the feature you want.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_INDEX, DIO1_EF_INDEX, DIO2_EF_INDEX, DIO3_EF_INDEX, DIO4_EF_INDEX, DIO5_EF_INDEX, DIO6_EF_INDEX, DIO7_EF_INDEX, DIO8_EF_INDEX, DIO9_EF_INDEX, DIO10_EF_INDEX, DIO11_EF_INDEX, DIO12_EF_INDEX, DIO13_EF_INDEX, DIO14_EF_INDEX, DIO15_EF_INDEX, DIO16_EF_INDEX, DIO17_EF_INDEX, DIO18_EF_INDEX, DIO19_EF_INDEX, DIO20_EF_INDEX, DIO21_EF_INDEX, DIO22_EF_INDEX Show All 44100, 44102, 44104, 44106, 44108, 44110, 44112, 44114, 44116, 44118, 44120, 44122, 44124, 44126, 44128, 44130, 44132, 44134, 44136, 44138, 44140, 44142, 44144 Show All

DIO-EF Options and 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.

Name Start Address Type Access
DIO#(0:22)_EF_OPTIONS 44200 UINT32 R/W
DIO#(0:22)_EF_OPTIONS
- Starting Address: 44200
Function dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_OPTIONS, DIO1_EF_OPTIONS, DIO2_EF_OPTIONS, DIO3_EF_OPTIONS, DIO4_EF_OPTIONS, DIO5_EF_OPTIONS, DIO6_EF_OPTIONS, DIO7_EF_OPTIONS, DIO8_EF_OPTIONS, DIO9_EF_OPTIONS, DIO10_EF_OPTIONS, DIO11_EF_OPTIONS, DIO12_EF_OPTIONS, DIO13_EF_OPTIONS, DIO14_EF_OPTIONS, DIO15_EF_OPTIONS, DIO16_EF_OPTIONS, DIO17_EF_OPTIONS, DIO18_EF_OPTIONS, DIO19_EF_OPTIONS, DIO20_EF_OPTIONS, DIO21_EF_OPTIONS, DIO22_EF_OPTIONS Show All 44200, 44202, 44204, 44206, 44208, 44210, 44212, 44214, 44216, 44218, 44220, 44222, 44224, 44226, 44228, 44230, 44232, 44234, 44236, 44238, 44240, 44242, 44244 Show All

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.

Name Start Address Type Access
DIO#(0:22)_EF_CONFIG_A 44300 UINT32 R/W
DIO#(0:22)_EF_CONFIG_B 44400 UINT32 R/W
DIO#(0:22)_EF_CONFIG_C 44500 UINT32 R/W
DIO#(0:22)_EF_CONFIG_D 44600 UINT32 R/W
DIO#(0:22)_EF_CONFIG_A
- Starting Address: 44300
Function dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_CONFIG_A, DIO1_EF_CONFIG_A, DIO2_EF_CONFIG_A, DIO3_EF_CONFIG_A, DIO4_EF_CONFIG_A, DIO5_EF_CONFIG_A, DIO6_EF_CONFIG_A, DIO7_EF_CONFIG_A, DIO8_EF_CONFIG_A, DIO9_EF_CONFIG_A, DIO10_EF_CONFIG_A, DIO11_EF_CONFIG_A, DIO12_EF_CONFIG_A, DIO13_EF_CONFIG_A, DIO14_EF_CONFIG_A, DIO15_EF_CONFIG_A, DIO16_EF_CONFIG_A, DIO17_EF_CONFIG_A, DIO18_EF_CONFIG_A, DIO19_EF_CONFIG_A, DIO20_EF_CONFIG_A, DIO21_EF_CONFIG_A, DIO22_EF_CONFIG_A Show All 44300, 44302, 44304, 44306, 44308, 44310, 44312, 44314, 44316, 44318, 44320, 44322, 44324, 44326, 44328, 44330, 44332, 44334, 44336, 44338, 44340, 44342, 44344 Show All
DIO#(0:22)_EF_CONFIG_B
- Starting Address: 44400
Function dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_CONFIG_B, DIO1_EF_CONFIG_B, DIO2_EF_CONFIG_B, DIO3_EF_CONFIG_B, DIO4_EF_CONFIG_B, DIO5_EF_CONFIG_B, DIO6_EF_CONFIG_B, DIO7_EF_CONFIG_B, DIO8_EF_CONFIG_B, DIO9_EF_CONFIG_B, DIO10_EF_CONFIG_B, DIO11_EF_CONFIG_B, DIO12_EF_CONFIG_B, DIO13_EF_CONFIG_B, DIO14_EF_CONFIG_B, DIO15_EF_CONFIG_B, DIO16_EF_CONFIG_B, DIO17_EF_CONFIG_B, DIO18_EF_CONFIG_B, DIO19_EF_CONFIG_B, DIO20_EF_CONFIG_B, DIO21_EF_CONFIG_B, DIO22_EF_CONFIG_B Show All 44400, 44402, 44404, 44406, 44408, 44410, 44412, 44414, 44416, 44418, 44420, 44422, 44424, 44426, 44428, 44430, 44432, 44434, 44436, 44438, 44440, 44442, 44444 Show All
DIO#(0:22)_EF_CONFIG_C
- Starting Address: 44500
Function dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_CONFIG_C, DIO1_EF_CONFIG_C, DIO2_EF_CONFIG_C, DIO3_EF_CONFIG_C, DIO4_EF_CONFIG_C, DIO5_EF_CONFIG_C, DIO6_EF_CONFIG_C, DIO7_EF_CONFIG_C, DIO8_EF_CONFIG_C, DIO9_EF_CONFIG_C, DIO10_EF_CONFIG_C, DIO11_EF_CONFIG_C, DIO12_EF_CONFIG_C, DIO13_EF_CONFIG_C, DIO14_EF_CONFIG_C, DIO15_EF_CONFIG_C, DIO16_EF_CONFIG_C, DIO17_EF_CONFIG_C, DIO18_EF_CONFIG_C, DIO19_EF_CONFIG_C, DIO20_EF_CONFIG_C, DIO21_EF_CONFIG_C, DIO22_EF_CONFIG_C Show All 44500, 44502, 44504, 44506, 44508, 44510, 44512, 44514, 44516, 44518, 44520, 44522, 44524, 44526, 44528, 44530, 44532, 44534, 44536, 44538, 44540, 44542, 44544 Show All
DIO#(0:22)_EF_CONFIG_D
- Starting Address: 44600
Function dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
  • T7:
Expanded Names Addresses
DIO0_EF_CONFIG_D, DIO1_EF_CONFIG_D, DIO2_EF_CONFIG_D, DIO3_EF_CONFIG_D, DIO4_EF_CONFIG_D, DIO5_EF_CONFIG_D, DIO6_EF_CONFIG_D, DIO7_EF_CONFIG_D, DIO8_EF_CONFIG_D, DIO9_EF_CONFIG_D, DIO10_EF_CONFIG_D, DIO11_EF_CONFIG_D, DIO12_EF_CONFIG_D, DIO13_EF_CONFIG_D, DIO14_EF_CONFIG_D, DIO15_EF_CONFIG_D, DIO16_EF_CONFIG_D, DIO17_EF_CONFIG_D, DIO18_EF_CONFIG_D, DIO19_EF_CONFIG_D, DIO20_EF_CONFIG_D, DIO21_EF_CONFIG_D, DIO22_EF_CONFIG_D Show All 44600, 44602, 44604, 44606, 44608, 44610, 44612, 44614, 44616, 44618, 44620, 44622, 44624, 44626, 44628, 44630, 44632, 44634, 44636, 44638, 44640, 44642, 44644 Show All

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”.

Name Start Address Type Access
DIO#(0:21)_EF_READ_A 3000 UINT32 R
DIO#(0:21)_EF_READ_B 3200 UINT32 R
DIO#(0:21)_EF_READ_A_F 3500 FLOAT32 R
DIO#(0:21)_EF_READ_B_F 3700 FLOAT32 R
DIO#(0:21)_EF_READ_A
- Starting Address: 3000
Reads an unsigned integer value. The meaning of the integer is dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Read-only
  • This register may be streamed
Expanded Names Addresses
DIO0_EF_READ_A, DIO1_EF_READ_A, DIO2_EF_READ_A, DIO3_EF_READ_A, DIO4_EF_READ_A, DIO5_EF_READ_A, DIO6_EF_READ_A, DIO7_EF_READ_A, DIO8_EF_READ_A, DIO9_EF_READ_A, DIO10_EF_READ_A, DIO11_EF_READ_A, DIO12_EF_READ_A, DIO13_EF_READ_A, DIO14_EF_READ_A, DIO15_EF_READ_A, DIO16_EF_READ_A, DIO17_EF_READ_A, DIO18_EF_READ_A, DIO19_EF_READ_A, DIO20_EF_READ_A, DIO21_EF_READ_A Show All 3000, 3002, 3004, 3006, 3008, 3010, 3012, 3014, 3016, 3018, 3020, 3022, 3024, 3026, 3028, 3030, 3032, 3034, 3036, 3038, 3040, 3042 Show All
DIO#(0:21)_EF_READ_B
- Starting Address: 3200
Reads an unsigned integer value. The meaning of the integer is dependent on selected feature index.
  • Data type: UINT32  (type index = 1)
  • Read-only
  • This register may be streamed
Expanded Names Addresses
DIO0_EF_READ_B, DIO1_EF_READ_B, DIO2_EF_READ_B, DIO3_EF_READ_B, DIO4_EF_READ_B, DIO5_EF_READ_B, DIO6_EF_READ_B, DIO7_EF_READ_B, DIO8_EF_READ_B, DIO9_EF_READ_B, DIO10_EF_READ_B, DIO11_EF_READ_B, DIO12_EF_READ_B, DIO13_EF_READ_B, DIO14_EF_READ_B, DIO15_EF_READ_B, DIO16_EF_READ_B, DIO17_EF_READ_B, DIO18_EF_READ_B, DIO19_EF_READ_B, DIO20_EF_READ_B, DIO21_EF_READ_B Show All 3200, 3202, 3204, 3206, 3208, 3210, 3212, 3214, 3216, 3218, 3220, 3222, 3224, 3226, 3228, 3230, 3232, 3234, 3236, 3238, 3240, 3242 Show All
DIO#(0:21)_EF_READ_A_F
- Starting Address: 3500
Reads a floating point value. The meaning of value is dependent on selected feature index.
  • Data type: FLOAT32  (type index = 3)
  • Read-only
Expanded Names Addresses
DIO0_EF_READ_A_F, DIO1_EF_READ_A_F, DIO2_EF_READ_A_F, DIO3_EF_READ_A_F, DIO4_EF_READ_A_F, DIO5_EF_READ_A_F, DIO6_EF_READ_A_F, DIO7_EF_READ_A_F, DIO8_EF_READ_A_F, DIO9_EF_READ_A_F, DIO10_EF_READ_A_F, DIO11_EF_READ_A_F, DIO12_EF_READ_A_F, DIO13_EF_READ_A_F, DIO14_EF_READ_A_F, DIO15_EF_READ_A_F, DIO16_EF_READ_A_F, DIO17_EF_READ_A_F, DIO18_EF_READ_A_F, DIO19_EF_READ_A_F, DIO20_EF_READ_A_F, DIO21_EF_READ_A_F Show All 3500, 3502, 3504, 3506, 3508, 3510, 3512, 3514, 3516, 3518, 3520, 3522, 3524, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542 Show All
DIO#(0:21)_EF_READ_B_F
- Starting Address: 3700
Reads a floating point value. The meaning of value is dependent on selected feature index.
  • Data type: FLOAT32  (type index = 3)
  • Read-only
Expanded Names Addresses
DIO0_EF_READ_B_F, DIO1_EF_READ_B_F, DIO2_EF_READ_B_F, DIO3_EF_READ_B_F, DIO4_EF_READ_B_F, DIO5_EF_READ_B_F, DIO6_EF_READ_B_F, DIO7_EF_READ_B_F, DIO8_EF_READ_B_F, DIO9_EF_READ_B_F, DIO10_EF_READ_B_F, DIO11_EF_READ_B_F, DIO12_EF_READ_B_F, DIO13_EF_READ_B_F, DIO14_EF_READ_B_F, DIO15_EF_READ_B_F, DIO16_EF_READ_B_F, DIO17_EF_READ_B_F, DIO18_EF_READ_B_F, DIO19_EF_READ_B_F, DIO20_EF_READ_B_F, DIO21_EF_READ_B_F Show All 3700, 3702, 3704, 3706, 3708, 3710, 3712, 3714, 3716, 3718, 3720, 3722, 3724, 3726, 3728, 3730, 3732, 3734, 3736, 3738, 3740, 3742 Show All

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.

Name Start Address Type Access
DIO#(0:21)_EF_READ_A_AND_RESET 3100 UINT32 R
DIO#(0:21)_EF_READ_A_F_AND_RESET 3600 FLOAT32 R
DIO#(0:21)_EF_READ_A_AND_RESET
- Starting Address: 3100
Reads the same value as DIO#(0:22)_EF_READ_A and forces a reset.
  • Data type: UINT32  (type index = 1)
  • Read-only
  • This register may be streamed
Expanded Names Addresses
DIO0_EF_READ_A_AND_RESET, DIO1_EF_READ_A_AND_RESET, DIO2_EF_READ_A_AND_RESET, DIO3_EF_READ_A_AND_RESET, DIO4_EF_READ_A_AND_RESET, DIO5_EF_READ_A_AND_RESET, DIO6_EF_READ_A_AND_RESET, DIO7_EF_READ_A_AND_RESET, DIO8_EF_READ_A_AND_RESET, DIO9_EF_READ_A_AND_RESET, DIO10_EF_READ_A_AND_RESET, DIO11_EF_READ_A_AND_RESET, DIO12_EF_READ_A_AND_RESET, DIO13_EF_READ_A_AND_RESET, DIO14_EF_READ_A_AND_RESET, DIO15_EF_READ_A_AND_RESET, DIO16_EF_READ_A_AND_RESET, DIO17_EF_READ_A_AND_RESET, DIO18_EF_READ_A_AND_RESET, DIO19_EF_READ_A_AND_RESET, DIO20_EF_READ_A_AND_RESET, DIO21_EF_READ_A_AND_RESET Show All 3100, 3102, 3104, 3106, 3108, 3110, 3112, 3114, 3116, 3118, 3120, 3122, 3124, 3126, 3128, 3130, 3132, 3134, 3136, 3138, 3140, 3142 Show All
DIO#(0:21)_EF_READ_A_F_AND_RESET
- Starting Address: 3600
Reads a floating point value and forces a reset. The meaning of value is dependent on selected feature index.
  • Data type: FLOAT32  (type index = 3)
  • Read-only
Expanded Names Addresses
DIO0_EF_READ_A_F_AND_RESET, DIO1_EF_READ_A_F_AND_RESET, DIO2_EF_READ_A_F_AND_RESET, DIO3_EF_READ_A_F_AND_RESET, DIO4_EF_READ_A_F_AND_RESET, DIO5_EF_READ_A_F_AND_RESET, DIO6_EF_READ_A_F_AND_RESET, DIO7_EF_READ_A_F_AND_RESET, DIO8_EF_READ_A_F_AND_RESET, DIO9_EF_READ_A_F_AND_RESET, DIO10_EF_READ_A_F_AND_RESET, DIO11_EF_READ_A_F_AND_RESET, DIO12_EF_READ_A_F_AND_RESET, DIO13_EF_READ_A_F_AND_RESET, DIO14_EF_READ_A_F_AND_RESET, DIO15_EF_READ_A_F_AND_RESET, DIO16_EF_READ_A_F_AND_RESET, DIO17_EF_READ_A_F_AND_RESET, DIO18_EF_READ_A_F_AND_RESET, DIO19_EF_READ_A_F_AND_RESET, DIO20_EF_READ_A_F_AND_RESET, DIO21_EF_READ_A_F_AND_RESET Show All 3600, 3602, 3604, 3606, 3608, 3610, 3612, 3614, 3616, 3618, 3620, 3622, 3624, 3626, 3628, 3630, 3632, 3634, 3636, 3638, 3640, 3642 Show All

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

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.

Available DIO-EF By Device/Reference Tables

T4

 

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

T4 Digital I/O Extended Features AIN (0-3) FIO (4-7) EIO (0-7) CIO (0-3)
DIO
Feature Index# 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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        

T7

 

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

T7 Digital I/O Extended Features FIO (0-7) EIO (0-7) CIO (0-3) MIO (0-2)
DIO
Feature Index# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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.