LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am moving a circle around a image using key presses, i would like to save these movemements to a file. How do I do this

I am trying to replicate football player movement using key presses to increment or decrement the centre of the circle, which represents the players. I then want to load this data to a file so that i can read it from the file later in order to run a simulation. I am having trouble...any ideas
0 Kudos
Message 1 of 3
(2,585 Views)
For an application that will ultimately also be used for sports (a LabVIEW program driving a LED-based graphic scoreboard) I wrote some vi's to do x,Y, gain and rotation parameter changes.
It uses a 2D array with the first column being a time-stamp.
The other columns can be any parameter, in your case the X and Y coordinates of the players or even color of the circle.
Now interpolate the X and Y's in between the time-stamps for a gradual movement of the players without hops.
I hope you can use this hint to score using labVIEW.
0 Kudos
Message 2 of 3
(2,585 Views)
Dear Ben,

There is not going to be an easy answer. I recommend placing an additional shift register on the outer loop. To this shift register wire an array of clusters where the cluster contains two strings?one for the player and one for his movement. Upon every iteration, the array will be updated with a new player/movement. This fashion you can store the movements and save them to a file when the loop terminates. When you play this information back you can parse the player and the movement information out and make the appropriate part of your code run. I would put the code for the running the playback inside of the big while loop in with a playback/noplayback case. Push buttons should be in the noplayback case. The play back case will read the
data and send the approprate commands to your present code.

Good luck with the project. I looks really neat.
0 Kudos
Message 3 of 3
(2,585 Views)