1. NI 272x Fundamentals
Programmable resistors are test modules that replicate the behavior of resistance-based inputs and outputs such as potentiometers, RTDs, voltage dividers, and bridge elements.
The NI 272x programmable resistor modules programmatically control the values of resistance appearing through an I/O connector. This ability enables the resistors’ usage in hardware-in-the-loop (HIL) validation, which performs rapid system tests during a variety of simulated system conditions. During production, NI 272x modules provide complete resistance test coverage on up to 18 test elements in a single PXI(e) slot.
The four NI 272x resistor modules share the same principal architecture. The modules differ in the number of channels per module and the resistance range per channel, as shown in Table 1.
Table 1. NI 272x Resistor Modules
|Module number||Bits per channel||Number of channels||Resistance range per channel|
Refer to the NI Switches Help and your NI 272x module Specifications for more information about the NI 272x devices. This documentation can be accessed from the National Instruments Product Manuals Library at ni.com/manuals.
2. NI-272x Reference VIs Example Programs
Once you have installed the NI-272x Reference VIs, you can use the NI Example Finder to search for or browse NI 272x examples. Search examples by keyword to find a particular device or measurement VI. To browse the NI 272x examples available in LabVIEW, launch LabVIEW, and select Help»Find Examples. To browse examples by task, select Hardware Input and Output»Modular Instruments»NI-272x (Programmable Resistor Modules). To browse examples by directory structure, select instr»ni272xReferenceVIs.
3. Programming with the NI-272x Reference VIs
Note: NI recommends using the NI-272x Reference VIs to program the NI 272x modules. Download the NI-272x Reference VIs at ni.com/drivers by searching for “NI 272x.”
Note: The NI-272x Reference VIs are designed to operate as a virtualized reference architecture between the user and the underlying device-native NI-DAQmx driver. NI reserves the right to change the NI-272x Reference VIs in the future to meet specialized customer needs.
Caution: Do not use the NI-272x Reference VIs within time- critical loops. If the switch must operate in a time- critical loop, use the NI-DAQmx API instead of the NI-272x Reference VIs.
The NI-272x Reference VIs provide session-based device support for the NI 272x modules. These VIs provide utility functions to convert a user-defined resistance or temperature into a list of the corresponding relays to open or close, then applies the lists to hardware. The NI-272x Reference VIs are written for the LabVIEW programming environment and require NI-DAQmx 9.5 or later.
4. Basic Functions
ni272x Initialize Session VI
The ni272x Initialize Session VI opens a session to all channels on a single NI 272x device specified by the DAQmx Device Name parameter. Only one session per NI 272x device is permitted. Calling the ni272x Initialize Session VI multiple times invalidates previous sessions.
Connect and Disconnect Operations
ni272x Connect (Poly) VI
The ni272x Connect VIs allow multiple connection operations. The operations supported are:
- Connect two adjacent channels using the ni272x Connect 2Chan VI
- Connect two adjacent banks using the ni272x Connect 2Bank VI
- Connect a channel to the front panel test connector using the ni272x Connect to Connector 1Chan VI
Under most conditions, the ni272x Connect 2Chan VI should be used. The ni272x Connect 2Bank VI controls the hardware level banks, and should be used only if the low-level hardware configuration is thoroughly understood. The ni272x Connect 2Chan VI controls the software level channels. All NI 272x modules are composed of 8-bit banks. On 8-bit modules, each channel is composed of one bank. For example, channel 4 is composed of bank 4. On 16-bit modules, each channel is composed of two adjacent 8-bit banks. For example, channel 1 is composed of banks 2 and 3. Using the higher level channel calls abstracts the underlying architecture. Under most conditions, the ni272x Connect 2Chan VI should be used.
The ni272x Connect 2Chan VI addresses the software channels exposed to the user. For example, in the 16-bit example above, CH0 maps to banks 0 and 1, and CH1 maps to banks 2 and 3. Therefore, CH0+ maps to hardware bank1+, and CH1- maps to hardware bank2-. See the 272x device pinouts in the NI Switches Help for a complete listing of channel and bank connections.
The ni272x Connect 2Chan VI allows manual connection of adjacent software channels. For example, calling ni272x Connect 2Chan VI on a 16-bit module with channel N set to “0” and channel N + 1 set to “1” internally connects CH0+ to CH1-, creating two 16-bit resistors in series. These resistors could be used as a voltage divider or to create a dual N bit potentiometer. Multiple channels can be simultaneously connected. For example, connecting four channels together creates four series resistors, each of which is accessible via the front panel.
Similarly, the ni272x Connect to Connector 1Chan VI allows manual connection of channels to the front test connectors on your NI 272x module. The channels can connect to one of two channels: the "DUT Connector" or the "DMM Test Connector." The NI-272x Reference VIs only allow one channel to be simultaneously connected to the "DMM Test Connector."
Some NI 272x hardware topologies require an adjacent bank be disconnected from the "DUT Connector" before being utilized for connection to the "DMM Test Connector." The NI-272x Reference VIs will display an error if the required adjacent channel has been reserved for connection to a DUT. Likewise, operations on a reserved adjacent channel will fail until the selected channel has been disconnected from the "DMM Test Connector."
Caution: Be careful when using the ni272x Connect (Poly) VI with "ni272x Connector Identifier" set to "DMM Test Connector.” 8-bit modules require the reservation of an adjacent DUT channel, which causes the adjacent channel to be shunted to 0 Ohms in order to measure the channel under test. This may short out a DUT attached to the adjacent reserved channel. Therefore, NI recommends disconnecting the 37-pin DSUB connector on 8 bit modules before internally connecting channels to the DMM test connector.
ni272x Disconnect (Poly) VI
The ni272x Disconnect (Poly) VIs allow multiple disconnection operations. The operations supported are:
- Disconnect two channels using the ni272x Disconnect 2Chan VI
- Disconnect two banks using the ni272x Disconnect 2Bank VI
- Disconnect channel from front panel test connector using the ni272x Disconnect from Connector 1Chan VI
The ni272x Disconnect 2Bank VI controls the hardware level banks. The ni272x Disconnect 2Chan VI controls the software level channels by allowing manual disconnection of adjacent software channels.
Similarly, the ni272x Disconnect from Connector 1Chan VI allows manual disconnection of channels to the front test connectors on your NI 272x module.
ni272x Write (poly) VI
The ni272x Write (Poly) VI contains the following VIs:
ni272x Write Potentiometer 2Chan 1Samp VI
ni272x Write Resistance 1Chan 1Samp VI
ni272x Write Temperature 1Chan 1Samp VI
The ni272x Write Resistance 1Chan 1Samp VI and ni272x Write Temperature 1Chan 1Samp VI are used to set the corresponding resistance or temperature for each channel. Unit conversion VIs allow you to convert between resistance and temperature. For an example, see the block diagram of the ni272x Write Temperature 1Chan 1Samp VI.
The ni272x Write Potentiometer 2Chan 1Samp VI operates like a potentiometer. This VI connects channel N and channel N+1 together, sets channel N to closest channel N resistance, and sets channel N+1 to total potentiometer resistance minus coerced channel N resistance.
Note: Both legs of the potentiometer execute in parallel, so there’s a short period of time during relay settling when the physical resistance sum across both channels can be less than the user-defined total potentiometer resistance.
The ni272x Write Resistance 1Chan 1Samp VI determines and configures a coerced resistance value based on the requested resistance input for the device initialized in the ni272x Initialize Session VI. If you request a value that exceeds the maximum resistance of the device, error out returns an error. The coerced resistance displays the coerced output resistance available based the requested resistance values and the limitations of the initialized device.
The NI 272x modules use reed relays that settle over a period of milliseconds. During a resistance change, the driver outputs an intermediate resistance that is always higher than the requested value. Higher resistances are guaranteed on a single channel because the relays are always opened before they are closed. For example, if four relays in a bank are open and four relays are closed, calling the ni272x Write Resistance 1Chan 1Samp VI with an output that would require two relays to open and six relays to close will have an intermediate state where up to two additional relays are guaranteed to open before the additional relays close.
Note: This protection only exists per software channel. Connecting multiple channels with the ni272x Connect Channels VI and calling multiple ni272x Set Resistance VIs guarantees that the intermediate resistance on a given channel is higher than the current or final resistance.
The ni272x Write Temperature 1Chan 1Samp VI converts the requested temperature and Callendar-Van Dusen RTD parameters into a resistance. The VI outputs a resistance value based on the Requested Temperature, then calls the ni272x Write Resistance 1Chan 1Samp VI to set the resistance to the value outputted. Custom A, B and C Callendar-Van Dusen RTD parameters are required inputs. Values correspond to the physical characteristics of the RTD you wish to simulate.
ni272x Close Session VI
The ni272x Close Session VI allows you to close the session initialized by the ni272x Initialize Session VI.
5. Advanced Functions
ni272x Relay Control (Poly) VI
The ni272x Relay Control VI allows you to specify relays to open and close. The operations supported are:
- Open and close multiple relays using the ni272x Relay Control Multiple VI
- Open and close multiple relays using the ni272x Relay Control Single VI
Refer to the Hardware Fundamentals section of this document or your device book in the NI Switches Help for more information about individual relay names.
Temperature and Resistance
ni272x Temperature to Resistance VI
Converts from a Temperature in degrees Celsius to a Resistance in ohms given a set of Callendar-Van Dusen RTD Parameters for the device initialized by the ni272x Initialize Session VI.
ni272x Resistance to Temperature VI
Converts from a Resistance in ohms to a Temperature in degrees Celsius given a set of Callendar-Van Dusen RTD Parameters for the device initialized by the ni272x Initialize Session VI.
ni272x Get Attribute (Poly) VI
The ni272x Get Attribute (Poly) VIs return attributes (either integers or strings) specified by for a device or a device's resistor channel initialized by the ni272x Initialize Session VI. The VIs included are:
- ni272x Get Attribute Device String VI
- ni272x Get Attribute Device U8 VI
- ni272x Get Attribute Device Boolean VI
- ni272x Get Attribute Channel Single VI
- ni272x Get Attribute Channel Single VI
Additional low-level VIs can be found in the ni272xReferenceVIs.llb library in your LabVIEW directory under
6. NI 272x Hardware Fundamentals
This section explains the interconnections between relays, resistors, and banks on all NI 272x modules. This information is useful if you are using the lower-level DAQmx or NI-SWITCH APIs. However, NI recommends using the NI-272x Reference VIs for the easiest programming experience. If not using these reference VIs, NI recommends using the low-level NI-SWITCH or NI-DAQmx relay control VIs or functions instead of the connect channel VIs or functions. The DAQmx Relay API supports closing multiple relays in a single driver call, which is faster than the channel API.
NI 272x modules all share the same topology. The number of populated banks and the number of banks used per channel differ on each of the four modules. A single bank consists of the components shown in Figure 1.
Figure 1. Single 8-bit Bank
The total resistance across each bank, measured across the To Front Connector terminals, is controlled by manipulating the circuit path resistance using relays to selectively route through discrete resistors. This path manipulation is achieved as follows.
- An adjacent bank connect relay is placed between each bank to connect banks together internally. The placement of the adjacent bank connect relays enables dynamic module configuration and easy DMM connectivity to measure actual resistance.
- Each bank contains a “bank connect” relay that opens and closes the path between the positive terminal of the bank and the front connector terminals. This path is open when the device is powered off or reset. Opening this path allows the user to select ‘infinite’ as a resistance value.
Caution: The negative terminal of a channel is always connected to the front panel. For example, only the "ch0+" node is connected/disconnected from the front panel via the kb0 relay. "ch0-" remains connected to the DUT connector always.
- A resistor shunt relay is placed in parallel with each resistor. This creates a short circuit around the resistor when the relay is energized.
- Each bank contains a “bank shunt” relay that shorts the path between the bank’s front connectors. Since each relay nominally adds ~100mOhm, a bank short relay greatly decreases the 0 Ohm resistance. On 16-bit resistors, which require 2 banks, the bank short relay decreases overall path resistance at lower resistance values when all 8 resistors in the upper bank are shunted.
Table 2 lists the relay names with examples for each and numbered references to Figure 1.
Table 2. Relay Names
|Relay Name||Example||Figure 1 Reference|
|kbNrX||kb0r2 is the relay that controls the third relay (‘4R’) of bank 0||3|
|kbN||kb0 is the relay that controls the bank connect relay of bank 0||2|
|kbNshunt||kb0shunt is the relay that controls the short relay of bank 0||4|
|kbcNN+1||kbc01 is the relay that connects bank 0 to bank1||1|
The NI 272x hardware is composed of banks, but the NI-272x Reference VIs high-level operation are intended for use primarily with channels. The NI 2720 and NI 2725 consist of 8-bit channels, where each channel consists of one bank. The NI 2722 and NI 2727 consist of 16-bit channels that each consists of two adjacent banks.
Note: The NI Switches Help contains a complete diagram of each of the modules, including nominal discrete resistor values and channel/bank names.
Each bank is internally connected to two neighboring banks to form a chain. This allows connection of each bank to one or more neighboring banks to create multi bank resistance chains. On 8-bit modules, all banks are populated as R-128R, as shown in Figure 2. For 8-bit modules, R is 1 Ohm. On 16-bit modules, even banks are populated as R-128R while odd banks are populated as 256R-8192R. For 16-bit modules, R is 0.25 Ohms. Figure 2 shows two 8-bit banks. Changing the right bank to 256R-8192R yields a single 16-bit bank. Refer to your NI 272x device Specifications document for a complete hardware overview.
Figure 2. Two 8-bit Banks
Bank connect relays allow adjacent banks or channels to connect together internally. For example, you can connect two or more adjacent channels together to create a potentiometer, a voltage divider, or a multi segment resistor chain.
7. Test Circuit
The NI 272x modules have an internal, 2-wire, interleaved multiplexer that enables resistance verification when paired with a DMM. The variable nature of the contact resistance of the relays and the self-heating effects of resistors under load make calibration difficult. Utilization of the DMM test connector is accurate enough to verify the proper operation of the module and determine if resistance values have changed over time.
On 16-bit modules, resistance can be determined on each channel. On 8-bit modules, an adjacent bank must be connected to, and shunted, in order to measure the approximate resistance value. For example, to measure the resistance of bank 4, close kb5, kbc45, and kb5shunt to provide a direct path to the test circuit. This will produce a 0 Ohm shunt across bank 5. For this reason, NI recommends disconnecting the 37- pin DSUB connector before testing the 272x module. Lastly, close ktest2 and ktest3 to connect the DMM to the bank for resistance measurements. See the hardware diagram for a complete connections list.
Caution: For more accurate results, disconnect the 37-pin DSUB cable before connecting the test relays. Damage to the module can occur if an external DUT is able to source more than 1/4W through any single NI 272x channel.
Table 3. Accessories for the NI 272x Modules
|37-pin female to male shielded I/O cable, 1 m||778621-01|
|37-pin female to male shielded I/O cable, 2 m||778621-02|
|37-Pin solder cup terminals, D-SUB female shell w/strain relief||779184-01|
|High-voltage DIN-rail screw terminal block||779491-01|
|Crimp-and-poke 37-Pin D-SUB custom connectivity accessory||779185-01|
|Solder cup 37-Pin D-SUB custom connectivity accessory||779184-01|
|2 x 2 microfit DMM connector||782465-01|
The 37-pin D-SUB cable and terminal block interface the NI 272x module to DUTs. The 4-pin DMM test cable allows the test circuit to take 4-wire resistance measurements using an external DMM. The cable consists of an over molded 4-pin connector on the module side, and four banana plugs on the DMM side.
9. Error Codes
To view the NI-272x Reference VIs error codes and their descriptions, visit ni.com/info and enter the Info Code ex46xu.