ObjectMemoryTool

The ObjectMemoryTool is used to transfer objects/values (Value) beyond the limits of a job. The objects are created in the working memory for this purpose.

The tool provides access to several memory objects, which are addressed by a key ‘MemoryName’. Several variables ‘ValueName’ can be addressed in it. The associated values ‘Value’ are of the data type Object.

Memory addressing takes place in the input terminal via the tuple ‘MemoryName’ and ‘ValueName’. Values to be written are set at the input terminal ‘Value’. Read values are available at the output terminal ‘Value’.

With the first write access the memory object is created in the memory for ‘MemoryName’ and ‘ValueName’ and can then be read/ overwritten. The Fail/RunError error case is triggered when a non-existent memory object is accessed in read mode.

A persistent saving of the objects beyond a program start/PC start can be configured with <ProjectName>.makproj. At the end of the program all objects are saved in the project folder. Cf. Project folders and files

<dataStore name="VisionPluginConfig">
   <param name="persistObjectMemory" value="True" />
</dataStore>

InputTerminals

The inputs can be configured via the ‘Inputterminal’ tab. Alternatively, the inputs of the input terminal can be linked and set under program control. The memory object is addressed across jobs by ‘MemoryName’ and ‘ValueName’.

../../../_images/ObjectMemoryToolInputterminals.png
  1. ObjectMemoryToolInputterminals Registers

  2. Clear Clears the object in memory.

  3. GetValue Reads the object from memory and returns it to the Outputs.Value. If the object does not exist in memory, a RUN ERROR occurs.

  4. MemoryName Memory area name

  5. SetValue Takes the object from the Inputs.Value input and writes this value to the memory. If it does not exist, it is created.

  6. Value Object that is stored.

  7. ValueName Variable name to which the value is assigned.

Configuration

As memory block of objects ‘GetValue’ and ‘SetValue’ must be set to ‘true’. The spoke object must be present at the ‘Inputs.Value’.

As a read block of objects from the memory, only ‘GetValue’ is to be set to ‘true’. The object is output accordingly at ‘Outputs.Value’.

ObjectMemory (Overview)

../../../_images/ObjectMemoryToolOverview.png
  1. ObjectMemory Register

  2. Clear Clears all listed values of the objects (null).

The blue column shows the memory area ‘MemoryName’. Below that, the associated ‘ValueName’ are listed. When using multiple memory areas, they would be grouped below.

Example

../../../_images/ObjectMemoryToolExample.png