PCSDB Constants
Previous Topic  Next Topic 


PCSDB Constant Overview


There are many cases where expression uses a value such as an amount of time that must be exceeded before the expression will become true.  This section provides a solution where you can create constants for extended customization in expressions.



In order to create a PCSDB Constant you will need to select Add


Constant - This will be the constant used in logic building.

Display Name - This is the name of the created constant.

Constant Value - This is displayed in a numerical value representing time. In this case it is seconds.

Description - This is where you can provide a description of the constant you have created.


Select Enter to save your new constant.



Here are a few example Constants:


constant: cycleEndDelay

constantDisplayName: Cycle End Delay

constantValue: 30

constantDescription: A delay after a cycle has stopped before sending the cycle end



constant: emailDelay

constantDisplayName: Email Delay

constantValue: 600

constantDescription: A delay after an event before triggering an email



Examples


Here's an example of the expression when a machine has been in unknown downtime for more than 30 seconds. Imagine if this was assigned to 30 machines, and you needed to make a timing adjustment. Each expression would need to be manually adjusted.


([PCSDB.general_equipment_status] = [PCSDB.UNKNOWN_DOWNTIME]) AND

([PCSDB.general_equipment_status_time] > 30) AND

([PCSDB.prev_general_equipment_status_time] <= 30)


Now let's create this same expression using the constant cycleEndDelay:


([PCSDB.general_equipment_status] = [PCSDB.UNKNOWN_DOWNTIME]) AND

([PCSDB.general_equipment_status_time] > [PCSDB.constant]{cycleEndDelay}) AND

([PCSDB.prev_general_equipment_status_time] <= [PCSDB.constant]{cycleEndDelay})


Because these PCSDB Constants are independent of the expression, changing the constant value of cycleEndDelay will cascade the adjustment to all machines assigned. This eliminates the steps of making the changes to each expression on each machine which is time consuming and can lead to mistakes. Additional information on expressions is available here.