adam module¶
filename: | adam.py |
---|---|
author: | Per Brosstad Tordivel AS, per@tordivel.no |
version: | 1.4 |
copyright: | 2000-2015 Tordivel AS |
license: | Tordivel AS’ Scorpion Python Module License |
Python interface to Advantech ADAM IO modules
ADAM modules are distributed IO modules attached to a RS-485 bus They are addressed using hex ‘00’ to ‘FF’
Supported modules: 4050,4052,4053,4060 (digital io), 4021 (analog out)
History:
1.0: Initial release, caused an error in Scan() and ScanReport()
1.1: Scan() and ScanReport() fixed
Autodetect added
1.2: _recv() modified
TimeOutFirstCh, TimeOutLastCh added as public variables, default 100ms
eg. device must reply with first ch within 100ms and last (CR) within another 100ms
Scan() modified
ScanReport() modified
AutoDetect() modified
1.3: 4021 (analog out) support added
1.4: add std autodoc
-
class
adam.
Adam
(com=0, baud=9600)¶ -
close
()¶
-
raw
(txt)¶
-
ModuleSupport
(Name)¶
-
FirmWare
(module=1)¶
-
ModuleName
(module=1)¶
-
SyncSampling
()¶
-
Scan
(max=255)¶
-
ScanReport
(max=255)¶
-
DigDataIn
(module, type='')¶
-
DigDataOutXCh
(module, data)¶
-
DigDataOut1Ch
(module, ch, data)¶
-
DigConfigure
(module, address, baud, csenable)¶
-
DigConfigStatus
(module)¶
-
DigResetStatus
(module)¶
-
DigReadSyncData
(module, type='')¶
-
AutoDetect
(maxmodule=255, callback=None)¶
-
AnaDecodeOutputRangeCode
(code)¶
-
AnaDecodeSlewRate
(outputrangecode, slewrate)¶
-
AnaDecodeDataFormat
(dataformat)¶
-
AnaEncodeOutputRangeCode
(outputrangecode)¶
-
AnaSlewRates
(outputrangecode)¶
-
AnaOutputRangeCodes
()¶
-
AnaDataFormats
()¶
-
AnaEncodeSlewRate
(outputrangecode, slewrate)¶
-
AnaEncodeDataFormat
(dataformat)¶
-
AnaConfigStatus
(module)¶
-
AnaConfigure
(module, address, baud, csenable, outputrangecode=-1, dataformat=-1, slewrate=-1)¶
-
AnaDataOutAsFloat
(module, value)¶
-
AnaDataOutAsHex
(value)¶
-
AnaStartupValue
(module)¶
-
AnaLastValue
(module)¶
-