LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine the turn on state

Hello,

 

I wish to control my relay using NI 9403. I just want to turn on or turn off the solid state relay. But how i determine the relay is off before i can turn on or the relay is on before i turn it on? For example, my relay control a fan, if the fan is on, i want to turn it off. How can Labview know that the fan is on?

 

Thank you.  

0 Kudos
Message 1 of 8
(2,522 Views)

Your program will know whether it is on or off based on whether you turned it on or off earlier in the program.  You can store the status of the fan relay as a boolean value in a shift register in your while loop.

0 Kudos
Message 2 of 8
(2,521 Views)

Toggle

0 Kudos
Message 3 of 8
(2,501 Views)

I would go for Shift registers than Feedback nodes. You cannot wire in the way you have shown the o/p of the feedback node cannot connect with the not gate output

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 8
(2,492 Views)

Thank you. May i know how you use shift register and feedback node? 

 

Additional information:

I need to control 30 solid state relay. So i need simple coding so that my code will not too messy. 

 

Condition:

1. If relay already is ON, and the command send is on, the relay stay on ON state

2.If relay already is ON, and the command send is off, the relay will go to OFF state

3.If relay already is OFF, and the command send is on, the relay stay on OFF state

4.If relay already is OFF, and the command send is on, the relay will go to ON state

0 Kudos
Message 5 of 8
(2,483 Views)

This is my code. This code is working. But the LED is blinking. This is because when the program go to "Initial" state, the is OFF. How can i solve this?

And i decide make this VI into subvi to control 30 relay, but this is a good solution? any recomendation? 

0 Kudos
Message 6 of 8
(2,474 Views)

In my application, I try to do demand side management. I stand at utility side, I wish to turn ON or OFF customer load base on current situation ( excess power then turn on and vise versa). But the customer can turn On or OFF their load if not Command from Utility. 

0 Kudos
Message 7 of 8
(2,465 Views)

Removed the blinking state..

 

"

Condition:

1. If relay already is ON, and the command send is on, the relay stay on ON state

2.If relay already is ON, and the command send is off, the relay will go to OFF state

3.If relay already is OFF, and the command send is on, the relay stay on OFF state

4.If relay already is OFF, and the command send is on, the relay will go to ON state"

 

 

   From what you have coded , the states are dependent only on the command irrespective of the relay state.

 

0 Kudos
Message 8 of 8
(2,455 Views)