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

Iterators

For general discussion related FlowStone

Iterators

Postby vpnsoluk » Thu Oct 28, 2010 9:17 am

In labview you can wrap each block in an interator (called a 'for' or 'while', but that's just a name). I can't find anything simplar in FlowStone.

The iterator becomes a container for the schematic within the iteration wrapper, and the ports externally are either mapped to indexes of that loop or connected straight through. The parameters to the loop are either a boolean condition or a range.

This creates a means of 'step and repeat' allowing a simple circuit to assemble or disasemble arrays of signals as well as process array entries in some way to create another signal. Omitting the limits on the array would process the entire array.

E.g.1. In it's simplest form, an array of 10 integers would be an int constant widget wrapped in a for loop of range 1..10.

E.g.2.
A more complicated example might be complex signal generator with 100 prime factor frequencies. This would be realised as a single signal generator in a loop (1..100) with an external prime number generator which supplies an array. The frequency of the generator is a multiple of the prime entry in the array pointed to by the loop index. The output is simply a sum signal array function externally to the loop.

Currently to implement this we would have a very huge schematic.

Compared to LV I can see another way to visualise this that may be tidyer. Simply have an 'iterate' parameter to each module, then display that module graphically with a shadow to illustrate that it occurs more than once. A selection on each port would decide if that signal is mapped to the index or not. Turning on iterate would expose a boolean or number of int ports depending on the iteration type.
vpnsoluk
 
Posts: 8
Joined: Wed Oct 27, 2010 5:28 pm

Re: Iterators

Postby admin » Thu Oct 28, 2010 1:13 pm

Would the Int Loop component be what you're looking for?

Here's an example that generates 10 pseudo-random numbers:

randloop.png
randloop.png (46.15 KiB) Viewed 14692 times
User avatar
admin
Site Admin
 
Posts: 231
Joined: Tue May 11, 2010 6:30 pm

Re: Iterators

Postby admin » Thu Oct 28, 2010 4:26 pm

In FlowStone you can tidy up your schematic by using 'Make Module', you can then make your own modules!

Select a group of modules or elements on the screen and then click 'Make Module' (bottom left next to the 'X'), all of the ins and outs are created automatically!
User avatar
admin
Site Admin
 
Posts: 231
Joined: Tue May 11, 2010 6:30 pm


Return to General

Who is online

Users browsing this forum: No registered users and 23 guests

cron