Package pyads :: Module gui :: Class ADSMapper
[hide private]
[frames] | no frames]

Class ADSMapper

source code


Version: 1.0.0

Instance Methods [hide private]
 
__init__(self, plcAddress, plcDataType, guiObjects, hint=None) source code
 
write(self, adsAdr, value)
writes the value to the plc address
source code
 
read(self, adsAdr)
reads from plc address and writes in self.currentValue, calls mapAdsToGui to show the value on the connected gui objects
source code
 
mapAdsToGui(self, guiObject, value)
displays the value on the connected gui object, this function should be overriden, by default the value is printed on the console.
source code
Instance Variables [hide private]
  hint
hint for plc value
  plcAdr
plc address
  plcDataType
plc data type (PLCTYPE constant)
  currentValue
current value of parameter
  guiObjects
list/tuple or single gui objects (for instance Qt objects)
Method Details [hide private]

__init__(self, plcAddress, plcDataType, guiObjects, hint=None)
(Constructor)

source code 
Parameters:
  • plcAddress (int) - plc address
  • plcDataType (int) - plc data type
  • guiObjects - list/tuple or single gui objects (for instance Qt objects)
  • hint (string)

write(self, adsAdr, value)

source code 

writes the value to the plc address

Parameters:
  • adsAdr (adsPy.AmsAdr) - address to the ADS device
  • value - value to be written

read(self, adsAdr)

source code 

reads from plc address and writes in self.currentValue, calls mapAdsToGui to show the value on the connected gui objects

Parameters:
  • adsAdr (adsPy.AmsAdr) - address to the ADS device
Returns:
current value

mapAdsToGui(self, guiObject, value)

source code 
Parameters:
  • guiObject (QObject) - gui object for value output
  • value - value to display in the gui object