07-02-2012 07:15 AM
Hi
I am trying to generate a simple ramp. I initially started with a simple exampl program from the forum.
Voltage rate, max value can be adjusted but i find it hard with the current program to program delay time. When the signal reaches max value the delay (10s) can be observed but i am not been able to program delay at the min value.
Any help would be appreciated.
Attached
07-02-2012 08:06 AM
I don't understand why you are doing it that way. Why don't you just use the Ramp Pattern VI to create your array of values, and then feed that array into an auto-indexed for-loop?
07-02-2012 08:39 AM
I dont know how to use ramp pattern vi for this use. My application requires to input rate signal/sec, hold time, max, min which i almost have in the existing program.I dont know how to use Ramp.VI to input these values. Any example will be helpful
07-02-2012 08:47 AM
All you are doing is going from X to Y with step Z. The Ramp Pattern VI will generate the required values. You can control the timing inside the auto-indexed for-loop, such as the time between steps. If you need a dwell time at the end, add a Time Delay VI after the loop. Unless I completely misunderstood your requirement you are making this far more difficult than necessary.
Also, NEVER use an Equal function with floating point values. http://stackoverflow.com/questions/1089018/why-cant-decimal-numbers-be-represented-exactly-in-binary
07-02-2012 11:24 AM
Hi
Iam almost there i have my program do what i want. I just cannot get to look the profile steady at the max and minimum level i.e. the delay is observed (in seconds) as specified input value but it pauses the loop with the delay. I want to know how is it possible to output stable maximum & minimum voltage for the time delay value. Thanks in advance
Attached is the VI
07-02-2012 04:22 PM
I give up.
07-03-2012 11:02 AM
To reiterate what smercurio said, the easiest way to accomplish your goal is by creating the entire waveform before you start to plot it. You can use the Ramp Pattern VI to create each ramp, Initialize Array to create the constant portions of the waveform, and Build Array to concatenate each part of the waveform.
Then you can pass your entire waveform into a for loop with auto-indexing to plot the waveform one point at a time and use timing VIs to control the rate that the points are plotted.
Regards,
Brice Sorrells
Systems Engineer
National Instruments
07-04-2012 07:06 AM
hi Brice,
I have one quick question regarding to your post. Can I have freely selectable delay while building a ramp and initializing 0 array (for the delay).
I mean, to build ramp with evenly distributed samples in each step, I think I cant use freely selectable delay (must be quotient of 2?), else the samples will not be evenly distributed. I'm asking here regarding my question about generating multiple ramps using daqmx. (http://forums.ni.com/t5/Multifunction-DAQ/Generating-multiple-ramps-problem/td-p/2015738/page/2)
Somehow I keep thinking, that generating signal using daqmx in one channel only possible using one dt (time between samples) only.
regards,
Yan.
07-06-2012 11:48 AM
Hi Yan,
It makes it easier for everyone to help you with your problem if we keep all posts related to your question contained in the original forum thread (i.e. the forum thread that you linked to in your post). This makes it easier for us at NI to help you and it makes it easier for other LabVIEW users who want to help you to see all the posts related to your problem in one place.
Thanks,
Brice Sorrells
Systems Engineer
National Instruments
07-07-2012 06:19 AM
i have my final application.
The ramp is generated based on user selected input. But i am interested to know if there is any other way i can repeat cycles without using FOR LOOP.
This is because i want to wire waveform signal to the DAQmx AO but at certain boolean condition and i cannot use case structure.
is there a way to get rid of for loop to program number of cycles differently.
I dont know how can i initialize array and use ramp pattern VI to have this end application. Can you show me an example??