Simple Ruby Ramp Function

Post any examples or modules that you want to share here
Post Reply
User avatar
aronb
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA
Contact:

Simple Ruby Ramp Function

Post 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 1014 times


Any help is greatly appreciated :!:

Thank You,

Aron
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Simple Ruby Ramp Function

Post 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.
Attachments
Ruby_Ramp_to_Forum[tula].fsm
(6.22 KiB) Downloaded 1093 times
"There lies the dog buried" (German saying translated literally)
Post Reply