EspecNorthAmerica / ChamberConnectLibrary

Python library for ESPEC North America chambers with P-300, SCP-220, Watlow F4, F4T controllers.
http://www.espec.com/na/support/software/
MIT License
29 stars 24 forks source link

How to get allarms info from ARS 220 ? #7

Closed dimamotsik closed 6 years ago

dimamotsik commented 6 years ago

Hello! When im working with chamber by you module and i want to get some info about allarms, i have this error:


File "C:\Python27\lib\site-packages\chamberconnectlibrary\controllerinterface.py", line 28, in wrapper
    return func(self, *args, **kwargs)

File "C:\Python27\lib\site-packages\chamberconnectlibrary\controllerinterface.py", line 309, in get_operation
    status = self.get_status(exclusive=False)

File "C:\Python27\lib\site-packages\chamberconnectlibrary\controllerinterface.py", line 40, in wrapper
    return func(self, *args, **kwargs)
File "C:\Python27\lib\site-packages\chamberconnectlibrary\espec.py", line 499, in get_status
    }[self.client.read_mode(True)]

File "C:\Python27\lib\site-packages\chamberconnectlibrary\p300.py", line 320, in read_mode
    return self.ctlr.interact('MODE?%s' % (',DETAIL' if detail else ''))

File "C:\Python27\lib\site-packages\chamberconnectlibrary\especinteract.py", line 72, in interact
    raise EspecError(msg)
chamberconnectlibrary.especinteract.EspecError: EspecError: command:"MODE?,DETAIL" genarated Error:"PARA ERR"

This error occured when i use _getoperation(). I use this constructor:

interface_params = {'interface': 'Serial', 'baudrate': COMPORT_BAUD_RATE, 'serialport': comport, 'adr': RS_485_ADDRESS}

controller_type = 'SCP220'

controller = Espec(ctrl_type=controller_type, loops=2, **interface_params)

When i want receive info about allarms, for example: "no water", I use this function:

controller.get_operation()

How can i get info about chamber's allarms ?

MylesMetzler commented 6 years ago

controller = Espec(ctrl_type=controller_type, loops=2, **interface_params should be: controller = Espec(ctlr_type=controller_type, loops=2, **interface_params) r & l are transposed in ctlr_type. controller.get_alarm_status() will return a list of triggered (active) and un-triggered (inactive) alarm codes, for the SCP220 here are what the codes mean (I am not sure where "no water" will get mapped to, probably code#26):

# Description
0 Sensor Failure
1 Upper Deviation Limit: Temperature
2 Absolute High Limit: Temperature
3 Absolute Low Limit: Temperature
6 Over Heat
7 Circulator Failure
8 Refrigeration Failure
9 Chamber Door Open
10 Over Cooling (PTP)
11 Over Heating (PTP)
12 Over Heating/Cooling
18 Power Phase Failure
19 External Equipment Failure
21 Humidifier Failure
22 Absolute High Limit: Humidity
23 Absolute Low Limit: Humidity
26 Water Circuit Trouble
30 Memory Error
31 System Error
40 Sensor Burn-Out (Pressure)
41 High Pressure Limit Switch
43 Low Pressure Limit Switch
46 Motor Valve Malfunction
48 Tripped Vacuum Pump Thermal Relay
50 Damper Failure
51 Display Communication Error
99 Program Set Point Out Of Range
MylesMetzler commented 6 years ago

controllerinterface.md had the same l & r transposed, I have fixed it.