{"id":472,"date":"2020-05-03T21:42:02","date_gmt":"2020-05-03T21:42:02","guid":{"rendered":"https:\/\/dxhelpdev.wpengine.com\/?post_type=epkb_post_type_1&#038;p=472"},"modified":"2020-08-19T23:18:29","modified_gmt":"2020-08-19T23:18:29","slug":"specialized-variables","status":"publish","type":"epkb_post_type_1","link":"https:\/\/dxhelp.scytec.com\/?epkb_post_type_1=specialized-variables","title":{"rendered":"Specialized Variables"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Previous Values<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Many source variables also have the previous value available as a variable to use within expressions. The previous values are the value of the source variable the last time DataXchange polled the source.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Focas PMC Values<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Example of reading a bit value:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The variable<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[Focas.pmc_address_bit_value] {PMC ADDRESS,BIT (0-7)}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">would be filled out with parameters such as<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[Focas.pmc_address_bit_value] {X0009,7}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to set a bit value a target must be created for the Focas with the appropriate address and bit value. In the expression select the appropriate target and use the desired variable for the True or False send strings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[Focas.set_bit_on]<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[Focas.set_bit_off]<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reading Downtime Codes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When reading the downtime code the CNC program must have a particular syntax in a comment. The syntax for downtime is&nbsp;<code>DOWNTIME=<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An example downtime program for a Fanuc Control:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">O8100<br>(DOWNTIME=207) ;<br>M30 ;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The variable <code>[Focas.nc_downtime_code]<\/code> will hold the downtime code of 207. DataXchange will search through 500 characters from the current cursor location for <code>DOWNTIME=<\/code> in the active program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reading Part Numbers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When reading the part numbers the CNC program must have a particular syntax in a comment. The syntax for part number is&nbsp;<code>PARTNUMBER=<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An example program containing a part number for a Fanuc Control:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">O1234<br>(PARTNUMBER=123456-0001) ;<br>&#8230;<br>&#8230;<br>&#8230;<br> M30 ;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The variable <code>[Focas.part_number]<\/code> would hold the part number <code>123456-0001<\/code>. DataXchange will search through 500 characters from the current cursor location for <code>PARTNUMBER=<\/code> in the active program.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Previous Values Many source variables also have the previous value available as a variable to use within expressions. The previous values are the value of the source variable the last time DataXchange polled the source. Focas PMC Values Example of reading a bit value: The variable [Focas.pmc_address_bit_value] {PMC ADDRESS,BIT (0-7)} would be filled out with [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"epkb_post_type_1_category":[103,36],"epkb_post_type_1_tag":[],"class_list":["post-472","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-building-expressions","epkb_post_type_1_category-tutorials-expressions"],"_links":{"self":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/472","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=472"}],"version-history":[{"count":0,"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=\/wp\/v2\/epkb_post_type_1\/472\/revisions"}],"wp:attachment":[{"href":"https:\/\/dxhelp.scytec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472"}],"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=472"},{"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=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}