LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reduce Loop time

Hi,

 The attached code will give me 52 ms at the Start_Voltage and 52 ms at the Stop_Voltage.

With the Step_Voltage = 0 the voltage will only switch between the two voltages.

I tried to add code from the 1ms Delay discussion but was unable to get the code to compile (a lot to do with not understanding what was going on!!)

Did someone get it to work and if so would they be willing to help?

Can I reduce this time down to 1 ms or so?

 Thanks for the help

Simon

0 Kudos
Message 1 of 7
(3,730 Views)

Hi,

This is the file, sorry.

Thanks

Simon

0 Kudos
Message 2 of 7
(3,727 Views)
I am not sure I understand your question, but maybe this will help
You probably can not step a 363X power supply at a rate of 1mS per step.  This is because the communication with the power supply is simply too slow.
Looking at your code, if you have a step size of zero the only lines that execute are:
hpe363xa_ConfigureVoltageLevel (PSUHandle, "1", Start_Voltage);
and

hpe363xa_ConfigureVoltageLevel (PSUHandle, "1", Stop_Voltage);

Loop_Count--;

There is no delay between the statements and this would make your program appear to run with a start and stop time of 52mS. 
If you want a longer delay when the step is zero you would need to modify things a little to always execute the step delay even when your step voltage is zero.  As for making it shorter, if you are starting and stopping at 52mS, you have already reached the time resolution of your system and cannot really do much more.  It is possible to tighten up your loop a little, but what is your target again, 1mS per step?
 
0 Kudos
Message 3 of 7
(3,721 Views)

Hi,

I have a GPIB interface so I belive it is up to 1ms switch as is the Agilent E3632A power supply.

I am not waiting for a response back from the unit should also help!

Yes, no delay between Stat_Voltage (12V) and Stop_Voltage (10V) while Loop_Count will define the number of times you switch between the two voltages.

52ms at 12V then 52ms at 10V, the rate of change between the voltages is a function of the PSU (dose that sound right??!! )

I have two different PC's with different processors and operating systems but still at 52ms on each.

Is there a way to check what time it takes to execute the two instructions?

If this is less that what I am seeing from the output from the power supply then maby I will have to live with 52ms!!

Thanks for the input

Simon

0 Kudos
Message 4 of 7
(3,716 Views)

If you look at the specification for Agilent E363xA series power suppliers you'll see Command processing time < 100 msec, where this time is intended as "Maximum time for output to change after receipt of commands".

According to these figures, your 52 msec is probably the best performance you can expect from your supplier. Smiley Indifferent This can explain why you aren't seeing different figures using the supplier with different compures: the bottleneck is the supplier itself and you won't be able to shorten it.

Message Edited by Roberto Bozzolo on 03-24-2006 04:05 PM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 7
(3,712 Views)

Hi,

Roberto, you could be right, Thanks.

Has anyone got a power supply to do fast transients (1 ms) under program control !!!?

Thanks for the help

Simon

0 Kudos
Message 6 of 7
(3,707 Views)

The type of equipment to get to 1mS resolution will depend on the power output.  For low power you could use an analog DAC card to drive the waveform and then run it through a suitable amplifier.  This allows you to preload the waveform onto the card (provided the card is capable of this) and then trigger the output pattern.  For something with a little more output juice you could look at one of the source meters from keithley, something like a 2601.  These are dc sources that can be programmed to execute programs internally to output the desired voltage waveform.  The catch is that you really have to pay attention to the output connection to make sure the capacitance does not over run your output step rate. 

The bottom line is that a windows PC itself is going to be too slow to drive the waveform you are looking for.  You will need to preload it into a hardware buffer like a DAC card or use some type of dedicated embedded controller in the hardware to execute the waveform.

Message Edited by mvr on 03-24-2006 09:51 AM

0 Kudos
Message 7 of 7
(3,700 Views)