Memory Slots

Prev Next

Overview

Pathfinder Core PRO's memory slots provide a named location for storing data that can be used in Logic Flows. You can create and view memory slots via Automation > Memory Slots. You can also monitor the slot’s changes in real time and change the value of a memory slot directly from this page.

The list shows each slot's current Value, its StartupState and StartupValue, its Type and whether it is Persistent. Type in the Search box to filter the list. When a search matches a slot inside an array, the array is shown with it.

Add a memory slot by clicking the Add + button at the bottom-right corner of the memory slot list.

The Memory Slot Editor opens over the list.

Select the memory slot type you want to create from the Type drop-down. The available properties change depending on the memory slot type. Several properties are common to all or most memory slot types, as described here.

Common Memory Slot Properties

Property Name

Description

Name

Each memory slot must have a unique name within the system. A slot inside an array only needs a name that is unique within that array.

Value

Unless the memory slot's value is derived from other information, the value property allows you to change the current value.

Startup State

The startup state defines how an initial value for the memory slot is obtained when the system first starts. For details, see the section on startup states.

Startup Value

Shown when Startup State is StaticValue. This is the value the slot takes when the system starts.

Persistent

Defines whether the memory slot is retained between restarts or is only temporary. The default and by far the most used option is persistent.

Each memory slot may also have additional properties according to its type, as described below.

Working With the Memory Slot List

Changing a Value

Click the edit icon next to a slot's value to change its current value without opening the editor.

This changes the current value only. The startup value is not changed, except when the slot's Startup State is LastKnown, when the current value is always the value the slot will start with.

When a slot's Startup State is StaticValue, a second edit icon appears in the StartupValue column. Use it to change the value the slot starts with, without changing its current value.

Selecting, Cloning and Deleting Several Slots

Use the check boxes at the left of the list to select slots. A toolbar appears above the list with the number of slots selected and three buttons:

  • Clone Selected creates a copy of each selected slot.

  • Delete Selected deletes every selected slot, after asking you to confirm.

  • Clear Selection deselects every slot.

To copy a single slot, click clone in its row. Memory Slot, Latching and Numeric slots can be cloned.

To delete a single slot, click the trash icon at the right of its row.

Memory Slot Types

Pathfinder Core PRO has seven types of memory slots, each with its own options and properties.

Memory Slot

This is the traditional memory slot, which can store any kind of data. Its parameters are shown below:

All parameters for this memory slot are described in the common properties section above. When Startup State is set to StaticValue, a Startup Value field appears:

Latching

The Latching memory slot can only have a value of True or False. It has a write-only property called Trigger that changes the memory slot's value. Using a Logic Flow endpoint, you can set the trigger property to true, and the slot value toggles from true to false or from false to true, depending on its current value. See the latching example in the Logic Flows section of this manual for more details. The configuration properties for this slot type are shown below:

All parameters for this memory slot are described in the common properties section above. However, the value and startup value property fields become drop-downs that only allow a value of True or False.

Numeric

Numeric memory slots allow you to store, retrieve, increment, and decrement a numeric value. Their write-only properties, listed below, can be used in Logic Flows to change the value of a memory slot. This type of memory slot can also accept a range, and the loop action option specifies what happens when the value increments or decrements outside the range. Its parameters are shown below:

In addition to the properties outlined in the common properties section above, this memory slot type includes two additional properties: Range and Loop Action. If the range field is left blank, the numeric memory slot accepts any numeric value. If you apply a range by filling the range field with a low and high value separated by a hyphen, then increment and decrement will not exceed the specified range. The Loop Action property only works with a range and does nothing if no range is specified. The Loop Action field defines what happens when you try to increment or decrement beyond the specified range as follows:

  • None = Incrementing beyond the max or decrementing below the min will do nothing and no change will be applied to the Value.

  • Forward = Incrementing beyond the max will cause the value to loop back to the min, but decrementing below the min will make no changes.

  • Backward = Decrementing below the min will cause the value to loop to the max, but incrementing beyond the max will make no changes.

  • Both = Incrementing beyond the max will cause the value to loop to the min value, and decrementing below the min value will cause it to loop to the max value.

These properties make it easy to enforce a valid range on a numeric memory slot and to implement things like paging functions, where paging beyond the maximum number of pages will take you back to page 1.

The Value and Startup Value fields only accept numbers.

Write-Only Properties

Numeric memory slots have write-only properties that Logic Flows can set to change the slot's value. Each one takes the value written to it:

Property

Effect

Increment

Adds the written value to the slot's value.

Decrement

Subtracts the written value from the slot's value.

Multiply

Multiplies the slot's value by the written value.

Divide

Divides the slot's value by the written value, keeping any decimal places.

DivideRound

Divides the slot's value by the written value and rounds the result to the nearest whole number.

Round

Sets the slot's value to the written value rounded to the nearest whole number.

Floor

Sets the slot's value to the written value rounded down to a whole number.

Ceiling

Sets the slot's value to the written value rounded up to a whole number.

SapProperty

SapProperty memory slots allow you to map the value of any Sap Property in the system to this memory slot's value. When this Sap Property value changes, the slot is updated with that value. Its configuration parameters are shown below:

In addition to the properties outlined in the common properties section above, this memory slot type includes two additional properties: Object Path and Property Name. Click the ellipsis button next to Object Path to select the Sap Property for this slot. It opens a property selection dialog like the one used to edit Logic Flow endpoints. Once a property is selected, the object path and property name are filled in from your selection.

The value and startup state properties are not present in the configuration because the value is filled in dynamically from the value of the selected Sap Property. This value is then available to Logic Flows. It can also be used to create custom values when used with the String Builder memory slot.

String Builder

The String Builder slot allows you to build a string based on values in other Memory Slots. Its parameters are shown below:

In addition to the properties outlined in the common properties section above, this memory slot type includes two additional properties: Included Slots and Pattern. The Included Slots field is used to enter a comma-separated list of memory slot names to use in the builder. The ellipsis button opens a list of slots to select from. The order is important as described by the Pattern. The Pattern field is a text pattern with bracketed numbers that mark where slot values from the comma-separated list are inserted.

In the example above, {0} will be replaced with the value of SlotA and {1} will be replaced with the value of SlotB. If SlotA’s value is "Fred" and SlotB’s value is "Telos Alliance", the value of this new memory slot called MyBuiltSlot would be: The Name is Fred and it is located at Telos Alliance. The value of this slot will update whenever SlotA or SlotB updates. This slot can be used to build text that is then used as labels on buttons or commands to generic emulators. When the included slot list contains slots that are Sap Property Memory Slots, this memory slot type can become even more powerful.

Time Stamp

The Time Stamp Memory Slot can be used to capture time stamps, which is useful for displaying the last time something happened in a user panel. Its parameters are shown below:

In addition to the properties outlined in the common properties section above, this memory slot type includes one additional property: Pattern. When you first create a time stamp memory slot, you will probably not apply a value. The pattern field can also be left blank, in which case the system's default date and time format is used. Use it to specify the format of the time stamp, as described in more detail below.

Time Stamp memory slots have three write-only properties that Logic Flows can set:

Property

Effect

SetTimeStamp

Writing True sets the slot to the current date and time.

SetTimeStampPlus

Sets the slot to the current date and time plus the written number of milliseconds.

ConvertTimeStamp

Converts the written value to the slot's pattern, as described below.

After creating the time stamp memory slot, it can be used in Logic Flows by applying an endpoint to the SetTimeStamp write-only property of the memory slot. For example:

This Logic Flow will set the memory slot to the current date and time every time the specified GPIO pin goes low.

The time stamp memory slot can also be used to convert values from one time format to the pattern specified in the time stamp memory slot. Use the write-only ConvertTimeStamp property to do this. For example, you could assign a number with m, h, or s at the end, and it would convert the value to the requested format in minutes, hours, or seconds. If the time stamp memory slot pattern was:

hh:mm:ss

and you passed in

100s

to the ConvertTimeStamp property, the value of the memory slot would become 00:01:40.

If you pass a time value other than a plain number, the slot tries to interpret the value as a time, convert it, and then express it in the correct pattern.

Array

An Array memory slot holds a group of memory slots, called members. Each member is an ordinary memory slot of any type, including another array, so arrays can be nested. Use an array to keep related slots together, such as every slot that belongs to one studio. A Logic Flow, User Panel or third-party application that subscribes to the array receives every member, at every level, through that one subscription.

To create an array:

  1. Click Add + below the list, choose Array Memory Slot as the Type, and type a Name. An array has no value, persistence or startup settings of its own, so these are the only fields.

  1. Click Apply. The array appears in the list, empty.

  2. Click the array's edit link. The editor now shows a Members panel with the array's path.

  3. For each member, choose its type from the drop-down below the members (Memory Slot, Latching, Numeric, SAP Property, Text Builder, Timestamp or Array), type its name, and click + Add Member.

  1. Use Edit to set a member's value and other settings, or Del to delete it, then click Apply.

Once members have values, the editor shows them in the members table:

Members are created inside the array. An existing slot cannot be moved into an array.

In the list, an array shows the names of its members. Click the arrow next to an array's name to show or hide its members, which can be edited like any other slot.

Some rules apply to arrays:

  • An array is always persistent, and its Startup State is always LastKnown. Its members keep their own Persistent and Startup State settings.

  • An array has no value of its own. In the list, its Value column shows its members' names. Writing a value to the array writes that value to every member.

  • A member's name only needs to be unique within its array.

  • Deleting an array deletes all of its members.

Startup State

The startup state drop-down applies to each of the memory slot types above except SapProperty, and requires some explanation. This option sets the value of the slot when the system first starts, before any flows are executed. It can be:

  • Blank: blank.

  • StaticValue: a fixed value as defined in the slot's Startup Value.

  • LastKnown: last known.

The last known option tries to store the state in the database each time the memory slot state changes. This can be more CPU- and time-intensive because of the storage within Pathfinder Core PRO. As a result, do not use this option where the flows will reset the memory slot to the correct state from the existing state of Axia devices when they start up anyway.