LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp contraction/combination of chart&graph

Hi all

In an experiment, subjects should apply a force with their arm which is
measured by a force transducer and imported into LabView via the serial
port. They can see their exerted force on the screen at each moment and
should vary its intensity according to a given function, which is typically
a ramp starting at 0 Newton, going up slowly to maybe 10 N, keeping that
level for a certain time, and then going down to 0 N again.The whole
reference fuction should be visible in the graph window together with the
actual force.

The reference function can easily be plotted into a x-y graph whereas the
actual force is to be plotted in a chart.But how can I combine the two
curves in a single view?

Thanks for helping!


Michael
0 Kudos
Message 1 of 6
(3,594 Views)
Michael wrote:

> Hi all
>
> In an experiment, subjects should apply a force with their arm which is
> measured by a force transducer and imported into LabView via the serial
> port. They can see their exerted force on the screen at each moment and
> should vary its intensity according to a given function, which is typically
> a ramp starting at 0 Newton, going up slowly to maybe 10 N, keeping that
> level for a certain time, and then going down to 0 N again.The whole
> reference fuction should be visible in the graph window together with the
> actual force.
>
> The reference function can easily be plotted into a x-y graph whereas the
> actual force is to be plotted in a chart.But how can I combine the two
> curves in a single view?
>
> Thanks for helping!
>
> Michae
l

There are only two ways I can think of to accomplish this.
1) Edit the x-y graph (control editor) and make everything
invisible (transparent) except the plot. Lay this on top of the
chart and do some fine adjustments to the alignment.

2) depending on what the function is, continuously calculate the
function, take the function and the input and put in a 2D array
and make it a multiplot chart.

Check the examples to get some ideas about how to do this.
Kevin Kent
0 Kudos
Message 2 of 6
(3,594 Views)
Use a multipolt graph.
See the attached example.

Jean-Pierre Drolet


Michael a écrit dans le message : 398039aa@pfaff.ethz.ch...
> Hi all
>
> In an experiment, subjects should apply a force with their arm which is
> measured by a force transducer and imported into LabView via the serial
> port. They can see their exerted force on the screen at each moment and
> should vary its intensity according to a given function, which is
typically
> a ramp starting at 0 Newton, going up slowly to maybe 10 N, keeping that
> level for a certain time, and then going down to 0 N again.The whole
> reference fuction should be visible in the graph window together with the
> actual force.
>
> The reference function can easily be plotted into a x-y graph where
as the
> actual force is to be plotted in a chart.But how can I combine the two
> curves in a single view?
>
> Thanks for helping!
>
> Michael
>
>



[Attachment Multiplot Graph.vi, see below]
0 Kudos
Message 3 of 6
(3,594 Views)
....
> The reference function can easily be plotted into a x-y graph whereas the
> actual force is to be plotted in a chart.But how can I combine the two
> curves in a single view?
>

I'd recommend plotting all of this in one XY graph. Make one plot the reference.
It will not change from draw to draw. The other plot, probably plot 0, will
have points appended to it each time they are gathered. Then plot both the
refenence and acquired data to the XY graph. The graph will take a certain
amount of time to draw depending on its size, the computer, and to a lesser
degree the number of points. If this drawing takes too long to keep up with
the I/O, then batch them together, drawing N new points each time the graph
is updated.

Greg McKaskle
0 Kudos
Message 4 of 6
(3,594 Views)
Hi Kevin, Jean-Pierre, Greg and Mike - I'm overwhelmed with the help I got!
🙂 Thank you very much! The example by Jean-Pierre is exactly what I need.

I haven't been to this newsgroup before but will in the future - hoping to
reciprocate at some point with a solution.

Regards
Michael
0 Kudos
Message 5 of 6
(3,594 Views)

Hi,

I was wondering if there is a way to be able to open this VI with a newer version of LabView? From the messages written here it seems this VI might be just what I need but can't open it. I have version 8.5 on my pc. I'd appreciate help.

Ola.

0 Kudos
Message 6 of 6
(3,178 Views)