windows_reader

Purpose:

Transfer and read a windows file from a samba link, store the data from the file into cyflex variables, and then delete the file.

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:

You must have a samba connection, or other connection that allows access to the Windows files, from the CyFlex system. This can be done by sharing the folder on the windows machine, then creating the samba link on Linux. See the Windows Reader documentation from the network for more details.

A brief description of the Linux side of the connection follows:

1. Create a directory that will hold the contents of the shared windows folder. ex. sudo /mnt/share

2. To see if your windows is sharing properly go to a browser (Firefox, Chrome, Konqueror, etc. ) and type this in the URL: smb://username@IP_address
ex: smb://node_ID@Ip_address

– the username is the username of the windows account – you will need the password for the windows account

3. If the above works, you should see the folder you are sharing from windows. Once that is working, you need to do the mount command.

sudo mount -t cifs //IPaddress/’Folder_on_windows’/mnt/’linux_folder’ -o user=’windows_user’

ex: sudo mount -t cifs //111.222.333.444/Archive /mnt/share -o user=node_ID

– you may need to type in the sudo password first, then the password for the windows account

4. when finished the the connection, you can use the umount command to safely disconnect.

ex: sudo umount /mnt/share

– must have nothing doing anything in that directory, not even a shell sitting in /mnt/share

   Sample Specfile:  
 
   ##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

See Also:

Windows Reader