List not using latest variable value

Hi,
I am trying to record the value of 2 variables every 10 ms. I index the length of the list and it goes up, however it just saves a repeat of the first value when it started. Here are some screenshots:

Code:

Data from List:

this sounds to be too fast... 10ms = 100 times in a second... the blocks need some time to run, too...
how do you change the values of the variables?
try a slow riunning clock first and get faster if you got that running...

Taifun

2 Likes

You can change that in the Properties. Slow down your timer.

I slowed it down to 1000ms. Same issue.
Here's where I am changing the variables:

I am making a sign wave and changing the Frequency with the accelerometer. I'm trying to record the motion over time. Thats why the 10ms.

Follow Taifun's advice re tweaking to the fastest possible cycle time. Ensure the App is fully initialised before the recording process is started. At that speed, constant update of the User Interface is pointless, the human eye cannot tolerate such fast changes. So maybe you could just record for a length of time and then display results?

Clock Timer: 'StartRecording' = true/false should suffice - I can't see why you also have 'Record'?

If you are only adding two values at a time, how is it that the display has rows with so many values? Instead of adding the values to a List, how about adding to a ListView?

Perhaps it would be better to draw a chart rather than make a List. Lots of advice about charts can be found with a forum search.