cancel
Showing results for 
Search instead for 
Did you mean: 

Square Wave VI?

Amanda_Kay
Member

Square Wave VI?

Message contains an image

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)

10 REPLIES 10
Amanda_Kay
Member

Re: Square Wave VI?

Message contains an attachment

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

RavensFan
Knight of NI

Re: Square Wave VI?

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.)

 

 

Amanda_Kay
Member

Re: Square Wave VI?

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

Amanda_Kay
Member

Re: Square Wave VI?

Message contains an attachment

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

Highlighted
RavensFan
Knight of NI

Re: Square Wave VI?

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..  ????

Amanda_Kay
Member

Re: Square Wave VI?

"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

Amanda_Kay
Member

Re: Square Wave VI?

Message contains an attachment

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

RavensFan
Knight of NI

Re: Square Wave VI?


@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?

Amanda_Kay
Member

Re: Square Wave VI?

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