08-03-2017 10:49 AM
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)
08-03-2017 11:19 AM
This is my VI if that helps any, the Waveform chart isn't displaying how I would like.
08-03-2017 12:14 PM
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.)
08-03-2017 12:22 PM
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
08-03-2017 12:29 PM
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
08-03-2017 01:14 PM
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.. ????
08-04-2017 09:48 AM
"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
08-04-2017 10:26 AM
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
08-04-2017 10:55 AM
@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?
08-04-2017 10:58 AM
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