I would like to graphically create a waveform and then output the Y values of that waveform on a time selectable basis to control a 0-5 VDC device. The attached VI, found initially on the forums nicely acomplishes the waveform creation. How do I then output that calculated wavefroms Y values at selected intervals, say every 10, 100, or 1000 ms to control a device? Any help is very much appreciated.
Which hardware are you using to acquire data from? You could simply acquire the data, and using the Timing VIs to control the amount of time for each iteration of a while loops, for example. A more thorough discussion of the Timing VIs is in the following KnowledgeBase article:
I am using a PXI based system to acquire data and control the process, BUT that is NOT the point. My question is: How do I GRAPHICALLY create a waveform (the attached sample VI does that fine) and then use that GRAPHICALLY created waveform to OUTPUT Y values at a user selected time interval to CONTROL an analog flow valve, that uses a 0-5VDC signal. I know how to do the control part with the PXI hardware, I do NOT know how to get the Y values out of the spline created by this VI. Thanks for your or others assistance. David
Thanks for your help. I must be missing somethig, your suggestion is where I started, but the values at that point didn't seem to be following the generated curve as I thought they should. Perhaps I just need to dig deeper. I will try again. David
The x values also make up the curve which is the line above it. If you send the y values out at a different rate, you will not get the spline. Make sure you generate enough poitns as well so that you don't make too big of a step between points.
OK, I am now making progress with your help, just needed to be more persistant I guees. One question leads to another...The resulting Y array has 1,000 elements containing data, even when I change the ramp to say 1,500 which results in an array size of 1,500, but with Y values only for the first 1,000 elements. How do I get the array populated with 1,500 Y values? Thanks.
I'm not sure if I'm misunderstanding your problem. When I ran the VI and hit the stop button, there were 1500 Y values in the array. Where you have the array positioned, it only gets updated when you hit the stop button. Are you sure you didn't run it with a 1000, then 1500, but not hit the stop button. That is the only way I can think of where you would see 1000 elements.