12-08-2007 05:14 AM
12-10-2007 02:43 PM
Hi Nachiket,
Thanks for posting! I want to clarify my understanding of your problem. You have PXI-4110 Power supply that you are connecting to a resistive load. When you use the NI-DCPower Test Panel to view the amount of voltage and current the power supply is outputting, you see what you expect. A LabVIEW program that measures the supply’s output only shows the correct values when run in highlight execution. When you turn off highlight execution, thereby removing the delay due to the slower executing speed, the values become random. Is my understanding correct?
With regards to your code, are you utilizing one of the National Instruments’ example programs? These can be found by navigating to the Help Menu>> Find Examples>> expanding the Hardware Input and Output folder>>expanding the Modular Instruments folder>> and then looking in the NI-DCPOWER file. The NI-DCPower Generate.vi example sounds like code that will work for your application. This example program has the same functionality as the test panel and should therefore return the same values as you are seeing in the test panel.
If you are in fact already using an example program, can I ask which program and what limits you are setting for your current and voltage values? Have you made any modifications to the program? And could you better describe what values you are seeing returned when highlight execution is off?
Thanks, Mallori M.02-12-2008 06:22 AM
02-13-2008 10:43 AM
02-13-2008 05:15 PM - edited 02-13-2008 05:16 PM
Hi Toni,
I am assuming based on your second post that you were able to find and get the NI-DCPower examples working. If I understand your problem, you are using the NI-DCPower Generate Example, but you want to continuously increase the voltage being output by the power supply in 1 V increments and monitor the current being output at that voltage. Is my understanding correct?
I took a look at your VI and I noticed a few things that might be causing your error. First, there is no time wired to the Delay Express VI in the while loop, which means that there is no wait being applied. This could be why your VI only works when highlight execution is enabled. I would also suggest using an actual Wait Function instead of the Delay Express VI.
Secondly, I think that modifying the example program as seen in the attached screenshot will be better programming practice and resource management. In your VI, by placing the while loop about the entire program, you are continually having to configure and close driver sessions which can significantly slow down your program and is most likely what is causing your current difficulties. By adding a second Configure Voltage Level function inside the while loop, you will be able to continuously vary the voltage being output.
I hope this explanation helps. Regards, Mallori M.
02-14-2008 03:27 AM