08-06-2012 10:24 PM
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.
08-06-2012 10:29 PM
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.
08-07-2012 12:47 AM
08-07-2012 01:12 AM - edited 08-07-2012 01:15 AM
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
08-07-2012 01:56 AM
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
08-07-2012 02:52 AM
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?
08-07-2012 03:13 AM
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.
08-07-2012 05:23 AM
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.