LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a sinewave that applies to a power supply

Hello,

 

I want to make a code for a power supply that will turn on and off by using a sinewave. I can figure it out. I have a code that does everything else i want but cant seem to figure out how to do this with the power supply. I want  to apply 6 V and 1 Amps with a frequency of 0.01 HZ. I will attach my code right now even tho there is no progress in the power supply coding.

 

Thanks in advance

0 Kudos
Message 1 of 8
(2,289 Views)
  1. Why are you using those old GPIB primitives and not VISA?
  2. What power supply?

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(2,266 Views)

Hi kalwet,

 


@kalwet wrote:

I want to make a code for a power supply that will turn on and off by using a sinewave. I can figure it out. I have a code that does everything else i want but cant seem to figure out how to do this with the power supply. I want  to apply 6 V and 1 Amps with a frequency of 0.01 HZ. I will attach my code right now even tho there is no progress in the power supply coding.


In your VI you are (trying to) reading data from two GPIB devices by sending them the very same command. Then you convert the received strings into numeric data, do some calculations (thermocouple conversion), and save the numeric data after converting back to string into 4 files.

 

Adding more questions to the previous message:

  1. Do you really need 4 files? (Why not use a single CSV file with 4 columns?)
  2. Do you really need to append empty strings 4 times?
  3. Do you really need to wire the "open" enum to the FileOpen functions? (It's the default value…)
  4. Why are there 4 numeric indicators, set to the wrong datatype, to show the current readings? Why not use the digital display of those charts, which show the very same data?
  5. There is no timing in your loop, even though ypi mention some time related values in your message!?
  6. There is no code in the VI related to "output a sinewave"!?
  7. Why are there charts and error clusters with exactly the same label?
  8. Where do you open/configure your GPIB devices and where to you close/deinit that communication connection?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(2,261 Views)

In our school thats the way we are thaught it. Havent really gotten around to learn the visa. The power supply is a HP6332A

0 Kudos
Message 4 of 8
(2,254 Views)

@kalwet wrote:

In our school thats the way we are thaught it. Havent really gotten around to learn the visa. The power supply is a HP6332A


Really a HP6332A?  .. I can find ITECH6332A ... maybe a liink to a manual?

 

You really want to learn VISA and SCPI .. if you want THE FORCE  to control other equipment 😉

 

I don't know your load, but usually you only can control the voltage or the current (the other is usually only limited)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 8
(2,219 Views)

Ah sorry i miss typed its HP 6632A 

0 Kudos
Message 6 of 8
(2,210 Views)

The proper way to work with measurement devices is to first check if there is an instrument driver available for it.

 

And there is indeed: http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=014E5475A4556F51E0440003BA7CCD...

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 7 of 8
(2,191 Views)

@kalwet wrote:

Ah sorry i miss typed its HP 6632A 


So according to the manual, you have 15ms max processing time for the command (with display turned of 😉  )

resulting in ~66 updates per second max.   however you have a 100s periode

The hole control is software timed only ....  

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 8 of 8
(2,181 Views)