LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write a code

Hi,

 

   I am in the initial stage of labview. I have a power supply and I want to write a labview program for the following steps.

 

1. Initialize 2. Define Min. voltage, Max. voltage and the step size of the voltage applied 3. Apply voltage 4. The voltage should be applied for 10 sec. 5. Check if applied voltage is equal to Max. Voltage 6. If true then stop, if false return to step 3.

 

i hope the logic is correct. I am not understanding how to proceed?

 

good day!

0 Kudos
Message 1 of 7
(4,029 Views)

Hi dsfasdfa,

 

How to proceed? RTFM of the power supply...

 

Ask more specific questions! Where exactly do you have problems? What kind of power supply? Did you search the driver network on the NI.com-website for your supply?

And please mark this as a homework... Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(4,013 Views)

I am sorry.

 

   this is a dc high voltage power supply. I want to write a labview code for this power supply in serial mode. I have divided the whole experiment into different steps.

 

   Now what I want to do is bring the power supply into remote mode, apply a set of voltages by defining the min. voltage and max. voltage and also define the step size of the applied voltage. For eg. I want to apply voltage from 1V to 5V with a step size of 0.5V. I also want each voltage to be applied to the load for atleast 10 sec(though the time can be varied). After it finishes applying the set of voltages the program should stop.

 

1. Initialize 2. Define Min. voltage, Max. voltage and the step size of the voltage applied 3. Apply voltage 4. The voltage should be applied for 10 sec. 5. Check if applied voltage is equal to Max. Voltage. If true then stop, if false return to step 3.

 

i hope the logic is correct. Now how do I write the code of this program, particularly for the step2,step4 and step5.

 

good day!

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

Hi dsf... (don't have enough time for a proper nickname?),

 

- serial mode = using RS232 for communication? If yes, the use VISA functions for communication and study the "Basic Serial Read and Write" example, that comes with LabVIEW!

- Did you search the IDN (Instrument Driver Network) for a suitable LabVIEW driver?

- Which type of power supply? Manufacturer? Type number?

 

Steps:

1) RTFM of the power supply. There usually is a command for initializing a device...

2) Make some controls on your frontpanel.

3) See point 1. There are commands for sending values to the device.

4) use a timing function.

5) Use a DMM or see point 1. Sometimes there are commands to get the current supply values for voltage and current...

 

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(3,988 Views)

Hi

 

  I have done according to as you have suggested. I am attaching the VI which I have made.

 

 Now I have a problem in case structure 2(volt stepsize). I dont know how to make connections. again in case structure-check voltage, I dont know how to proceed. I dont have a DMM. SO i need to do it using labview. In this case(check voltage) it needs to be checked whether the applied voltage is equal to the max. voltage. if true, then stop, if false then increment the voltage by defined stepsize and return to case structure-apply voltage.

 

Regards,

Srinivas

0 Kudos
Message 5 of 7
(3,963 Views)

Hi Srinivas,

 

now you have a different cryptic nick?

 

For connection you can use some simple math:

check.png

 

For checking voltage: How do you want to measure that voltage? Either use a DMM or RTFM of the power supply to get the command for reading the voltage... Also it's problematic to compare voltages for equality - they will differ by some amount!

 

You still didn't tell the type of power supply...Did you successfully searched the IDN?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,951 Views)

Hi

 

    Thanks for the reply.

 

   Actually the power supply is DC High voltage power supply which doesnt have a remote application(no gpib or rs232). But I have a lock in amp.(SR510) using which I can vary the voltage of the power supply in the following manner. the lock in has RS232 application.

 

    the lock in and the power supply will be connected in series. the voltage of the power supply will be fixed at say,1490V. the lock in voltage can be varied from -10V to +10V. so the final output will be varied from 1480V to 1500V.

 

    so now i want to program the lock in in such a way that I can not only control but vary the output of the high voltage power supply.

 

I think now the picture is clear to you. anyways I will try to work on the solution that you have given to me. Please feel free to ask if there is still any doubts in your mind.

 

warm regards,

srinivas

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