TEMPERATURE CONTROLLER SERIAL COMMUNICATION SPECIFICATION 1.0 - INTRODUCTION This specification provides all the information required for developing software that communicates with the Temperature Controller models 89000-10,-15 and 689-0010,-0015. All of the Temperature Controller features that are available via the keypad can also be performed through its serial port by sending the appropriate command. Any programmable device that has an RS-232 serial port can be used to communicate with the Temperature Controller. In this specification the device connected to the Temperature Controller will be referred to as the PC (Personal Computer or Programmable Controller). 2.0 - SERIAL PORT CONFIGURATION The serial data format is full duplex, 1 start bit, 8 data bits, no parity, and one stop bit. The BAUD rate is user selectable to 9600, 4800, 2400, 1200, 600, or 300 bits per second. 2.1 - RS-232 CONNECTIONS The Temperature Controller RS-232 connections are made through a 9 pin male DB connector. Only 3 of the 9 pins are used for the RS-232 port. Temp. | Controller| DB-9 | Function ----------+---------------------- Pin 2 | Receive data from PC Pin 3 | Send data to PC Pin 5 | Ground RS-232 connector The following two tables show the required connections for inter- facing to an IBM compatible computer with either a 9 pin or 25 pin plug. Temp. | Temp. | Controller| Computer Controller| Computer DB-9 | DB-9 DB-9 | DB-25 ----------+--------- ----------+--------- Pin 2 | Pin 3 Pin 2 | Pin 2 Pin 3 | Pin 2 Pin 3 | Pin 3 Pin 5 | Pin 5 Pin 5 | Pin 7 PAGE 1 2.2 - HANDSHAKING Software handshaking is implemented in the Temperature Controller using (11 hex) and (13 hex). When the Temperature Controller receives an , it will stop transmitting until it receives an or a new command. The Temperature Control- ler does not send since its buffer is large enough to receive the longest command string. Hardware handshaking is not provided. 3.0 - LOCAL/REMOTE MODE The Temperature Controller will always power up in the local mode. In local mode it is controlled entirely by the front panel keypad. It will automatically switch to remote mode when it receives any valid command from the PC except for the exit remote mode command. While in the remote mode, all keys except for RUN/STOP are disabled on the Temperature Controller. "REMOTE" will appear on the upper display after the actual temperature when the unit is in remote mode. Only the actual temperature and error messages will be updated on the display, with all other display functions disabled. The lower 16 character display is controlled by using the remote display command. It is up to the PC to put any alarm or run status messages on the Temperature Controller lower display. The LED annunciators and all other Temperature Controller functions will operate the same as in local mode. Remote mode is disabled by sending the exit remote mode command or by turning the power off and then back on. 4.0 - COMMAND FORMAT All commands to the Temperature Controller are preceded with three characters: the ASCII start of text character (02 hex), a T, and a 1. Following this header are one or more command letters, optional data, and then a carriage return (0D hex). Note that the and are each one ASCII character and all alpha characters must be upper case. T1UC | | || | | | || | Start of Text (02 hex) -/ | || \-- Carriage Return (0D hex) Header ----/ | \---- Command data Command character -----------/ Sample Command string PAGE 2 All of the Temperature Controller serial commands are used to either request data or set a Temperature Controller parameter. When data follows a command, the data will set a parameter in the Temperature Controller. To request a parameter from the Temperature Controller, the same command is sent without data following it. When a request data command is sent the Tempera- ture Controller responds with the requested data, preceding it with and the command letter and following it with a . The Temperature Controller will respond with the ASCII acknowledge character (06 hex) when it receives a valid set command. It will send a negative acknowledge character (15 hex) if the set command data is invalid or a communica- tion error occurred. The request status command (section 5.0) can be used after a is received to determine the cause of the error. All temperature values sent and received will be in the currently selected units. When the temperature units are changed, all temperature values will be converted to the new units. For example, if an alarm was set for 100 Celsius and the units are changed to Fahrenheit, the alarm value will now be 212. | DATA | COMMAND| FIELD | FUNCTION -------+----------+---------------------------------------------- AA | x | set or request Audible Alarm status | | x = 0 = alarm off, 1 = on | | AC | vwxyz | request Alarm Conditions | | v = 0 = alarm inactive, 1 = active | | for all alarms except low in process hi/lo | | w = 0 = alarm inactive, 1 = active | | for low alarm in process hi/lo | | x = 0 = alarm acknowledged, 1 = new alarm | | y = 0 = alarm relay off, 1 = on | | z = 0 = no Stop alarms | | 1 = Run Time Stop | | 2 = Loop Break Stop | | 3 = Over Temperature Stop | | 4 = Output Error Stop | | 5 = Open Probe Stop | | 6 = Over Probe Stop | | 7 = Under Probe Stop | | 8 = Heater fuse blown | | AE | x | set or request Audible Alarm Enable status | | x = 0 = disabled, 1 = enabled AH | xx.x | set or request Alarm Hysteresis | | xx.x = temperature (0.1 to 99.9) AK | none | Acknowledge Alarm condition | | Temperature Controller commands PAGE 3 | DATA | COMMAND| FIELD | FUNCTION -------+----------+---------------------------------------------- AM | x | set or request Alarm Mode | | x = 0 = process high alarm | | 1 = process low alarm | | 2 = process high/low | | 3 = deviation high | | 4 = deviation low | | 5 = deviation high/low | | 6 = deviation band | | AS | xxxx.x | set or request Alarm Setpoint | | setpoint temperature for all alarm modes, | | high setpoint if process high/low mode AL | xxxx.x | set or request Low Alarm Setpoint for | | setpoint temperature for low alarm | | in process high/low | | AR | x | set or request Alarm Reset mode | | x = 0 = alarms disabled | | 1 = auto reset | | 2 = manual reset | | B | xxxx | set or request BAUD rate | | xxxx = 300, 600, 1200, 2400, 4800, or 9600 | | CA | x | set or request Control Action | | x = 0 = heat, 1= cool CC | xxx | set or request Control output Cycle time | | xxx = seconds (1 to 300) CD | xxxx | set or request Derivative Time for current | | control parameter number (CN command) | | xxxx = seconds (0 to 3600) | | CE | x | set or request auto tune enable status | | x = 0 = disabled, 1 = enabled CH | xx.x | set or request on/off Control Hysteresis | | xx.x = temperature (0.1 to 99.9) CI | xxxx | set or request Integral Time for current | | control parameter number (CN command) | | xxxx = seconds (0 to 3600) | | CM | x | set or request Control Mode | | x = 0 = on/off control | | 1 = PID | | 2 = ramp/soak CN | x | set or request Control parameter Number | | for accessing PID data | | x = CP number (0 to 9), 0 = auto tune data CP | xxxx | set or request Proportional Band for current | | control parameter number (CN command) | | xxxx = temperature (1 to 1000) Temperature Controller commands PAGE 4 | DATA | COMMAND| FIELD | FUNCTION -------+----------+---------------------------------------------- CR | x | set or request Control Run status | | x = 0 = stop, 1 = running or continue run | | 2 = restart run, 3 = auto tune CU | x | set or request Power Up run status | | x = 0 = always stopped, 1 = last state | | D | xxx...x | set or request Display data | | x = up to 16 alphanumeric characters | | F | t xx.x | set or request Field cal probe offset | | t = sensor type (see T command) | | xx.x = temperature offset | | H | xx:xx | set or request run time Hours & minutes | | xx:xx = hours:minutes (00:00 to 99:59) | | 00:00 = continuous | | I | x | request communication Info (see section 5.0) | | K | x | request Keypad status (see section 6.0) | | L | hcta | request LED annunciators status | | hcta = Heat, Cool, auto Tune, Alarm | | 0 = off, 1 = on | | OL | xxxx.x | set or request recorder Output at 4 mA OH | xxxx.x | set or request recorder Output at 20 mA | | xxxx.x = temperature at 4 and 20 mA | | P | xxx | request control output Power | | xxx = percent output on (0 to 100) PV | xxxx.x | request Process Variable (actual temperature) | | xxxx.x = temperature or OPEN, UNDER, OVER | | RA | x | set or request Assured Soak status for all | | segments in current profile number | | x = 0 = No, 1 = Yes RC | x | set or request Control Parameter number | | for current profile and segment number | | x = control parameter number (0 to 9) RE | xxxx.x | set or request Ramp/soak End temperature for | | current profile and segment number | | xxxx.x = temperature | | RI | x | request Ramp/soak Info | | x = 0 = done, 1 = waiting for assured soak, | | 2 = ramping up, 3 = ramping down, 4 =soaking RP | x | set or request Ramp/soak Profile number | | x = profile (1 to 9) Temperature Controller commands PAGE 5 | DATA | COMMAND| FIELD | FUNCTION -------+----------+---------------------------------------------- RR | xx:xx:xx | request Remaining Run time | | xx:xx:xx = hr:min:sec actual time remaining | | RS | xx | set or request Ramp/soak Segment number | | xx = segment(1 to 16) RT | xx:xx | set or request Ramp/soak time | | xx:xx = hours:minutes (00:00 to 99:59) | | for current profile & segment number | | SB | xxx.x | set or request loop Break Stop time | | xxx.x = minutes (0 to 300.0), 0 = disabled SP | xxxx.x | set or request SetPoint temperature | | xxxx.x = temperature | | ST | xxx | set or request over Temperature Stop | | xxx = temperature (1 to 999) | | T | x | Set or request sensor type | | x = 0=B, 1=E, 2=J, 3=K, 4=N, 5=R, 6=S, 7=T, | | 8=YSI 400 thermistor, 9=YSI 700 | | A=RTD alpha .00385, B=alpha .003916 | | U | x | set or request temperature Units | | x = 0 = Fahrenheit | | 1 = Celsius | | 2 = Kelvin | | 3 = Rankine | | 4 = Reaumur | | V | xx.xx | set or request ROM software Version number | | xx.xx = version number (1.00 to 99.99) | | W | none | write all setup data to non-volatile memory X | none | eXit remote mode | | ZK | none | Clear Key press status ZS | none | Clear communication Status Temperature Controller commands PAGE 6 COMMAND STRING TO | TEMP. CONTROLLER | TEMP. CONTROLLER | REPLY | FUNCTION ------------------+-------------------+------------------------------- T1AA1 | | turn on Audible Alarm T1AA |AA0 | get Audible Alarm status T1AC |AC01100 | get Alarm Conditions | | T1AE1 | | set audible Alarm Enable T1AH1.0 | | set Alarm Hysteresis to 1.0 T1AH |AH 1.0| get Alarm Hysteresis | | T1AK | | Acknowledge alarm condition T1AM |AM1 | get Alarm Mode T1AM6 | | set Alarm Mode to deviation band | | T1AS |AS 100.0| get Alarm Setpoint T1AS200 | | set Alarm Setpoint to 200 T1AL |AL 0.0| get Low Alarm setpoint | | T1AL-10 | | set Low Alarm setpoint to -10 T1AR |AR1 | get Alarm Reset mode T1AR2 | | set Alarm Reset mode to manual | | T1B |B 300 | get BAUD rate T1B9600 | | set BAUD rate 9600 BPS T1CA |CA1 | get Control Action | | T1CA0 | | set Control Action to heat T1CC |CC 1 | get Control output Cycle time T1CC10 | | set Control output Cycle time | | T1CE |T1CE0 | get auto tune Enable status T1CE1 | | Enable auto tune T1CH |CH 5.0 | get on/off Control Hysteresis | | T1CH2.5 | | set on/off Control Hysteresis T1CM |CM0 | get Control Mode T1CM1 | | set Control Mode to PID | | T1CN0 | | set Control Parameter number T1CD |CD 60 | get Derivative time T1CI |CI 240 | get Integral time | | T1CP |CP 50 | get Prop. Band T1CN1 | | set Control Parameter number T1CD3 | | set Derivative time | | T1CI24 | | set Integral time T1CP12 | | set Prop. Band T1CM1 | | set Control Mode to PID Example command strings and responses PAGE 7 COMMAND STRING TO | TEMP. CONTROLLER | TEMP. CONTROLLER | REPLY | FUNCTION ------------------+-------------------+------------------------------- T1CR |CR0 | get Control Run status T1CR1 | | set Control Run to continue T1CR3 | | start Auto Tune cycle | | T1CU1 | | set Power Up status to last state T1D TESTING | | put TESTING on lower display T1F3 |F3 0.0 | get cal offset for type K sensor | | T1FA1.2 | set cal offset to 1.2 for | | RTD .003850 alpha sensor T1H |H00:00 | get run time Hours & minutes T1H2:00 | | set run time to 2 Hours T1I |I0 | get communication Info | | T1K |K1 | get keypad status T1L |L1000 | get LED annunciator status T1OL |OL 0.0| get 4mA recorder Output temp. | | T1OL32 | | set 4mA recorder Output to 32 T1OH |OH1000.0| get 20mA recorder Output temp. T1OH100 | | set 20mA recorder Output to 100 | | T1P |P100 | get control output Power % T1PV |PV 208.3| get Process Variable temperature T1RA |RA0 | get Assured soak status | | T1RA1 |RA0 | set Assured soak status T1RC |RC0 | get Control Parameter # T1RC3 | | set Control Parameter # to 3 | | T1RE |RE 100.0| get Ramp/soak End temperature T1RE200 | | set Ramp/soak End temperature T1RI |RI00 | get Ramp/soak status Info | | T1RP |RP1 | get Ramp/soak Profile number T1RP2 | | set Ramp/soak Profile to 2 T1RR |RR00:08:21| get Remaining Run time | | T1RS |RS 2 | get Ramp/soak Segment number T1RS5 | | set Ramp/soak Segment to 5 T1SB |SB 10.0 | get loop Break Stop time | | T1SB5 | | set loop Break Stop to 5 minutes T1SP |SP 100.0| get control SetPoint temperature T1SP120 | | set control SetPoint to 120 | | T1ST |ST100 | get over Temperature Stop T1ST150 | | set over Temperature Stop to 150 T1T |T3 | get sensor Type Example command strings and responses PAGE 8 COMMAND STRING TO | TEMP. CONTROLLER | TEMP. CONTROLLER | REPLY | FUNCTION ------------------+-------------------+------------------------------- T1TA | | set sensor to RTD alpha .00385 T1U |U0 | get temperature units T1U1 | | set temperature units to Celsius | | T1V |V 1.00 | get ROM software version number T1W | | Write all setup data to EEPROM T1X | | eXit remote mode | | T1ZK | | clear Keypad status T1ZS | | clear communication Status Example command strings and responses 4.1 - TEMPERATURE CONTROLLER DATA FIELDS Any data that the Temperature Controller sends to the PC will have a fixed number of characters. The number of characters sent will depend on the command. Temperature data has a fixed length of six characters, counting the decimal point. Leading zeros in display data will be replaced with spaces to get the fixed number of characters needed for the data. See the command tables to determine the number of characters sent for each com- mand. 4.2 - PC DATA FIELDS Data that the PC sends to the Temperature Controller can be variable in length. Leading zeros or spaces can be included or left out of the data field. Data after a decimal point is ignored if it is greater than the resolution specified for the command. The command strings shown below are all valid and would be used to set the control setpoint to 100. T1SP100 T1SP0100 T1SP 100 T1SP+100.0 PAGE 9 5.0 - COMMUNICATION STATUS REQUEST The communication status request command is used to determine why the Temperature Controller has sent a negative acknowledge in response to a command. The Temperature Controller will respond with the following string in response to the I command: Ix x = 0 = No error 1 = Framing error 2 = Overrun error 3 = Invalid command 4 = Data out of range 5 = Invalid character in data 6 = Noise detected 7 = Error saving setup data 5.1 - HANDLING COMMUNICATION ERRORS Whenever a communication error occurs, its status is latched in the I command until the PC clears it with the ZS command. If a new error occurs before the status is cleared, the new error will overwrite the old one. Therefore, it is not necessary to send the ZS command after every I command. It is best to include the ability to resend a command a limited number of times when a communications error occurs before aborting the command. A typi- cal command sequence for handling communication errors would be: 1. Retry count = 0 2. PC sends command to Temperature Controller 3. If PC receives an or valid data, then all done, else goto step 4 4. PC receives a from Temperature Controller or noth- * ing after waiting 800 milliseconds . 5. Increment retry count 6. If retry count < 4, goto step 2, else goto step 7 7. PC sends I command to Temperature Controller to try to determine cause of error and reports Temperature Control- ler reply. * The minimum time to wait for a reply from the Temperature Controller will vary with the selected BAUD rate: 300 BAUD = 800 mS 600 BAUD = 400 mS 1200 BAUD = 200 mS 2400 BAUD = 100 mS 4800 BAUD = 50 mS 9600 BAUD = 25 mS PAGE 10 6.0 - KEYPAD STATUS The PC can read the Temperature Controller keypad by issuing the K command. The Temperature Controller will respond with one character indicating the last key pressed since the last ZK command. A key press is latched until the ZK command is used to reset the status to no keys pressed. The following table shows the character code returned by the K command and the corresponding Temperature Controller key. 0 = No key pressed 5 = Down arrow 1 = Run/Stop 6 = Menu 2 = Setpoint 7 = Alarm 3 = Left arrow 8 = Tune 4 = Up arrow Key codes for Temperature Controller K command 7.0 - ASCII CONTROL CHARACTERS USED DECIMAL | HEX | FUNCTION | CONTROL KEY --------+-----+----------------------------+---------------- 2 | 02 | Start of Text | (CTRL-B) 6 | 06 | Acknowledge | (CTRL-F) 10 | 0A | Line Feed | (CTRL-J) 13 | 0D | Carriage Return | (CTRL-M)(Enter) 17 | 11 | enable transmit | (CTRL-Q) 19 | 13 | disable transmit | (CTRL-S) 21 | 15 | Negative Acknowledge | (CTRL-U) ASCII control codes used PAGE 11