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
2 posts
• Page 1 of 1
Simple Ruby Ramp Function
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
Here is my code:
Any help is greatly appreciated
Thank You,
Aron
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
Here is my code:
Any help is greatly appreciated
Thank You,
Aron
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: Simple Ruby Ramp Function
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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 26 guests