windows_reader
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 &
Notes:
-
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.
Sample config file:
##Result Reader specfile.
##The Register name for CyFlex
@REGISTERED_NAME
Windows_reader
##The path and file of for the data to read ( required )
@FILE_NAME
/mnt/Archive/test_data
##Creates the variables and assigns the values from the file. ( required )
@CYFLEX_VAR_FORMAT
opc1 opc2 opc3
##Sample file from windows:
## 23.54 45.67 6.2
##the First variable we specify (opc1) would be 23.54,
##the second (opc2) would be 45.67, and so on
##The following of the keywords are optional
##specifies the cyflex variable units, same format as the @CYFLEX_VAR_FORMAT
##keyword default is all none
@UNITS_FORMAT
deg_c deg_f none
##Specifies how many seconds to wait before looking if new file is there
##default is 30 seconds
@SET_POLLING_INTERVAL
40
##specifies how many defects it will detect before warning the user of a
##problem default is 5
@MAX_FAILURES
3
##Result Reader specfile.
##The Register name for CyFlex
@REGISTERED_NAME
Windows_reader
##The path and file of for the data to read ( required )
@FILE_NAME
/mnt/Archive/test_data
##Creates the variables and assigns the values from the file. ( required )
@CYFLEX_VAR_FORMAT
opc1 opc2 opc3
##Sample file from windows:
## 23.54 45.67 6.2
##the First variable we specify (opc1) would be 23.54,
##the second (opc2) would be 45.67, and so on
##The following of the keywords are optional
##specifies the cyflex variable units, same format as the @CYFLEX_VAR_FORMAT
##keyword default is all none
@UNITS_FORMAT
deg_c deg_f none
##Specifies how many seconds to wait before looking if new file is there
##default is 30 seconds
@SET_POLLING_INTERVAL
40
##specifies how many defects it will detect before warning the user of a
##problem default is 5
@MAX_FAILURES
3