LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I vary the voltage of a DC power source in a sine pattern around a certain voltage?

Hello all!  I'm using a GW Instek PST-3202 DC power supply to apply a voltage to a cartridge heater to heat an aluminum block.  I want to apply a sine wave that varies the voltage by +0.05 V to -0.05 V centered around 15 V (from 14.95 V to 15.05 V).  I can manually set the voltage of my power supply to 15 V using the analog controls on the power supply itself, but as soon as I turn on my VI it resets to 0 V, which I don't want.  Also, it says there is a read timeout, and I'm not sure why.  I'm very new to LabVIEW so this may be a very easy fix, but any input would be greatly appreciated!  My VI is attached, as well as the VI I am using to monitor the temperature, just for completion.

Download All
0 Kudos
Message 1 of 21
(3,666 Views)

You can add your offset (15 v in your case) to the output of your sine wave function.

0 Kudos
Message 2 of 21
(3,656 Views)

This is probably dumb, but I don't know how to do it.  The output of the sine waveform only has the functions for the sine wave, phase out, and error.

0 Kudos
Message 3 of 21
(3,651 Views)

Try adding an offset to the generated waveform. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 21
(3,643 Views)

I reiterate, I don't know how to add an offset to the waveform, it is not an option on the sine wave object.  I found the function I'm using in Signal Processing -> Signal Generation -> Sine Wave.  Perhaps I'm using the wrong function for what I want to accomplish?

0 Kudos
Message 5 of 21
(3,637 Views)
Very simply, use the arithmatic Add function. Wire a constant to one input and your waveform to the other.

You really need to take one of the free tutorials.
Message 6 of 21
(3,635 Views)

I've followed all of the advice ITT, but I'm still getting a timeout error on VISA Read.  I added a wait between the write and read functions, as a tutorial told me I should, but I'm still having a problem.  Also, I feel like the sine pattern function isn't creating a continuous sine pattern, but that may be because the VISA Read is timing out still.  My VI is attached.  I know I need to take a free tutorial, but I haven't had the time yet.

0 Kudos
Message 7 of 21
(3,630 Views)

Working a good online tutorial or two will take you much less time than it's taking you now thrashing around without getting anywhere. I'd suggest starting with the ones I stole the links for to put on the bottom of my signature.

 

Cameron

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 8 of 21
(3,622 Views)

You've added the 15v to the Phase Out, it needs to be added to the Sine Wave output array.

0 Kudos
Message 9 of 21
(3,618 Views)

If you go to Help, Find Examples and search for the 'Basic Serial Write and Read.vi', that should help you with your code.

0 Kudos
Message 10 of 21
(3,615 Views)