LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncronizing A generated waveform with an input analog waveform

    I'm working on a project, where we present a stimulus, a predefined waveform, and we want to measure how well a user can use a device to follow the waveform.  Two requirements for this device is that we want to show the stimulus as they would need to react to it, and we want to store all the data to a file, so it can be analyzed later.  The problem is the stimulus signal needs to look randomly generated, so to minimize learning affects, to do this we combine a series of sine waves at different frequencies.  Because of this I am having the following issue.

Basically, at the moment I am having problems importing a pre-generated waveform, and then showing both the stimulus and response waveforms on a Waveform Chart as time varies.

I generated the goal waveform in MATLAB, with the correct time and magnitude arrays.  I was able to import the data and plot it in Labview, however, I can only plot the data in one graph not over a period of 15 second like I would like.  Also, I can not plot the user generated signal on the same plot. 

I tried to identify the problem as best I could but if you would like further clarification on anything described above I can try to elaborate more on what I'm struggling with.

Thanks for any help anyone gives.

Mike
0 Kudos
Message 1 of 5
(2,524 Views)
Mike,

What type of stimulus and response are you using? Are images on the screen tracked by the mouse, voltages or currents sent to an external device, or some thing else? How you can achieve what you want may depend on the input and output devices.

Lynn
0 Kudos
Message 2 of 5
(2,508 Views)
The stimulus we are using is siply a waveform that the user must try to stay with as it moves in time.  Therefore the stimulus is shown on the waveform chart, and we want it to be displayed with time suchthat the only the current value and previous values at that point in time are displayed to the chart.  The response from the user comes from a voltage source.  We have a device that the  user will move linear, and this movement changes the output voltage of the device.  Using a DAQ board we then read the voltage at the same point in time and relate the goal "voltage signal" to the user's response signal.  As of now we have tried to ways to simulate the goal voltage, the first using the simulate signal sub-vi and then other is by generating an artificial waveform on a different input source on the DAQ board.  Neither way allows us to smoothly control the waveform.  We would like the goal waveform to be a combination of sine functions such that the waveform is not easily learned by the user, like a simple sine wave would be.  I have been able to generate complex sine waves in LabView, but I wasn't able to make them appear on the screen the way we wanted,basically one point at a time keeping the previous points visible.

Does that help any, let me know if you still need more information.

Thanks,

Mike
0 Kudos
Message 3 of 5
(2,497 Views)
Hi Mike,
Take a look at this knowledgebase article to see if it helps you with your code some.  Let me know if it doesn't help or if I am missing the point.  You might also check out some of the documents linked in the article too.

Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 4 of 5
(2,473 Views)
I don't think I was able to convey the problem I was having very well.  My current issue is trying to import a waveform that I have created before running the VI, and but displaying this waveform with a waveform that is currently being collected by a DAQ board.  The pre-generated waveform is a goal signal and is sinusoidal, and then the waveform that is being collected collected from the DAQ is the user's response.  My problem is that I need to have the two waveforms be displayed at the same time such that the goal waveform is displayed for the user at the same time the user should be attmepting to reach the goal signal. 

The problem that I can't currently solve is importing a pre-generated waveform and displaying it using the Waveform Chart, such that it appears as though its being generated on the fly, when in fact its not.

The links provided previously provide help explain that in fact I do want to use the waveform chart function, but does not help me in the problem of importing a waveform and then based on time displaying the waveform.

Hopefully I was better able to explain this problem this time, since I was unable to convey the root problem in previous posts.  If there is still confusion on what I'm trying to do, or about this post in general let me know, and I can try again to present my problem a different way.

Thanks,

Mike
0 Kudos
Message 5 of 5
(2,445 Views)