LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How control relay (on/off) through digital output module in labview

Hello ,

 

        I have a problem with labview .. Actually I want to control a 12V electromechanical relay through digital output module to connect or disconnect the path .. The aim here is to control the connectivity of the load or component path (on/off)  using relay and NI 9474  ..

My question is how to build that in labview ..

if there is any example or tutorial that may help . Please post it for me 

 

Thanks a lot ,

0 Kudos
Message 1 of 16
(18,574 Views)

Hi Amnaa

 

Welcome to the forums.

What troubleshooting steps have you taken?

Are you able to control the relay through MAX (Measurement and Automation Explorer)? You should be able to manually switch the digital lines high and low from MAX to test its functionality.

Writing data to the digital output lines will be done using DAQmx. The best place to find an example will be using the inbuilt example finder which LabVIEW provides.

Help >> Find Examples >> 'Hardware Input and Output' >> DAQmx >> 'Digital Output' and look through the examples there.

 

The 9474 is a sourcing Digital Output module therefore it has to be supplied with a source to output (i.e.. 12V in this instance). Please refer to the manual here to ensure that you have it properly connected and do not risk damaging the module by operating it outside of its specification.

 

Kind Regards

Chris | Applications Engineer NIUK
Message 2 of 16
(18,559 Views)

Dear Sir, 

 

             Thanks for relpying but I got confused I am not a Pro in labview..  from what I know .. I will connect the digital output module to relay .so

 the path is on when  digital output module sends a pulse to relay to connect and 

 the path is off when there is no signal to send ..

Isn't that correct ?

 

My question is I don't know how to build that in labview .. Iam looking for an example of vi that uses relay and digital output module to connect and disconnect the path ..

 

sorry I know I'm demanding alot .. I searched about it and I got nothing helpful

 

but really thanks for your reply .. 

(\__/)
(^__^)o0O [ you Made ma Day ]
.(v v)

0 Kudos
Message 3 of 16
(18,550 Views)

Just search for the digital output examples as already stated.  When you turn the digital output on, it will output 5V in the line you told it.  This 5V will then either energize or deenergize your relay (depends on the exact circuit).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 16
(18,547 Views)

Thanks for your reply 

0 Kudos
Message 5 of 16
(18,543 Views)

remember....DO is a ttl signal and not a source. you will have to buffer it or use some kind of driver(transistor,mosfet,optocoupler,ssr,ect....),because you will damage it.

Message 6 of 16
(18,536 Views)

Read the manual

 

http://www.ni.com/pdf/manuals/373509e.pdf

 

page 11

Message 7 of 16
(18,522 Views)

Ahaaa .. Okey ..Got your point .. Thanks for that.. ^__^

 

but still my question is unanswered ..

 

wanna know more about >>> guess what >>>>VI of digital output module and relay to connect and disconnect the path of load 

 

I looked for examples but I didn't find what I need

 

THANKS a lot .. I really appreciate your help  ^__^

0 Kudos
Message 8 of 16
(18,515 Views)

I think you get confused with some stuff in your system....

 

  • The PC is running software. In your case, this would be a LV VI. Chris (hicks) already pointed you to valuable examples for this.
  • Software can control, using an Application Programming Interface (API) of a driver, hardware. In your case the driver is DAQmx and the hardware is the 9474. See the examples Chris refers to.
  • The 9474 simple closes a relay if the driver (effectively your VI using the API) tells it to do so. Since the 9474 does not drive the output, you have to connect an external power source just as RavensFan posted previously.

 

So essentially, the VI only tells the 9474 to open or close the relay. Depending on the external power/relay connection, this could result in "negative logic". So "open the relay" might result in "ON".

 

So i wonder what you are asking for.

a) a VI using DAQmx API to control the 9474. Refer to Chris suggestions here.

b) connecting a power source and the relay to the 9474 (external connections). Refer to the manual as RavensFan posted.

 

hope this helps,

Norbert

 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 9 of 16
(18,506 Views)

Look at Hicks examples again.  There are lots of DAQmx examples including ones on digital outputs.  If anything, there are too many examples.  All you need is a DAQmx Write set for digital output, 1 channel 1 sample.  Boolean

 

For a relay, you just need to match an external power source with a relay, and pick a relay that doesn't draw too much current in its coil that would exceed the 1 A rating of the digital output channel.

 

0 Kudos
Message 10 of 16
(18,503 Views)