LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Powering an electromechanical relay with an NI-9481 module.

 I am trying to use an NI-9481 on an NI cDAQ-9172 to generate a digital output voltage to power an electromechanical relay. I can manage to switch the different channels of the NI-9481 on and off; however, the electromechanical relay I am attempting to power refuses to turn on. Is it truly possible to generate a voltage using the digital output on the NI-9481? If so, what logic would I use for labVIEW 8.0 to create this voltage? Thanks in advance for any help with my problem.

Nick
0 Kudos
Message 1 of 32
(5,942 Views)

It sounds like you are only asking part of the question.

To pick a relay requires work so the question is "Does the output provide enough power?"

Power (in DC) is current X Voltage.

Add to that

current = voltage / resistance

and you should be able to check the spec on your relay and the DO lines and answer this Q.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 32
(5,936 Views)

Nick,

It looks like the 9481 is a SPST relay device - it will not generate a voltage to turn on your external relay.  You can use the 9481 to switch on power for an external device.  Look at page 8 & 9 of the 9481 spec (http://www.ni.com/pdf/manuals/373507c.pdf).

-cb

0 Kudos
Message 3 of 32
(5,933 Views)
Thanks for the help. I found an external power supply and solved my problem. Now I have a few more questions.

First, can I output a voltage with the NI-9205 module running on the same cDAQ? If so, how?

Second, what labVIEW logic would I use to fire three of the four channels in my NI-9481 relay in a given sequence as input by the user? (Example: Channel 1 cycles on for 8 minutes, switches off for a day and a half, then channel 2 cycles on for eight minutes, then switches off, then channel 3 cycles on immediately for 2 minutes, then switches off.)
0 Kudos
Message 4 of 32
(5,921 Views)
To program your relay sequence, use a State Machine with any of the several Timer functions. Personally, I like to use the Event Structure with the state machine inside the Timeout event.

I'll see if I can whip up a quick example.

B-)
0 Kudos
Message 5 of 32
(5,911 Views)
This should give you a general idea of using a state diagram and event structure to control your sequence. I don't have the code to communicate with your NI-9481 module, but you can get the general idea.

I based it on the following default sequence: (I used seconds for testing instead of minutes or days, of course)

Initialize - All Relays OFF
(User Presses Start)
Cycle 1 - Relay 1 ON - 8 Seconds
Cycle 2 - All Relays OFF - 30 Seconds
Cycle 3 - Relay 2 ON - 8 seconds
Cycle 4 - Relay 3 ON - 2 seconds
Stop- All Relays OFF - Until Start

Hope this helps!

B-)
Download All
Message 6 of 32
(5,893 Views)
Thanks for the fast response. Is there any way to convert this example vi to use in labVIEW 8.0?
0 Kudos
Message 7 of 32
(5,889 Views)
Sorry about that. The previous version was in 8.2. These should be 8.0.

B-)
Download All
Message 8 of 32
(5,884 Views)

Hi everyone,

LabViewGuruWannabe, it’s great to see such clean and organized code!

nick525, you will not be able to generate a voltage from the 9205 in cDAQ. The DO0 line is only available for use with cRIO. The KnowledgeBase Article: Using the Digital Output and PFI Lines of the 9205/6 with Compact DAQ explains the difference of functionality of the 9205 in cDAQ versus cRIO.

Please post back if you have any questions. Have a great day!

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 9 of 32
(5,856 Views)
Thanks for all of the help guys, I really appreciate it, especially with the state machine. It's such a useful tool in labVIEW and I really had no idea how to use one. Thanks again!
0 Kudos
Message 10 of 32
(5,849 Views)