Changing paramters in a for loop

I am trying to change ty value of transform op within a for loop. So that I can plot the upcoming dynamical data.

arr= [32,4,7,4,8,23,53,2,5,6,2,32,4,7,5,2]

t1 = op('transform1')
for i in arr:
 t1.par.ty = i

The above code is only sending the last value to op’s ty paramter. However, I want it to iterate through all of the values of an array ‘arr’.

I wonder what I am doing wrong.

Thanks for any help.

the script is iterating fine through all values in your list, but it’s doing all that within a single frame. So you don’t see any change until the last iteration, as TouchDesigner will only render once per frame.

But if you open a Textport you’ll see it iterates over all values in the list:

Yes, I was able to see the values printing in textport. I wasn’t sure why it is not changing in TouchDesigner. But now I know. Thank you.
The problem is that I am recieving data over TCP/IP - 250 samples/s. I want to plot it continously like I am trying to do above. Any suggestions?