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

where/how to add trigger blocker here

For general discussion related FlowStone

where/how to add trigger blocker here

Postby tester » Thu Oct 03, 2013 7:30 pm

Question. Where/how in such thing add trigger blocking, so that the random generator does not produces output when input (values) is changed? And I don't mean clickable S&H on all inputs or on output; the question is - how to block generating itself, so that randomizer produces results only on request.
Attachments
blocker.fsm
(656 Bytes) Downloaded 881 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: where/how to add trigger blocker here

Postby billv » Thu Oct 03, 2013 8:29 pm

blocker_fix.fsm
(684 Bytes) Downloaded 882 times
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: where/how to add trigger blocker here

Postby tester » Thu Oct 03, 2013 8:39 pm

We misunderstood. The problem is, that whatever change on whatever value-based input (first 3 inputs) - produces trigger that generates output. I'd like to avoid that. But also I'd like to avoid multiple generations (if S&H is connected to each individual input - that sort of things will happen). So - individual silent changes on all 3 inputs, and trigger only on demand.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: where/how to add trigger blocker here

Postby trogluddite » Thu Oct 03, 2013 9:06 pm

You need to do this inside the Ruby itself...
blocker V2.fsm
(703 Bytes) Downloaded 939 times

The 'i' variable is the index of the input that has just caused an 'event'. Triggers on other inputs will still update the values of their variables, but by 'filtering' the 'i' value, won't cause any of the array output code to run.
You can't really do the same using 'external' trigger blockers, because the triggers are necessary in order for Ruby to know when to update the '@' variable values (there are no "backwards" triggers from Ruby prim's to request the current values).

You could also give the trigger input a name, and use its name for the 'i' comparison...
if i == "trigger_input" ...etc...
...this is safer, because the name won't change if you add/delete/re-order the inputs, whereas the numeric index might change if you decide to update the module. The 'i' parameter has a special data type that is both number and string, so you can mix numeric indexes and names any way you like.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: where/how to add trigger blocker here

Postby tester » Thu Oct 03, 2013 9:34 pm

Okay, thanks. I suspected that it must be something within ruby code.

I need to gather my thoughts...
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: where/how to add trigger blocker here

Postby trogluddite » Thu Oct 03, 2013 9:50 pm

Yeah, the "no backwards trigger" thing is unlike almost all the other prim's. It's caught me out quite a few times!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: where/how to add trigger blocker here

Postby tester » Thu Oct 03, 2013 10:16 pm

Generally the whole "ruby thing" is a headache maker for me. I'm so used to simple visual modularity, that when I watch at ruby and it's syntax, I simply feel dumb... I don't know if I'm able to cross that borderline.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: where/how to add trigger blocker here

Postby Nubeat7 » Fri Oct 04, 2013 12:12 am

tester wrote:Generally the whole "ruby thing" is a headache maker for me. I'm so used to simple visual modularity, that when I watch at ruby and it's syntax, I simply feel dumb... I don't know if I'm able to cross that borderline.

come on, its you TESTER, you will! just open your mind for it :) the good thing is, after you got some basics it really makes fun exploring it, and its an endless world to test out, and you will see that things become more and more easy with it also more easy than making it the "graphical" way, and after some time you want to program everything in ruby, and i`m still at the beginning, just writing my first own methods.. just give yourself a little time and do small and easy code, it starts to grow by itself then ;)
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: where/how to add trigger blocker here

Postby billv » Fri Oct 04, 2013 12:28 am

mis-understood

Sorry tester...didnt read question properly.
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: where/how to add trigger blocker here

Postby tester » Fri Oct 04, 2013 12:41 am

Nubeat7 wrote:come on, its you TESTER, you will! just open your mind for it :) the good thing is, after you got some basics it really makes fun exploring it, and its an endless world to test out, and you will see that things become more and more easy with it also more easy than making it the "graphical" way, and after some time you want to program everything in ruby, and i`m still at the beginning, just writing my first own methods.. just give yourself a little time and do small and easy code, it starts to grow by itself then ;)


It's just too much for me. Open mind is not a trash. :lol: I repeat over and over - I do these little things in order to use created stuff. My fun is there. Having yet another syntax to deal with - I'm overloaded. If you remember the story/paradox of Pinocchio I posted recently, then you know what kind of computations are on my everyday basis... It's just difficult to flip back to things like... ruby :mrgreen:

BTW - are in nature "divisions by zero" (in terms of programming solutions) present? ;-)
Attachments
divisions-by-zero.fsm
(543 Bytes) Downloaded 868 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Next

Return to General

Who is online

Users browsing this forum: No registered users and 58 guests