LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help With Signal Generator & DAQ Assistant (link to a tutorial inside)

Hello,

 

I've been trying to use the Signal Generator Express VI and DAQ Assistant in order to generate an output waveform, as seen in this NI tutorial video:

http://www.ni.com/academic/students/learn-daq/generate/ (timestamp is at 2:07 for what I'm trying to do)

 

However, I'm not getting the results I want from the waveform. My block diagram is essentially what you see in the NI tutorial example:

 

http://www.ni.com/images/labview101/analog_output_vi_snip.png

 

To elaborate, I'm trying to move a piston device using Labview. The sine waveform is intended to move the piston at a smooth speed. When I run the program, it runs just fine, but it moves the piston at a speed that is not desirable. I'd like to be able to configure the settings so that I can have the speed I'd like, which I'm currently unable to achieve.

 

Speaking first only of the Signal Generator VI, when double clicking on the icon to open up the configuration menu, I understand how to configure the settings under "Signal" just fine, however the "Timing" options are confusing to me. I don't quite understand if I desire "Simulate Acquisition TIming" or "Run as Fast as Possible". Furthermore, changing the "Samples Per Second" and "Number of Samples" seems to change the speed of the actuator. I received the best results when setting "Samples Per Second" to equal "Number of Samples", but I'm unsure why.

 

For the DAQ Assistant VI, when double clicking on the icon to open up the configuration menu, I have configured it as seen in the tutorial video - I have set Acquisition Mode to "Continuous". I'm confused by whether "Samples To Read" must equal the settings "Samples Per Second" & "Number of Samples" in Signal Generator. I'm also not so sure if there is anything else I need to consider within the settings here.


If anyone can elaborate on what I mentioned above, it would be much appreciated. I've been looking for tutorials which try to achieve what I'm doing, but I have been unable to uncover any - so I'd also appreciate any useful links to help/tutorials/examples where what I'm doing was achieved. Thanks!

0 Kudos
Message 1 of 2
(2,519 Views)

Update - seems the problem has been resolved. Using an integer number of cycles did the trick.

 

I have a new problem which came up, so I may as well ask it while I try to figure it out:

As I menitoned before, the simulated signal is used to send a voltage which moves an actuator. The frequency of the voltage is one - so the actuator moves to its maximum displacement in half a second, and returns to its starting position after one second has elapsed. The program is intended to run continuously, moving the piston in and out. When the program ends abruptly, the piston stops at whatever position it is located. When the program begins again, the actuator "jumps" to it's zero position, and begins oscillating. I want to avoid this "jump". I'd rather the actuator reset it's zero position to whatever position it ends at, so that the next time I run the program, the actuator does not "jump" to the zero position suddenly. 

0 Kudos
Message 2 of 2
(2,480 Views)