PennController for IBEX › Forums › Support › Can we randomize time with newTimer() ? › Reply To: Can we randomize time with newTimer() ?
![](https://www.pcibex.net/wp-content/uploads/2018/10/IMG_8365-e1540835663655-150x150.jpg)
Hi,
Yes, you got it, that’s precisely the direction I had in mind when I suggested using the linear order of the rows rather than timestamps. Your solution seems to work beautifully
Re. your Var element: you correctly create it as a .global
Var element at the end of the trial labeled “instructions_E” but when you refer back to it at the end of the trial labeled “blocks-timer-trial” you forget to call .global()
again, so PennController cannot access the value of the Var element that you created in a previous trial. Then you call .log( "BlocksTimer" , getVar("BLOCKS") )
on that same element, so you might have one results line for that trial (the one labeled “blocks-timer-trial”) that will report the value of the Var element. But given the two arguments you passed to .log
, I think you meant to add a column rather than a row. If so, you need to call log
on the closing parenthesis of newTrial()
rather than on the Var element itself
Jeremy