LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ramp-generate

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

0 Kudos
Message 1 of 14
(8,612 Views)

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?

0 Kudos
Message 2 of 14
(8,603 Views)

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

0 Kudos
Message 3 of 14
(8,596 Views)

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

Message 4 of 14
(8,594 Views)


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

0 Kudos
Message 5 of 14
(8,582 Views)

I give up.

Message 6 of 14
(8,563 Views)

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

www.ni.com/support

0 Kudos
Message 7 of 14
(8,531 Views)

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.

0 Kudos
Message 8 of 14
(8,517 Views)

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

www.ni.com/support

0 Kudos
Message 9 of 14
(8,490 Views)

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

0 Kudos
Message 10 of 14
(8,475 Views)