diff --git a/pylogix/eip.py b/pylogix/eip.py index c5ad911..18a377d 100644 --- a/pylogix/eip.py +++ b/pylogix/eip.py @@ -105,11 +105,11 @@ def MultiRead(self, tags): ''' return _multiRead(self, tags) - def GetPLCTime(self): + def GetPLCTime(self, raw=False): ''' - Get the PLC's clock time + Get the PLC's clock time, return as human readable (default) or raw if raw=True ''' - return _getPLCTime(self) + return _getPLCTime(self, raw) def SetPLCTime(self): ''' @@ -348,7 +348,7 @@ def _multiRead(self, tags): err = 'Unknown error {}'.format(status) raise ValueError('Multi-read failed: {}'.format(err)) -def _getPLCTime(self): +def _getPLCTime(self, raw=False): ''' Requests the PLC clock time ''' @@ -379,6 +379,8 @@ def _getPLCTime(self): if status == 0: # get the time from the packet plcTime = unpack_from('