Page 1 of 1

Simple Ruby Ramp Function

Posted: Tue Oct 18, 2016 4:55 am
by aronb
Hi,

I have a Ruby question / issue and need some help please.

I am trying to compute a function in this case a simple ramp, which I will use to do something in the schematic - I guess you could think of this as a triggered knob starting at zero and going up to a value over time.

It is my understanding (from reading the User Guide page 148):

A ruby schematic runs at ~100Hz, so in mu code each step from 0 to 100 should occur every 10ms, and thus counting to 100 should take ~1 second, so this code should produce a ramp out of 0 to 1, in 1 second.

But something is wrong :( It appears to be triggering, but yet I get no ramp on the output :evil:

Here is my code:
Ruby_Ramp_to_Forum.fsm
Not Working...
(6.28 KiB) Downloaded 1015 times


Any help is greatly appreciated :!:

Thank You,

Aron

Re: Simple Ruby Ramp Function

Posted: Tue Oct 18, 2016 8:29 am
by tulamide
You have a wrong understanding of how Ruby works. I don't have the time to explain it in detail, but try this fsm instead.