{"id":4084,"date":"2019-02-12T16:21:58","date_gmt":"2019-02-12T16:21:58","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/1-utilities-and-user-commands\/windows_reader\/"},"modified":"2026-02-16T12:49:38","modified_gmt":"2026-02-16T17:49:38","slug":"windows_reader","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/windows_reader\/","title":{"rendered":"windows_reader"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Read data from a specified file, typically from a Windows share via Samba, store the data into CyFlex variables, and then delete the file, running continuously to monitor for new files.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>windows_reader<\/strong> [specfile]<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr>\n<td>\n<p>specfile<\/p>\n<\/td>\n<td>\n<p>Optional. Specify the path of the configuration file. The default is windows.specs.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>windows_reader<\/strong> \/specs\/opc.specs &amp;<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>Ensure a Samba connection is established for accessing Windows files from the CyFlex system. This involves creating a directory on Linux, verifying the Windows share via a browser, mounting the share using the mount command, and unmounting when finished.<\/p>\n<\/dd>\n<\/dl>\n<div>\u00a0\u00a0\u00a0Sample config file: \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##Result\u00a0Reader\u00a0specfile. \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##The\u00a0Register\u00a0name\u00a0for\u00a0CyFlex \u00a0<br \/>\n\u00a0\u00a0\u00a0@REGISTERED_NAME \u00a0<br \/>\n\u00a0\u00a0\u00a0Windows_reader \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##The\u00a0path\u00a0and\u00a0file\u00a0of\u00a0for\u00a0the\u00a0data\u00a0to\u00a0read\u00a0(\u00a0required\u00a0) \u00a0<br \/>\n\u00a0\u00a0\u00a0@FILE_NAME \u00a0<br \/>\n\u00a0\u00a0\u00a0\/mnt\/Archive\/test_data \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##Creates\u00a0the\u00a0variables\u00a0and\u00a0assigns\u00a0the\u00a0values\u00a0from\u00a0the\u00a0file.\u00a0(\u00a0required\u00a0) \u00a0<br \/>\n\u00a0\u00a0\u00a0@CYFLEX_VAR_FORMAT \u00a0<br \/>\n\u00a0\u00a0\u00a0opc1\u00a0\u00a0\u00a0opc2\u00a0\u00a0\u00a0opc3 \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##Sample\u00a0file\u00a0from\u00a0windows: \u00a0<br \/>\n\u00a0\u00a0\u00a0##\u00a0\u00a023.54\u00a0\u00a0\u00a045.67\u00a0\u00a0\u00a0\u00a06.2 \u00a0<br \/>\n\u00a0\u00a0\u00a0##the\u00a0First\u00a0variable\u00a0we\u00a0specify\u00a0(opc1)\u00a0would\u00a0be\u00a023.54, \u00a0<br \/>\n\u00a0\u00a0\u00a0##the\u00a0second\u00a0(opc2)\u00a0would\u00a0be\u00a045.67,\u00a0and\u00a0so\u00a0on \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##The\u00a0following\u00a0of\u00a0the\u00a0keywords\u00a0are\u00a0optional \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##specifies\u00a0the\u00a0cyflex\u00a0variable\u00a0units,\u00a0same\u00a0format\u00a0as\u00a0the\u00a0@CYFLEX_VAR_FORMAT \u00a0<br \/>\n\u00a0\u00a0\u00a0##keyword\u00a0default\u00a0is\u00a0all\u00a0none \u00a0<br \/>\n\u00a0\u00a0\u00a0@UNITS_FORMAT \u00a0<br \/>\n\u00a0\u00a0\u00a0deg_c\u00a0\u00a0\u00a0deg_f\u00a0\u00a0\u00a0none \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##Specifies\u00a0how\u00a0many\u00a0seconds\u00a0to\u00a0wait\u00a0before\u00a0looking\u00a0if\u00a0new\u00a0file\u00a0is\u00a0there \u00a0<br \/>\n\u00a0\u00a0\u00a0##default\u00a0is\u00a030\u00a0seconds \u00a0<br \/>\n\u00a0\u00a0\u00a0@SET_POLLING_INTERVAL \u00a0<br \/>\n\u00a0\u00a0\u00a040 \u00a0<br \/>\n\u00a0<br \/>\n\u00a0\u00a0\u00a0##specifies\u00a0how\u00a0many\u00a0defects\u00a0it\u00a0will\u00a0detect\u00a0before\u00a0warning\u00a0the\u00a0user\u00a0of\u00a0a \u00a0<br \/>\n\u00a0\u00a0\u00a0##problem\u00a0default\u00a0is\u00a05 \u00a0<br \/>\n\u00a0\u00a0\u00a0@MAX_FAILURES \u00a0<br \/>\n\u00a0\u00a0\u00a03<\/div>\n<h3>See Also:<\/h3>\n<dl>\n<dd>\n<p><a href=\"\/wp-content\/uploads\/Windows_Reader.pdf\">Windows Reader<\/a><\/p>\n<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Read data from a specified file, typically from a Windows share via Samba, store the data into CyFlex variables, and then delete the file, running continuously to monitor for new files. Enter: windows_reader [specfile] Where: specfile Optional. Specify the path of the configuration file. The default is windows.specs. Example: windows_reader \/specs\/opc.specs &amp; Notes: Ensure [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1948,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4084","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/4084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=4084"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/4084\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1948"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=4084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}