LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About Power up sequence

Hi there,
I am trying to make a program to control two HP6624A DC power supplies, I want the first power supply start firstly with a defaut voltage value, then the second one next, the attached is my test code, it seems not working correctly, any one can let me some clues about it? thanks
 
Mike

Message Edited by Support on 08-22-2007 08:13 AM

0 Kudos
Message 1 of 5
(3,347 Views)
Mike,

First, you will need to set the GPIB addresses to be unique. They both cannot be 3. Change both the instruments and the program.

Second, the structure of the program is such that you will be continually Initializing and Closing the connections to the instruments. These should be outside the loop.

Third, it is usually best to have a single event structure. You can add event cases for each instument to a single structure. Unless the timeout cases are going to be used for something not shown in your example, they can be deleted.

Fourth, eliminate the sequence structure. A bit of dataflow will do the job. Look at state machine architectures.

Fifth, you have no explicit timing in your program. The second power supply will be set as quickly as the GPIB can process the two commands. A state machine with a wait state is a good option.

Sixth, unless the Initialize VI sets an initial value, nothing happens until one of the value controls is changed. Was that your intent? Note also that OVP Limit changes do not force an update of the instrument, because you do not have an event for that change.

Lynn
0 Kudos
Message 2 of 5
(3,335 Views)
You should not be using a sequence structure, you should not be using two separate event structures, and you shouldn't be using the same event in two separate event structures. Here's a modified version that should work. You need to replace the '0' constants on the block diagram

Message Edited by Support on 08-22-2007 08:13 AM

0 Kudos
Message 3 of 5
(3,331 Views)

Hi Dennis,

I have read through your code, the problem is: I would like to set the voltage of these two power supply (A and B) sequencily and I can change the power up sequency randomly by just loading a file with the defined sequency. any clue on how to do that? thanks,

Mike

Message Edited by happybird on 08-23-2007 01:10 PM

0 Kudos
Message 4 of 5
(3,272 Views)
Mike,

If you want the power supplies to start at particular values at startup and you want to read values from a file and you want some kind of sequencing, then you do not need an event structure. The event structure is primarily for efficiently responding to user initiated events, such as changing a value or pushing a button on the panel.

First, you should define clearly what the program is to do. What does it set the power supplies to when the program starts up? Where does it get the values? When is it to change the power supply settings? How are the times of the sequences set? What does the program do if an error occurs?

After defining the problem by answering these questions, then you can decide on the best program architecture. It is likely that a state machine would work. Whether an event structure is needed will be determined by how much user interaction is needed.

Lynn
0 Kudos
Message 5 of 5
(3,255 Views)