コンテンツにスキップ
STAGING SERVER
DEVELOPMENT SERVER

Array Creator vTool#

The Array Creator vTool collects elements from one or multiple sources and combines them into separate output arrays.

The Array Creator accepts elements of different types, e.g., images or regions, via Element input pins and outputs the combined elements via Array output pins.

Download the pylon Software Suite to use the Array Creator vTool.

Array Creator vTool

仕組み#

The Array Creator is designed to be used in combination with the Array Element Iterator for flexible array processing in recipes but you can also use it on its own with other vTools.

On each update, i.e., data arriving at an Element input pin, the Array Creator reads the index and writes the values from each Element input pin into the corresponding output array at that position. If a value at a given index is written multiple times, the most recently received value overwrites any previous value. You can create up to a maximum of 100 Element input pins. The same number of Array output pins will be created.

The Index input pin specifies the position at which each new element is written into the corresponding output array. The LastIteration input pin signals the end of a sequence, at which point the collected arrays are output.

The data type of the Array output pin will be the same as the data type input at the Element input pin.

情報

If you're using the Array Element Iterator, you have to connect the LastIteration and Index input pins for the Array Creator to work correctly. Without these pins, the vTool can't determine the position at which to write incoming elements or when to emit the collected arrays. If one of the pins is left unconnected, every update produces arrays with an array-level error on all output pins and no data is collected.

If true is received on the LastIteration input pin and a valid input is received at the Index input pin, the elements received are stored as usual and then all arrays are output. If true is received on the LastIteration input pin but no Index input is received, any values from the Element input pins are ignored and the arrays are output as they are, containing all values collected so far. After output, all internal arrays are reset to empty.

Error Handling#

Missing required connections: If either the LastIteration or the Index input pin is not connected, every update produces arrays with an array-level error (LastIteration and Index input pins must both be connected.) on all output pins and no data is collected.

LastIteration with errors: If the LastIteration input pin receives a value with an error state, the Array Creator outputs arrays with an array-level error (Element with errors received on LastIteration input) on all output pins and resets its internal state.

Invalid index on last iteration: If true is received on the LastIteration pin and the Index value is invalid (negative, exceeds the Maximum Number Of Elements limit configured, or has an error state), arrays with an array-level error (Index out of range) are output on all output pins. All previously collected values are discarded.

Invalid index on non-last iteration: If false (or no value) is received on the LastIteration pin and the Index value is invalid (negative, exceeds the Maximum Number Of Elements limit configured, or has an error state), the Array Creator logs an error and ignores the update. Previously collected values are preserved.

Elements with errors on input pins: Incoming elements with error states are not treated differently from valid values and are forwarded transparently into the output arrays.

Uninitialized positions: If the Index input causes gaps in the output arrays (e.g., index jumps from 0 to 3), the intermediate positions (e.g., 1, 2) are filled with an error value (No element received at this position.).

vToolの設定#

To configure the Array Creator vTool, double-click it in the Workbench. A dialog opens showing all the available settings. Alternatively, you can find the same settings in the Features - All pane.

入力#

ElementN#

Accepts data from any vTool. The data type of the pin adapts automatically to the first input provided. All simple data types (e.g., String, Float, Boolean, Integer, PointF2D, etc.) are supported but not array types.

  • Data type: Boolean, CircleF, EllipseF, Float, Image, Integer, LineF, PointF, RectangleF, Region, String, Transformation Data

LastIteration#

Accepts true or false from the Array Element Iterator which indicates whether the current element is the last one to complete the array. If true is received, the Array Creator outputs the collected arrays and resets its internal buffers to be ready for the next sequence. If no value is received on this pin during an update, the vTool assumes false (not the last iteration).

  • Data type: Boolean

Index#

Accepts the index position (integer) related to the input received at the ElementN input pin. The element is then written into the corresponding index position in the output array. If the index received exceeds the current size of an array, the array is resized accordingly. Unused positions are filled with error values.

  • データタイプ:整数

出力#

ArrayN#

Returns one array per Element input pin. The array contains all values collected from the corresponding input pin across the iteration sequence. The arrays are output when true is received on the LastIteration input pin. Elements at positions that were never written are filled with error values.

  • Data type: Array of the data type input via the corresponding Element pin