LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the previous data?

Hi,
 
I am monitoring a one moving point with coordinates (Xd,Yd). I want to get the two previous data so that I can calculate the point of origin as (Xo,Yo). I made a calculation that if i have three known points I will be able to get the point of origin. The variable data for the moving point (Xd,Yd) i showed using a slide bar. I want to see in the graph the moving point with the line connected to the point of origin at least.
But my problem is how can i get the two previous data correctly. Can somebody kindly teach me please.
 
Thank you very much.
0 Kudos
Message 1 of 7
(4,281 Views)

Use Shift Registers - See Example

Matt

www.CompleteAutomatedSolutions.com

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 7
(4,277 Views)
Hi Bong,

I couldn't open your VI 'cause I'm still running LV7.11... anyway, if I understood what you're asking for, it is quite simple, you just need to drag down the shit register of the for loop as in the attached example SR.vi.

If you are not using a shit register to plot your data, then it depends on which display you use, but there are some tricks to get previous data... but in my opinion keeping a cluster with (X,Y) in a shift register is a good idea 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 7
(4,280 Views)

Wrote it in 7.1 and seems to open fine for me.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 7
(4,264 Views)

Dear Mr Titou,

Thank you for the reply. Attached please find the file in 7.1. Thank you very much.

0 Kudos
Message 5 of 7
(4,244 Views)
Dear Mr Matt,
 
Attached is the VI in 7.1. Thank you very much too for your kind reply.
 
 
0 Kudos
Message 6 of 7
(4,243 Views)
Dear Mr Titou and Matt,
 
Pardon me i think i sent a VI with errors. I attached again the revised moving point.VI in 7.1.
I tried to revised based on your example SR.VI. But why all the points will have the same value if the (Xd,Yd) doesnt move? What is my wrong on the VI? 
My purpose is while the dynamic point (Xd,Yd) moves it will always get the three previous data so that it will always show the moving point (Xd,Yd), point of origin (Xo,Yo) and the line joining the two.
If the dynamic point is not moving, it will just keep the three previous data and likewise show the above.
 
Thank you for your kind help.
0 Kudos
Message 7 of 7
(4,238 Views)