LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I specify the frequency in which a signal outputs?

In order to drive a stepper motor, which is connected to a linear actuator, I created a waveform in matlab and saved it as a text file and imported it into labview. The waveform I created corresponds to the number of steps on the linear actuator. As a result, I have a vector of 2000 values. If I wanted the period to be 1 second, I would want the signal to output an element of the vector every 0.0005 seconds. How can I control the rate at which each value of the signal is outputted?

 

Thanks!

0 Kudos
Message 1 of 14
(3,128 Views)
What hardware are you actually using to generate this waveform in the physical world? The standard waveform datatype has a t0, deltaT, and an array of values. If you are using a DAQmx card take a look at the numerous LabVIEW examples (Help -> Find Examples) that are installed when you intall DAQmx.
0 Kudos
Message 2 of 14
(3,124 Views)

Thanks for responding so quickly! I used the Build Waveform Function to try to specify the duration between output samples. When I created a waveform indicator, the front panel gave me the waveform I wanted; however, when I connected the output to an oscilloscope, the corresponding waveform did not appear. Do you know why?

  I've attached a picture of the part of the program I'm having trouble, the program I've been playing around with to get the output to work, and some text files to use as the input.

Message Edited by Support on 01-11-2010 11:19 AM
0 Kudos
Message 3 of 14
(3,089 Views)
text files
Download All
0 Kudos
Message 4 of 14
(3,088 Views)

Never, ever post a bitmap file by just changing the extension to jpg. Do you really think that will fool anyone to get around the ban on bmp files?

 

And, your code is a mess. Look at some the examples. Use the DAQmx Timing function to specify use timing from waveform and rewrite your code to only use a single DAQmx Write. You CANNOT use two separate tasks. You must be getting an error.

Message Edited by Dennis Knutson on 01-10-2010 04:37 PM
0 Kudos
Message 5 of 14
(3,080 Views)
Sorry, I'm new to this and I wasn't aware of the ban. I'll gladly remove it, if you can tell me how to edit my post. Thanks for the help.
0 Kudos
Message 6 of 14
(3,064 Views)
It's probably to late to edit the post (Click on 'Options' to see) but you can always click on the report to moderator.
0 Kudos
Message 7 of 14
(3,058 Views)

Sorry again, but I'm brand new to labview and I'm having trouble doing simple tasks, especially because I don't have the labview manual. By anychance do you know of any online tutorials or examples that would help me learn how to output a signal?

 

Thanks for your time.

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

Go to Help>Find Examples. There is a whole section on Hardware Input and Output. Look under DAQmx and the voltage output. There are a couple of examples that use a waveform as an output.

 

You should have begun with the DAQmx Getting Started Page. All of the LabVIEW documentation is in the help file and a couple of pdf's. There is no printed manual.

 

0 Kudos
Message 9 of 14
(3,030 Views)
I rewrote the program to use a DAQmx timer to specify the frequency in which the signal output, and I also made it so the program only outputted a single waveform. However, when I hooked up the program to the oscilloscope, nothing is outputted, and the program doesn't give me an error message, so I'm not exactly sure how to go about fixing it. Does anyone know what could be the problem?
0 Kudos
Message 10 of 14
(2,993 Views)