{"id":2414,"date":"2025-07-15T21:41:47","date_gmt":"2025-07-15T21:41:47","guid":{"rendered":"https:\/\/dxhelpdev.wpengine.com\/?post_type=epkb_post_type_1&#038;p=2414"},"modified":"2025-07-16T16:24:02","modified_gmt":"2025-07-16T16:24:02","slug":"automatically-classify-short-unknown-downtimes","status":"publish","type":"epkb_post_type_1","link":"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=automatically-classify-short-unknown-downtimes","title":{"rendered":"Automatically Classify Short Unknown Downtimes"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some downtimes are short enough that it may not be worth the time for an operator to manually set a downtime. In these cases, automatically converting Unknown Downtime when it lasts less than a certain amount of time will set it to a specified status.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, determine the timeframe and the desired status. In this example we will use 2 minutes as the maximum Unknown Downtime to be set automatically and a status of Other, an Unplanned Downtime with a default status code of 308. Downtime codes can be found under <strong>Manage \u2192 Equipment Status \u2192 Cycle\/Planned Downtime\/Unplanned Downtime Statuses<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following expression will check for the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Current Status is Cycle<\/li>\n\n\n\n<li>Previous Status is Unknown Downtime<\/li>\n\n\n\n<li>Previous Status Timeframe was 2 minutes or less.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><code>([PCSDB.general_equipment_status] = [PCSDB.CYCLING]) AND ([PCSDB.prev_general_equipment_status] = [PCSDB.UNKNOWN_DOWNTIME]) AND ([PCSDB.prev_general_equipment_status_time] &lt;= 2)<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means the expression will only trigger when going from Unknown Downtime to Cycling, and when the Unknown Downtime was 2 minutes or less. Set the Target to Scytec PCS Database and the Result to the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[PCSDB.send_unplanned_DT_start_historical] {308, |'[PCSDB.unknown_downtime_start_time]'|}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This starts an Unplanned Downtime status at the start time of the Unknown Downtime, effectively overwriting it. If you want to use a Planned Downtime instead of Unplanned, the following Result should be used:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[PCSDB.send_planned_DT_start_historical] {###, |'[PCSDB.unknown_downtime_start_time]'|}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace ### with the desired Planned Downtime Code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Some downtimes are short enough that it may not be worth the time for an operator to manually set a downtime. In these cases, automatically converting Unknown Downtime when it lasts less than a certain amount of time will set it to a specified status. Steps First, determine the timeframe and the desired status. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"epkb_post_type_1_category":[127,101,105],"epkb_post_type_1_tag":[],"class_list":["post-2414","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-automating-data-collection","epkb_post_type_1_category-customizing-equipment-status","epkb_post_type_1_category-examples"],"_links":{"self":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/2414","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=2414"}],"version-history":[{"count":0,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/2414\/revisions"}],"wp:attachment":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2414"}],"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=2414"},{"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=2414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}