cpppo icon indicating copy to clipboard operation
cpppo copied to clipboard

Unable To Record Tag History

Open Yuvaraj-22 opened this issue 5 years ago • 0 comments

Hi Perry I tried to take the log of tag history but log file some_file.hst is not updating After that i have done the below modifications in files.py

def _append( self, msg, encoding=None ):
    """Appends the raw msg str (which should contain a newline) to the file (open if
    necessary).  Raises an exception on any failure.

    The default encoding is 'ascii'; no non-ASCII UTF-8 symbols allowed in the provided string.

    """
    if not self.f:
        assert self.open(), "Could not open file %s for writing" % self.path
    self.f.write( msg.encode( encoding or 'ascii' ))
    self.f.flush()

$ python -m cpppo.server.enip.historize some_file.hst SCADA=INT[10] $ python -m cpppo.server.enip.client 'SCADA[0-3]=0, 1, 2, 3'

Now I am getting Tag logs

Yuvaraj-22 avatar Feb 24 '20 11:02 Yuvaraj-22