LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6229 Relay control

Solved!
Go to solution

I am trying to build a VI to control a single relay to open and close 5 solenoid valves in series for .5 secs. I have a USB-6229 control board to do this. I am new to labview and need some help the with code for the VI. Any suggestion would be helpful.

0 Kudos
Message 1 of 11
(3,495 Views)

Control signal from your labview has to be wired to one end of the relay, when you send a high signal relay will turn on and when you turn off the relay should open., 

 

A simple way  -- >Initialize DAQ, Use the DIO to write high and low in a loop controlled by button from front panel, and stop button to stop that while loop.

 

Do you want LabVIEW just to open and close relay ? or solenoids too , if you want relay to switch on off every 0.5 seconds then have a timer in that loop instead of button controlling relay operation.

 

Let me know your progress

0 Kudos
Message 2 of 11
(3,485 Views)

I want labview to control just relay at this point. I want to be able to click on the front panel that will open the relay so that it remains open for about .5 secs then closes automatically. So it only opens with I click the button.

0 Kudos
Message 3 of 11
(3,481 Views)

TRY THE ATTACHED CODE, THIS IS SIMPLE SWITCH CONTROL.

 

NOTE THE RELAY ON (RELAY CLOSE) LOOP RUNS EVERY 60 SECONDS, AFTER 60 SECONDS RELAY WILL BE OPEN. PROGRAM WILL AGAIN WAIT FOR USER TO PRESS THE SWITCH IN FRONT PANEL.

 

MAIN WHILE LOOP IS CONTROLLED BY STOP BUTTON IN FRONT PANEL.

 

THIS PROGRAM JUST CONTROLS A SWITCH, NECESSARY COIL VOLTAGE HAS TO BE PROVIDED & OPERATOR SHOULD PRESS RELAY ON BUTTON TO COMPLETE THE CIRCUIT...

 

DO LET ME KNOW IF YOU FACE ANY PROBLEM...

 

0 Kudos
Message 4 of 11
(3,471 Views)

I am having trouble integrating this VI to my device and also with the timing. I run the program as is expecting 60 secs on timing and it is not coming back consistent. I ran it 3 times consecuativly and got 57 secs, 47 secs and 52 secs.

0 Kudos
Message 5 of 11
(3,461 Views)

Smiley Sadthe above program sent was just an example for you to get an idea of what you looking for  Smiley Indifferent As far as I know the program attached can go to value more than 60 but not less than that. Pls send screen shot of the program what you have Smiley Happyso that we all can have look and give a proper answer.

0 Kudos
Message 6 of 11
(3,455 Views)

After some fiddling with the program amd many examples, I have a very basic switch that controls on and off of the relay. I need to set up timing for this system so that it will turn off half a second after I click it on. I have attached a copy of VI. Very basic array and DAQ assistant.

0 Kudos
Message 7 of 11
(3,444 Views)

Let me understand, User will press button and relay will turn on and after that every 30 seconds relay should turn on and off right ? User interaction will be only for first time, is my understanding correct ?

0 Kudos
Message 8 of 11
(3,431 Views)

Yes user interaction will be one time, just to click on. After .5 secs, it should turn off without user interaction.

0 Kudos
Message 9 of 11
(3,427 Views)
Solution
Accepted by topic author coyotesphysics

Try this... 

Message 10 of 11
(3,419 Views)