08-02-2010 07:01 AM
08-02-2010 07:28 AM
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).
08-02-2010 08:44 AM
08-02-2010 08:58 AM - edited 08-02-2010 08:59 AM
@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.
08-02-2010 12:48 PM
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.
08-02-2010 01:15 PM
I forgot to attach
08-02-2010 01:33 PM
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.
08-02-2010 01:36 PM
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.
08-02-2010 08:00 PM
08-02-2010 08:22 PM
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.