{"id":341,"date":"2020-05-01T02:23:38","date_gmt":"2020-05-01T02:23:38","guid":{"rendered":"https:\/\/dxhelpdev.wpengine.com\/?post_type=epkb_post_type_1&#038;p=341"},"modified":"2023-07-24T23:14:16","modified_gmt":"2023-07-24T23:14:16","slug":"variable","status":"publish","type":"epkb_post_type_1","link":"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=variable","title":{"rendered":"Custom Variables"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>The <strong>DataXchange \u2192 Variable<\/strong> section is where you can create a variety of constants and variables for extended customization in expressions.<\/p>\n\n\n\n<p>There are two types of Custom Variables:<\/p>\n\n\n\n<p>PCSDB Custom Variables (PCS Custom, PCS Data) can store machine specific data within the DataXchange PCS Database.<\/p>\n\n\n\n<p>Source-specific Custom Variables (MTConnect, Script, OPC UA, etc) are used to retrieve data from the machine that does not match any of the existing default variables.<\/p>\n\n\n\n<p>The user&nbsp;<strong>Variable<\/strong>&nbsp;button has the following options;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=pcsdb-custom-variables\">PCS Custom<\/a><\/li>\n\n\n\n<li>PCS Data<\/li>\n\n\n\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=mtconnect-constants-and-variables#customvariables\">MTConnect<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=script-source-overview\">Script<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=opc-ua-constants-and-variables#customvariables\">OPC UA<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=haas-ngc-constants-and-variables#customvariables\">Haas NGC<\/a><\/li>\n\n\n\n<li>PCSDB Constants<\/li>\n\n\n\n<li><a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=status-relay-controller-with-ethernet\">SRCE<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"PCSDBConstants\">PCSDB Constants<\/h2>\n\n\n\n<p>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.&nbsp;&nbsp;This section provides a solution where you can create constants for extended customization in expressions.<\/p>\n\n\n\n<p>In order to create a PCSDB Constant you will need to select&nbsp;<strong>Add<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Constant<\/strong>&nbsp;\u2013 The name of the constant used in logic building.<\/li>\n\n\n\n<li><strong>Display Name<\/strong>&nbsp;\u2013 The user-friendly name for the constant.<\/li>\n\n\n\n<li><strong>Constant Value<\/strong>&nbsp;\u2013 The numerical value of the constant. In the examples below it is a number of seconds.<\/li>\n\n\n\n<li><strong>Description<\/strong>&nbsp;\u2013 A description of the constant you have created.<\/li>\n<\/ul>\n\n\n\n<p>Click&nbsp;<strong>Enter<\/strong>&nbsp;to save your new constant. For an example of how to use constants in expressions click <a href=\"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=using-pcsdb-constants\">here<\/a>.<\/p>\n\n\n\n<p>Here are two example Constants:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Constant<\/strong>: cycleEndDelay<\/li>\n\n\n\n<li><strong>Display Name<\/strong>: Cycle End Delay<\/li>\n\n\n\n<li><strong>Constant Value<\/strong>: 30<\/li>\n\n\n\n<li><strong>Description<\/strong>: A delay after a cycle has stopped before sending the cycle end<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Constant<\/strong>: emailDelay<\/li>\n\n\n\n<li><strong>Display Name<\/strong>: Email Delay<\/li>\n\n\n\n<li><strong>Constant Value<\/strong>: 600<\/li>\n\n\n\n<li><strong>Description<\/strong>: A delay after an event before triggering an email<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview The DataXchange \u2192 Variable section is where you can create a variety of constants and variables for extended customization in expressions. There are two types of Custom Variables: PCSDB Custom Variables (PCS Custom, PCS Data) can store machine specific data within the DataXchange PCS Database. Source-specific Custom Variables (MTConnect, Script, OPC UA, etc) are [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"epkb_post_type_1_category":[34,46],"epkb_post_type_1_tag":[],"class_list":["post-341","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-dataxchange-tab","epkb_post_type_1_category-engineers"],"_links":{"self":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341"}],"version-history":[{"count":0,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/341\/revisions"}],"wp:attachment":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fepkb_post_type_1_category&post=341"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fepkb_post_type_1_tag&post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}