LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Square Wave VI?

Hi,

I want to make a customizable square wave chart for two voltage channels. I didn't know if the Square Wave PtByPt.vi function is correct or if another would work better? I want it to read for 50 Milliseconds and then stop and have the data displayed in a chart/graph.

Thanks so much!

(End goal is something like this)

0 Kudos
Message 1 of 11
(5,731 Views)

This is my VI if that helps any, the Waveform chart isn't displaying how I would like.

0 Kudos
Message 2 of 11
(5,712 Views)

Don't hide the labels for the terminals in your block diagram!

 

How is the chart displaying, and how is it different from what you actually like?

 

I don't see where you have any square wave happening in your VI.

 

Square wave pt by pt, might do what you want.  But there are other VI's that create entire square wave waveforms that might be better for you.  Search for Square Wave.vi  (an array of square wave data) and Square Waveform.vi (a waveform of square wave data.)

 

 

0 Kudos
Message 3 of 11
(5,704 Views)

That was my original VI, I have not yet added in the square wave vi because I was looking into it more. The one I currently have doesn't deal well with having 2 channels and I need a function that could.

Thanks

0 Kudos
Message 4 of 11
(5,702 Views)

I added in some of the labels and put in the square wave.vi(although I'd like both voltages as amplitude on same chart). Hope this helps

0 Kudos
Message 5 of 11
(5,700 Views)

You're still missing labels on several of your block diagram terminals, including the new new charts you added.

 

You can combine two plots into one chart if you build them into a 2-D array.  Open up context Help (Ctrl-H) and hover over the chart.)

 

I'm not sure what you are really trying to do because you are just reading data from a power supply then using that to create a square waveform on the screen, which really has only a slight relationship to the data you just collected?  ("Let me grab a single voltage and a single current value and make them look like square waves".)  I thought you were trying to create a square waveform so you could output that to a power supply..  ????

0 Kudos
Message 6 of 11
(5,689 Views)

"I thought you were trying to create a square waveform so you could output that to a power supply..  ????"

That's exactly what I'm trying to do, sorry for the confusion earlier. And the square wave.vi was not accepting my 2D array data

0 Kudos
Message 7 of 11
(5,651 Views)

Hopefully this VI looks nicer, I tried cleaning up the diagram.

I think my problem is in merging the 2 channels to make one square wave output

0 Kudos
Message 8 of 11
(5,646 Views)

@Amanda_Kay wrote:

"I thought you were trying to create a square waveform so you could output that to a power supply..  ????"

That's exactly what I'm trying to do, sorry for the confusion earlier. And the square wave.vi was not accepting my 2D array data


But you aren't sending anything to the power supply.  You are just reading data from it.

 

Why do you have a 1 iteration For Loop?

0 Kudos
Message 9 of 11
(5,643 Views)

I'm not sure on how to send it to the power supply, I should probably start there. And I'm going to change the loop later but I just placed it so I can work on the other parts

0 Kudos
Message 10 of 11
(5,641 Views)