While we're talking about the Timer component I don't seem to be able to get Giulio Piacentino 's render animation definition to work as its meant to. I just get null values from the component that the timer is tied to and the arrow of the timer is red does this indicate that its working or not working. I've made sure that the global abort is free for timers but nothing is happening?
Hi Danny,
could you have a look if this definition is working for you?
It is meant to work with Grasshopper version 0.6.0019. To check if you have it, click on Help -> About. If it still does not work, could you please send me your Grasshopper log after opening the definition (send to the email address below)? For that, click on View -> Event Log -> Save As...
- Giulio
______________
giulio@mcneel.com - Barcelona
Thanks for this I think I have identified the problem, I'm currently using a pre-release version of GH for testing 0.6.00030 and there does not seem to be an EH_OGLShader
21:47:58 (+270ms): Error: The type or namespace name 'EH_OGLShader' does not exist in the namespace 'Grasshopper.Kernel.Types' (are you missing an assembly reference?) (line 113)
I'll email the file when I get to work tomorrow if it helps.
You can use the timer to periodically expire a single object. The timer frequency does not represent that actual time between ticks, but rather the idle time between the completion of one solution and the start of the next. So, typically the actual tick frequency is the timer frequency plus the time it takes to recompute the solution.
Timers are used mostly to read out serial port data or to parse textfiles.
You can use the timer to get the current system time, which could be used to animate something without use of sliders.
Using a timer itself will not get you there. If you want to change some data every interval, then use that new data fot the next iteration, you either have to find a way to store that data outside the Grasshopper data structures, or you have to somehow link the time variable to the data.
Solutions:
1) Store the point as a static variable inside a Script component., then increase whenever the RunScript function is called.
2) write the data to a file, then read that same file on the next iteration, move the point, overwrite the file again.
3) Use a Script component to extract the total number of seconds that have passed since time T, then feed that number info the point component.
What if you want to send packets of information to a serial port in specific intervals?
let's say i want to send the travel distance in Z axis every 2 seconds?
I guess what I have in mind is a component that works similar to the Metro object is max/msp and pd.
is there an example definition for the timer that you suggest looking at? I can't figure out how i'm supposed to work with it.