How can we help?

PCSDB Custom Variables

You are here:
< All Topics

Custom Defined PCSDB Variables

The PCSDB Custom Variables can be used to track a few different types of data. Many aspects of a variable can be stored and retrieved including the amount of time since a variable has changed, the current value of a variable, historical data for a variable, and the color indicators based on the value of a variable, which can be used in conjunction with the RTV. PCSDB Custom variables can be defined in the DataXchange tab under the Variable button. These variables can be added here to be utilized in Custom Commands.

Custom variable values and indicators can be displayed in the RTV Grid or with an ODI screen. More information here and here.

Two kinds of PCSDB custom variables exist. The Variable → PCS Custom option allows creation of standard custom variables. These variables can only be sent data a maximum of once per minute.

The Variable → PCS Data option looks very similar but these variables can receive an unlimited amount of data. These variables require a platinum license in order to be used.

Setting Custom Variables

PCSDB Custom Variables are set when using the Send variables in the Target. For example, let us say that we want to use a custom variable to display the current value of the coolant level in an MTConnect enabled piece of equipment. An MTConnect custom variable and a PCSDB custom variable, each named coolant_level, are used in this example.

The following expression could be used:

[MTC.coolant_level] != [PCSDB.custom_variable_value] {coolant_level}

With the result:

[PCSDB.send_custom_variable_value]{coolant_level} == [MTC.coolant_level]

Note: a single equal sign is used to compare the variable to a value and will result in a True or False statement. A double equal sign is used to set the variable to the associated value.

In some cases you may want to send a value to a custom variable that includes parameters. In that case you will need to enclose the variables in parenthesis. For example:

[PCSDB.send_save_custom_variable_value] {pad_probe_delta}==([Focas.macro_variable] {584})

 VariablesDescription
Send Custom Variable Value PCSDB.send_custom_variable_value{variableName}This will set the value of the associated variable name to a value if a value is provided and set the time stamp for the variable to the current time.  If a value is not provided then the value will be set to Null and only the time stamp will be updated.
Send Custom Variable Indicator PCSDB.send_custom_variable_indicator{variableName}This will set the indicator of the associated variable name to the color provided.

When send_custom_variable_value is used in the Target field, the associated variable will be updated with the new value that it is being set to and the Time Stamp will be updated with the current time when the associated expression becomes true. If send_custom_variable_value is used in the Target field and a value is not provided then the value of the variable will be set to Null, but the Time Stamp will still be updated.

Additionally, it may be necessary to add double parenthesis in an expression that uses parameters on both side of the operation. AN example of this would be:

This …

([PCSDB.custom_variable_time] {equipment_connect_time} > [PCSDB.prev_custom_variable_time] {equipment_connect_time}) 

… becomes this …

(([PCSDB.custom_variable_time] {equipment_connect_time}) > ([PCSDB.prev_custom_variable_time] {equipment_connect_time})) 

The Gold level Custom Variable Target variables work the same as the Silver level variables with one addition, and that is that all of the data is kept. This would allow not only the current value to be displayed, but it would also allow historical values to be displayed in a trend chart or analyzed for patterns.

 VariablesDescription
Send and Save Custom Variable Value PCSDB.send_save_custom_variable_value{variableName}This will set the value of the associated variable name to a value if a value is provided and set the time stamp for the variable to the current time.  If a value is not provided then the value will be set to Null and only the time stamp will be updated.  If a value is provided then the data will be stored for historical purposes.
Send Custom Variable Indicator PCSDB.send_save_custom_variable_indicator{variableName}This will set the indicator of the associated variable name to the color provided.  The data will be stored for historical purposes.
Send Acquired Data Value PCSDB.send_data{variableName}This will set the value of a PCS Data variable up to once per minute.
Send High Speed Acquired Data Value PCSDB.send_data_hs{variableName}This will set the value of a PCS Data variable as often as updated data is available.

Reading Custom Variables

Once custom variables have been set, the following Silver level variables can be used in expressions for a variety of purposes. These variables are used in Expressions and they will hold the most recent information set by the Send variables.

 VariablesDescription
Custom Variable Value PCSDB.custom_variable_value{variableName}This will hold the a value that was sent to the associated variable name. 
Custom Variable Current Time PCSDB.custom_variable_time{variableName}This will hold the time at while the variable value was last set.
Custom Variable Indicator PCSDB.custom_variable_indicator{variableName}This will hold the color code of a color that was sent to the associated variable name. Color Code formula: (Hex Code) - 16,777,216 = Color Code

See the examples listed below:

Example 1

Example 2

Table of Contents