How Do I Program My C Series Relay Module?

Updated May 3, 2018

Reported In

Hardware

  • NI-9482
  • NI-9481
  • NI-9485

Software

  • LabVIEW 2014 Full
  • LabVIEW 2014 Base

Driver

  • NI-DAQmx

Issue Details

I have a C Series relay module in the 948x family, and I want to program it to provide a digital output using either DAQmx tasks or DAQ Assistant. How can I do this?

Solution

This can be done via interactive configuration with the DAQ Assistant or with DAQmx API functions. The relays can be configured as a line or port.

Figure 1: Relay Configuration Used in DAQ Assistant and DAQmx API Examples Below
 
In DAQ Assistant
  1. Place the DAQ Assistant onto the block diagram. 
  2. The Create New Express Task dialog will display. Expand Generate Signals»Digital Out to select either Line Output or Port Output.
    • A port output uses one channel for all lines.
    • A line output uses one channel for each line.
  3. Use the radio buttons as indicated in the images below to define the boolean state.

Figure 2: Configure 4 Channels on the NI 948x for Line Output

Figure 3: Configure 4 Channels on the NI 948x for Port Output
 
DAQmx API 
  1. Create a Digital Output channel. Select the appropriate Line Grouping for either port or line output.
  2. Write the data as an array of boolean constants to the DAQmx Write VI. In this example, a True value is defined for the Auto Start parameter, which eliminates the need of the DAQmx Start VI.

Figure 4: Configure 4 Channels on the NI 948x for Port and Line Output
 
cRIO:
The NI 948x modules can also be programmed using cRIO in scan interface or FPGA mode.
 

Additional Information

How are relay modules programmed in NI-DAQmx?
The NI 948x is a digital output relay module controlled with boolean commands.  When a True value is written to a channel, the relay is closed and the terminal that is connected to the load allows current to flow or allows voltage to be applied to the load. When a False value is written to a channel, the switch opens, disconnecting the circuit so no current flows and no voltage is applied to the load.  The image below is the NI 948x in an open or boolean False state.
 

Figure 5: NI 948x in an Open or boolean False state
 
 

WAS THIS ARTICLE HELPFUL?

Not Helpful