Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Simple Ruby Ramp Function

Post any examples or modules that you want to share here

Simple Ruby Ramp Function

Postby aronb » Tue Oct 18, 2016 4:55 am

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 954 times


Any help is greatly appreciated :!:

Thank You,

Aron
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: Simple Ruby Ramp Function

Postby tulamide » Tue Oct 18, 2016 8:29 am

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 1037 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to User Examples

Who is online

Users browsing this forum: Google [Bot] and 26 guests