To download NI software, including the products shown below, visit ni.com/downloads.
Overview
On/Off Relay Controller Program
Description
The program is setup for 4 analog input channels, 4 analog output channels. The program reads the AI in a loop controlled by the Wait function (software timed data acquisition). The analog data is then passed to the On-Off Control function, which turns on or off the relay based on the input set points and dead band. The Wait function constant is in ms, and can be changed based the need speed of control. On a Windows computer, the max loop speed is 10-100 Hz, depending on system hardware. This example could be modified to use PID control instead of On/Off control.
Requirements
Software:
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.