Page 2 of 3
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 12:18 am
by tulamide
After this little commercial break we're back with our guest tulamide. And here's $500,000 question:
In Flowstone, when you want to sample and hold something, you have to
a) use a sample and hold prim
b) hold a prim to sample
c) sample a prim to hold
d) use a prim to sample a hold
... What did you say? Ah, that's the correct answer. So this is the million dollar question:
If you don't use a sample and hold prim to sample and hold something, you are
a) a dumb-ass
b) a big-ass dumb-ass
c) a big-ass silly-ass dumb-ass
d) all of the above
(At least it doesn't change a thing, it's still not working, now the index value isn't triggered anymore)
billv wrote:Not at my cpu...will check later...
Thank you so much! Maybe it's easier than I think right now. But I tried to solve it for so many days now, that I probably don't see the wood for the trees. A fresh pair of eyes might, though.
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 2:07 am
by Perfect Human Interface
tulamide wrote:no unneccessary triggers arrive at the input. But an additional one is created when switching the trigger switch to false!
You need to block the trigger going to the bool input.
Here's a prim-skinned module from Trog.
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 7:39 am
by billv
Took a look..didn't like the look of the s+hold idea...so i started from scratch.
I ended up using just 2 green multiplexers, with the index controlling it.
Values go through, and only active output(via index) receive triggers.
This is the behaviour you require..?.... please confirm..
Module seems fine, but the result (drawing)looks all wrong.
Not sure whats going on in rest of schematic.
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 7:57 am
by tulamide
billv wrote:Took a look..didn't like the look of the s+hold idea...so i started from scratch.
I ended up using just 2 green multiplexers, with the index controlling it.
Values go through, and only active output(via index) receive triggers.
This is the behaviour you require..?.... please confirm..
Module seems fine, but the result (drawing)looks all wrong.
Not sure whats going on in rest of schematic.
To answer your question: Yes this is the behaviour I require. But I also tested witch multiplexers, with selectors and other circuits - with the same result. Drawing just isn't right. The only way I got it right was by using trigger switch. Maybe it has something to do with the following answer?
Perfect Human Interface wrote:You need to block the trigger going to the bool input.
Here's a prim-skinned module from Trog.
Thank you very much for the module! Goes into my toolbox. I can't use it here, because the index is only sent once (at start of dragging), while the x/y pair gets sent whenever changed while dragging is active. So I think the solution (like I tried with trigger switch) is to use the triggers from the x/y inputs but with a blocking generated from the one-time sent index.
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 8:27 am
by billv
tulamide wrote:The only way I got it right was by using trigger switch
I got same result in the drawing with trigger switch.
My main issue is that i can only move one point, as the index is stuck on 3.
Looking at "point in area" & "get active point".. ATM...
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 8:47 am
by tulamide
Now I'm totally confused. Read your notice and opened up the version with trigger switch. Also stuck on index 3. Putting a trigger counter at the output of "point to index" tells me that no index value is sent. I further investigated and saw an issue with the circuit of "get active point": If one of the select prims is already true (in this case index 3) nothing is sent (as if not triggered).
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 9:03 am
by tulamide
I think I solved it!!!!!!!
What I did: I added a s&h with a value that will never be reached from any of the points. I trigger that s&h from a bool to false added to the boolean indicating if dragging is active. So, every time dragging ends, one x/y pair that is intentionally invalid is sent to "point in area", forcing it to reset all booleans to false.
I can move each point in any order. I hope this is the solution!
Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 9:11 am
by tulamide
Yes, I'm absolutely sure. Whatever I tried, I couldn't produce any errors anymore. It works! It really works!! Finally!!!
billv, thank you so much. Really. Without you looking at the schematic and finding the issue with the stucked value I would still tweak around in the wrong module! You are my hero (for this day

)
WOOOOOOHOOOOOOO

Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 10:11 am
by billv
tulamide wrote:Whatever I tried, I couldn't produce any errors anymore
Great job man...
I"m glad you got it..It was getting a bit tricky..
(after half hour stuck on index 3 I bailed out for the night.. )
Cheers

Re: Trigger Switch Issue
Posted: Wed Sep 17, 2014 10:17 am
by tester
And final note, from the dreaming state around Stage II and III. If you have "extensive" portions of green data, connected logically (i.e. without timers on the way), and due to multiple connections on the way you are not sure what may happen - the simplest way to control the order of events is:
a) connect your ent point of greenery to the sample&hold data node
b) use last wire connected from start point, to trigger that sample&hold prim.
Now - even if in-between there are many green operations going, on large arrays and fast data processing - the schematic will wait until they are finished, and then retrigger S&H, so no worries about triggers; it's not a matter of time, it's a matter of order.