Page 1 of 1

What is the best way to create optional input pins?

PostPosted: 22. Dec 2009, 12:44
by mga
Hi

So I'd like to have some input pins that would default to a certain integer, but could be overridden easily.
I need to have them in some basic building block and expose them to the interface of some compound component including the basic building block.

Any hints?

Thanks

Markus

Re: What is the best way to create optional input pins?

PostPosted: 22. Dec 2009, 12:49
by mga
Ok, just got the answer: go to the schema and freeze the value to some default value, which can be overridden later.

Re: What is the best way to create optional input pins?

PostPosted: 22. Dec 2009, 13:11
by mga
...and if you need a default from the environment variable, use "Read from environment variable" in the schema editor.

Re: What is the best way to create optional input pins?

PostPosted: 22. Dec 2009, 16:07
by stefan
This is right - you can freeze an input pin in the block description schema to both constants or environment variables. As long as such an input pin is neither connected nor frozen in the step (this is where a block description is used), the pin will get this frozen value as default.

Note, that usually any input pin is sort of optional, because the block description's policy is "AND-CONNECTED" by default. This means, that a step is scheduled as soon as there is data on each of its connected input pins. But in this case there is no data on these "optional" not connected input pins. If you don''t want this, you can set another policy of course.