From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bar graph for force control task

Hello,

 

I am currently conducting an experiment during which the subject is asked to produce a given target level of grip force using a hand-held dynamometer and to maintain that target force level for a given amount of time.

I want to display a visual feedback regarding this task to the subject. Specifically, I want to show the subject the target force level that (s)he needs to produce and the actual, real-time force level that (s)he is producing. I created a VI in which I do this using a waveform graph which displays two horizontal lines as a function of time, namely a green line for the target force level and a blue line for the real-time force level. The task thus consists in putting the blue line on the green line and maintaining it at that level for a given amount of time.

The reason why I am posting this message is that I would like the visual feedback display to show not two horizontal lines that the subject needs to match, but a vertical bar that represents the real-time force level, and a line that represents the target force level. The height of the vertical bar would vary with the real-time force that the subject is producing, and the task would be to raise the vertical bar to the target force level and maintain it at that height for a given amount of time.

Is there a function that I can use for the display that I want (I notably tried the Vertical Pointer Slide, Tank, and Thermometer functions, but none of them seems to fit my needs..?)? Or would anyone have an idea about how to do this?

 

Cheers,

Ech

0 Kudos
Message 1 of 4
(2,017 Views)

One of the built in graph types that a conventional XY graph can produce is a bar. You could use an XY graph with two plots; 1 is a line representing the target value, and the other is a bar plot with a single datapoint that is your realtime value.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,014 Views)

Hello Mike.

 

Thank you for your reply.

 

I tried using an XY graph, but I must be doing something wrong.. It seems like my graph is showing the target force as Y and the real-time force as X. What I would like to do is to plot both target force and real-time force as Y, and time (either a given time window (say 100 ms), or a single data point) as X - how can I do that?

 

Sincerely,

Ech

0 Kudos
Message 3 of 4
(1,992 Views)

Hi Ech,

 

I made a little example program. It doesn't do exactly what you want to do, but I think that the format of the graph is how you want it. The thing is, it makes a difference which order you input the arrays. If you look at the top bundle, I've crossed wires to wire it up in order to get the x-value on top. It will always take that first array as the x-axis.

 

Hope that helps!

0 Kudos
Message 4 of 4
(1,977 Views)