From: young@chama.eece.unm.edu (Mark Young)
Newsgroups: comp.soft-sys.khoros
Subject: Re: A khoros question
Date: 13 Oct 92 00:19:40 GMT

On Oct 12,  3:37pm, Cindy Peck (303) 939-4513 wrote:
} Subject: A khoros question
} From: 33.283::peck@longs.ucar.edu (Cindy Peck (303) 939-4513)
} 
} Hello,
} 
} 	I am an engineer at Ball Aerospace in Boulder, CO.  I am
} working with Khoros version 1.0.  I have been using Khoros for
} three months and think it is a great package.  I am assisting in
} the development of an adaptive optics model.  I have developed
} several glyphs for this model which work independently.  Now I
} am beginning the task of integrating the glyphs together to form
} a control loop and have gotten stuck.
} 
} 	I have encountered the following problem:  I have developed
} a glyph which computes the variance for an image data matrix.  Each
} time the glyph is executed, another variance value is computed and
} placed in the variance vector, e.g., [o1 o2 o3 o4 ...].
} 
} 	I have now created a workspace which implements the variance
} vector glyph and includes a count loop glyph.  In order to continuously
} update the variance vector, the output is re-fed back through the input
} of the glyph like so:
} 
} 		----------
} 		|*   *  *|
} 		|->    ->|--
} 	     	|        |/
} 	      /	|        |
} 	     ---|->      |
} 		----------
} 
} 
} 	When I execute this glyph manually, the glyph executes without
} error, and knows that input data is available.  However, when I try to
} run the system of glyphs using the "RUN" button on the left side of the
} cantata workspace, an error occurs for the variance vector glyph with
} the feedback loop, and the error states that no input data was available.
} 

[misc. return  deleted]

} 
} thank you,
} Cindy Peck
} 
}-- End of excerpt from Cindy Peck (303) 939-4513

It looks like the problem is that you are connecting the final loop output
into the count's "Loop input".  The following two examples may help.  They are
directly from cantata's online help on count loops.  There is also another
help page with general information about count loops which may also help
explain what the different parameters are.


			hope this helps,
				Mark



Here is the examples from cantata's "loop_examples" help page:

     COUNT-LOOP EXAMPLES

     The following illustrate the use of the count-loop control
     glyph to construct counting loop structures within cantata
     flow graphs.

     Loop with NO Feedback

     To construct a loop with NO feedback or to use the SAME
     input to the loop each time, connect the loop output back to
     the loop input.

                   ------------
          Input ---|=>      =>|----- Final output (optional)
       (optional)  |          |
                 --|=>      =>|--*--- Sequence of glyphs to
                |  |count_loop|  |    be executed each time
                |  ------------  |    through the loop
                |                |
                 ----------------

     Loop with Feedback

     To construct a loop that recycles a value produced within
     the loop to be used as input the next time through the loop,
     connect the desired glyph output back to the `Loop Input'.

          Note: Since all children of a loop glyph are executed
          BEFORE the loop is re-executed, feedback may be taken
          from any point within the loop sequence.

                   ------------
          Input ---|=>      =>|----- Final output (optional)
       (optional)  |          |
                 --|=>      =>|----- Sequence of glyphs to ---
                |  |count_loop|      be executed each time    |
                |  ------------      through the loop         |
                |                                             |
                 ---------------------------------------------