LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Commanding a solenoid and monitoring the output voltage

Hello!

I need to control and command the 120VAC solenoid through a DC-AC relay, how can I write codes in LabVIEW to switch ON/OFF the solenoid and monitoring the output voltage?

I got a USB-6002 and 1-channle DC5V relay module.

Thanks!

0 Kudos
Message 1 of 3
(87 Views)

You might not want to wire your USB-6002 directly to either the 5V Solenoid or the "output voltage (which I assume means 120 VAC, frequency unspecified).  What practical knowledge (or course instruction) do you have about capturing and generating signals?  Have you had a EE course on Signal Theory, and/or "practical design" for acquiring and generating signals?

 

Does DAQmx mean anything to you?  If not, I recommend "Learn 10 Functions in NI DAQ-mx and Handle 80 Percent of your Data Acquisition Applications".  Do not follow the advice in the first section -- avoid the Dreaded DAQ Assistant!

 

  • I just noticed that a Web search for "Learn 10 Functions" returns both a HTML document, which is how I learned DAQmx, and a Video, which may be easier to digest, but is "much less filling".

Bob Schor

 

0 Kudos
Message 2 of 3
(80 Views)

@Al1524 wrote:

Hello!

I need to control and command the 120VAC solenoid through a DC-AC relay, how can I write codes in LabVIEW to switch ON/OFF the solenoid and monitoring the output voltage?

I got a USB-6002 and 1-channle DC5V relay module.

Thanks!


Assuming that you got a 1-channel arduino compatible 5V relay, like the one pictured below (contains a transistor to control the relay),

santo_13_0-1735613907799.jpeg

Connect the following pins of relay module to 6001 as follows,

 

VCC -> +5V

GND -> DGND

IN -> any Px.y (like P0.1, read as Port 0, Line 1)

 

To control the relay, you can set the digital state of the Px.y using DAQmx APIs. Checkout the following example from Example finder.

santo_13_1-1735614143454.png

 

 

 

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 3
(47 Views)