LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate single ramp signal

Solved!
Go to solution

I cannot seem to figure out the time parameters of the Simulate Arbitrary Signal.

 

I want to make a single ramp from -1 to 1 over .990ms then back to -1 in under 10us. So when I put it in a for loop I can get N sawtooth cycles.

 

I've been pulling my hair out trying different options of the define signal dialog and can't make it happen.

 

Can someone help me understand the dx relation to the datapoints and how they are affected by the write/sample numbers in the DAQ part? Please.

 

Christopher

0 Kudos
Message 1 of 20
(6,506 Views)
What are you trying to do with this signal? What kind of hardware are you using? This will be very tough for a windows based system to maintain accuracy with the precision that you have defined in this curve.
Tim
GHSP
0 Kudos
Message 2 of 20
(6,478 Views)

The accuracy is not incredibly critical. I am using an attocube nanopositioner which likes to have a 1 Khz sawtooth. I have been able to generate the sawtooth using the sawtoothgenerator, but can only limit it's output to about 20 to 30 ramps. I need finer control than that for the coarse approach of the positioner. I figured if I could generate a single ramp, then I could loop it and get as many (as few) as I needed.

 

I have been experimenting with the point by point generator which gives a duration. I think that may work better, but I still can't seem to get the DAQ configured for the individual ramp.

 

My hardware is a PCI-6251 DAQ board.  Thanks for any help.

0 Kudos
Message 3 of 20
(6,463 Views)
Solution
Accepted by topic author lindope
This should get you started. You will need to set up the analog output in the software to match your system. If you change the frequency and sample numbers and the loop delay then you can make it go faster and slower much easier.
Tim
GHSP
Message 4 of 20
(6,452 Views)

It was that simple! Just put the Write inside the loop instead of the 'Is it done' OK! I was spending all my time lessing with samples and write poly selector.etc....

 

I added a 180 phase to the generator, a counter logic for the increment-stop and it's is exactly what I was looking for!

Looks like I may have to add the 'return signal to ground' property and the sensor level stuff....

 

Thank you so much!

 

 

0 Kudos
Message 5 of 20
(6,435 Views)
Glad I could help.
Tim
GHSP
0 Kudos
Message 6 of 20
(6,417 Views)

Well, maybe I spoke too soon. I see the sawtooth on the graph as I need it to be. But the signal is not going out to the DAQ.

 

I have set the physical channel and levels. I even tried a Start Task inside the loop. I get nothing on the output. My board is working, if I run the vi I showed at the beginning of this thread I get output. But in that case the Write and Start are outside the loop.

 

Any ideas?

0 Kudos
Message 7 of 20
(6,399 Views)
I had this hooked up to a daq card and I could hear that the output was changing. I did not put an ocilliscope on it to see if I got the same rest as what I put into it. You may need to mess around with the clock to see if that could help.
Tim
GHSP
0 Kudos
Message 8 of 20
(6,391 Views)

Nope, still can't get it to work...I may open another topic, since I prematurally solutioned this one.

 

As I understand it, the Write block merely writes to the buffer, you then need the Start Task to actually put it out the ao1 ouput.  But I have even tried putting the Start Task inside, outside, in front of, and after the loop and can get no output still.I also tried putting a second loop with the Is Task Done block as in the continuous vi that I can get to output.

0 Kudos
Message 9 of 20
(6,375 Views)

Are you getting an error message?

 

Why don't you post your VI so we can see what you are doing?

0 Kudos
Message 10 of 20
(6,362 Views)