Procedures for Tool Members

Tool members are important to save data that needs to be stored with every execution. They are set individually for each tool and are identified by their name. Therefore, it is important to follow the naming convention and make sure the name contains no typos.

The following interface procedures can be used to get a specific tool member or to set a specific tool members to a predefined content.

Procedures

Example

The following code block shows an example how you can use a tool member to store values of multiple execution cycles.

Copy
Me_get_tool_member_tuple (ToolHandle, 'History_HistoryData', History_HistoryData)
History_HistoryData := [History_HistoryData, NewData]
Length := |History_HistoryData|
if (Length > MaxBufferSize)
    History_HistoryData :=  History_HistoryData [Length-MaxBufferSize:Length-1]
endif
Me_set_tool_member_tuple (ToolHandle, 'History_HistoryData', History_HistoryData)

This code block is executed each time the execute procedure of the custom tool is executed. First, the current tuple in the parameter "History_HistoryData" is queried with Me_get_tool_member_tuple. Then, a new value is added to the tuple. In the next step, the length of the tuple is checked and limited to the maximum buffer size. In the last step, the tuple with the new value is then saved again with Me_set_tool_member_tuple.