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

Stream Sample and Hold Problem.

For general discussion related FlowStone

Stream Sample and Hold Problem.

Postby Perfect Human Interface » Sat May 23, 2015 9:02 am

I'm having trouble getting anything out of this stream Sample and Hold module. If anyone could tell me what I'm doing wrong that would be appreciated!
Attachments
Sample and Hold Problem.fsm
(9.68 KiB) Downloaded 737 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stream Sample and Hold Problem.

Postby nix » Sat May 23, 2015 9:36 am

Heya!
Glad I can help.
The 0 crossing s&h need to rise from minus to plus to sample->
Sample and Hold Problem_mod.fsm
(10.01 KiB) Downloaded 750 times


Enjoy the linkage
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Stream Sample and Hold Problem.

Postby Perfect Human Interface » Sat May 23, 2015 11:19 pm

Thanks so much Nix!

Looks like whomever wrote this left out an equals sign.

Oops.PNG
Oops.PNG (7.54 KiB) Viewed 9529 times


Now it works in the 0 -> 1 case.
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stream Sample and Hold Problem.

Postby Youlean » Sun May 24, 2015 12:10 am

If you need, here is immediate sample and hold...
Attachments
Hold.fsm
(304.19 KiB) Downloaded 727 times
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Stream Sample and Hold Problem.

Postby Perfect Human Interface » Sun May 24, 2015 12:24 am

That's an interesting method Youtlean. You could add a line to make it hold when > 0 rather than just either 0 or 1.

Hold2.PNG
Hold2.PNG (3.76 KiB) Viewed 9524 times


Perhaps this is slightly faster than the above?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stream Sample and Hold Problem.

Postby Perfect Human Interface » Sun May 24, 2015 12:52 am

Here, I took Youlean's code and tweaked it so it accepts stream bool or zero cross. Stream bool is probably the best method overall since you can use them with the stream compare prims.

Edit: Ok so just so it's clear to everyone (now that I realize it myself) this kind of "sample&hold" only holds so long as the bool is true and passes the signal otherwise, while the above module I was originally working with samples when the control value goes from <0 to >0 and holds until the next time it samples. Useful for different things.
Attachments
Hold_PHI edit.fsm
(585.56 KiB) Downloaded 744 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm


Return to General

Who is online

Users browsing this forum: No registered users and 51 guests