LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

power supply ON/OFF

Solved!
Go to solution
Repeating the question: two power supply having output switches. If first one switch ON/OFF the second one also switched ON/OFF. If second one switch ON/OFF the first one also switched ON/OFF. How it is to be done? Please take it as serious
"Thanks with regards "
by
..........Gireesh..........
0 Kudos
Message 21 of 57
(2,423 Views)
Solution
Accepted by topic author gireesh

Software engineering 101:

 

Define you problem:

It appears you want to turn off a power supply if the current reaches or exceeds a certain value.

 

Outline the proposed solution:

 

1) Set PS current limit to the desired value (called Imax).

2) Set PS voltage to correct voltage level (called Vset).

3) Read current value from PS (called Iread)

4) Make a decision on what to do. If Iread is greater then or equal to Imax then turn the power supply off.

 

Code the solution and test/debug:

 

As others have pointed out, let the power supply do the work of limiting the current and lowering the voltage if the current gets too high. If you are checking a circuit at power up for shorts, then you should be able to complete your desired task in a single VI. If you are expecting the current to vary then you may need to create 2 Vis; 1 to set the current limit and set voltage (steps 1 and 2) and a second that can be called throughout the rest of your code to check the current and turn off the supply if it is too high (steps 3 and 4). Always list the steps of what you want to accomplish to verify your desired task and to validate the logic before writing any code. It will save you a fair amount of time and frustration (especially when asking others for help).

0 Kudos
Message 22 of 57
(2,415 Views)
I never become frustrated. It is due to pressure from the superior officers. it was very urgent due to time limitations. From my questions, anybody feel like I am angry, I say sorry to all helped people. Many many thanks for all, always. You people doing a very good job. In the mean time of conversation all are like friends(as I am thinking) so some words may be like friends talk. Sorry I have to think that it is not a friends chat. Sorry for everything if someone feels hurt. I am stopping this thread. Last one is taking as or is the solution.
"Thanks with regards "
by
..........Gireesh..........
0 Kudos
Message 23 of 57
(2,406 Views)

 


@gireesh wrote:
Repeating the question: two power supply having output switches. If first one switch ON/OFF the second one also switched ON/OFF. If second one switch ON/OFF the first one also switched ON/OFF. How it is to be done? Please take it as serious

Please also take serious that this is a community of VOLUNTEERS. You are asking additional questions on a weekend. This means the responses will be few. Even during the week you are not guaranteed (or entitled to) an immediate answer. Most of us (like myself) have full-time jobs and we take time to try to help people. If you cannot tolerate these conditions then perhaps you should find another avenue for your questions.

 

 

Your VI has fundamental errors.

  • NEVER use an equal function with floating point values. This has been brought up MANY times in this forum. Search for "equal bug". Then prepare to donate to my retirement fund.
  • Your VI is not set up with a loop. This implies that you are trying to use the continuous run button. NEVER use the continuous run button unless you are performing some specific debugging operation. If your intention is to monitor the voltage to see if a drop occurred, then that's the part that should be in the loop. Do not place the initialization and power supply configuration in the loop unless your intention is to be able to change the configuration "on the fly".
  • You have a sequence frame which serves no purpose.
  • You cannot perform the Exclusive Or operation because of a wire cycle. This has already been explained to you. This is dataflow programming, not procedural programming. If you need to turn off both power supplies in the event of an overcurrent in one, then you have several choices - here's two:
       a) Perform the monitoring of the voltages in parallel. This allows you to take the condition from both into an Boolean operation.
       b) If you have to monitor the power supplies in sequence (perhaps due to communication issues), then use a local variable to read the trigger condition of the second power supply. In your VI you'd create an indicator for the "we tripped" Boolean value for the second power supply and read it using a local variable for the first power supply. This is, of course, a slight race condition, but it's probably a benign one.
Message 24 of 57
(2,401 Views)

 


 

Again more and more sorry I want to tell you

 

because somebody have to tell about these type of things happening at the the weekend. if there isa no respond means we will think nobody will interested in our questions.   we expecting more and more from others. we are all for others not only for me or us. we are all in a family, the family name is ""NATIONAL INSTRUMENTS""

 

WE LOVE THEM AND WE ALL  ARE INTERESTED IN THEM.

 

 

WE SALUTE YOU

 

sorry sorry sorry, sorry for all and everything. please don't misunderstand me.  please see this whoever can help. don't hesitate me

 


 please go through the vi. I am done in this vi is not good, that I know. but  I think this is the best way for the help and understand. HELP ME PLEASE.

 

"Thanks with regards "
by
..........Gireesh..........
0 Kudos
Message 25 of 57
(2,382 Views)

I forgot to attach

 

"Thanks with regards "
by
..........Gireesh..........
0 Kudos
Message 26 of 57
(2,371 Views)

Stop using the equal function. You've already been told that and why it's wrong.

 

The status functin you are using has the alarm status register. Use that.

 

I would also change the sequence (WITHOUT USING A SEQUENCE STRUCTURE!) so that you would do all setup an initalization for both supplies, then turn on 1, check status of 1, if status okay, turn on 2, if not, turn off 1 and finish with error, check status, if okay finish with no error, if not, turn both off and finish with error.

0 Kudos
Message 27 of 57
(2,361 Views)

You are using an equal sign to compare two DBLs.  The output will almost always be False because of rounding off errors.  Insted of using equal, use In Range and Coerce. Set an upper and lower limit for the current.  Smercurio explained that to you before.  You should listen and do what he says.  The output of In Range and Coerce is a boolean.  Inside your case structure you use the same vi in both cases.  Remove the case structure and wire the output of the In Range and Coerce directly to the setOut vi.  You don't need the case structure at all.

 

What do you mean by you can't do this in reverse?  Can you describe what you mean by reverse?  Do you mean setting power supply 2 before setting power supply 1?  In your second frame, you have an initialize function to start a session for power supply 2.  You don't have this function in the first frame for power supply 1.  You probably have that function before the sequence structure.  Put it inside the first frame.  Then the two frames will be identical except for the power supply number, and they should be reversible.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 28 of 57
(2,358 Views)
We can avoid case structure. =,>,<, etc. whatever can use for comparing, after all output will be a boolean. This is not My question, how to connect this boolean to the setout.vi for two sup at a time on/off. From 1st sup to 2nd sup we can connect. But in reverse means if 2nd sup is at short circuit condition we have to switch OFF the 2nd sup & 1st sup at the same time. And one more thing if we use all initialisation for all sup at the begining, how to control the set volt & curr if there is one more sup of different set volt/curr.
"Thanks with regards "
by
..........Gireesh..........
0 Kudos
Message 29 of 57
(2,338 Views)

The more I read this thread, the more complicated things keep getting.

 

You need to sit down and write out a flowchart of how this application is supposed to work.  Based on that, it sounds like you need to turn it into a state machine architecture.

0 Kudos
Message 30 of 57
(2,335 Views)