12-30-2024 03:30 PM
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!
12-30-2024 04:17 PM
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!
Bob Schor
12-30-2024 09:02 PM
@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),
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.