Вы находитесь на странице: 1из 56

Host Communications

InstructionProtocol
Manual

Table of Contents

Contents
1. Introduction ............................................................................................... 3
1.1 Multi-Chassis Addressing .............................................................. 3
2. MACO Serial Communication Setup ......................................................... 3
2.1 COMM Setpoints ........................................................................... 4
2.2 Baud Rate Setpoints ..................................................................... 4
2.3 Port Control Relay Status ............................................................. 5
3. RS-232 Host Communications .................................................................. 5
3.1 Hardware Requirements ............................................................... 5
3.2 Control Relays ............................................................................... 5
3.2.1 Inhibit Remote Access (CR 649) ........................................... 5
3.2.2 Enable Remote Setpoint Change (CR 650) ........................... 5
3.2.3 Enable Remote CR Change (CR 651) ................................... 5
3.3 Wiring ............................................................................................ 5
3.4 Establishing Data Acquisition ........................................................ 7
3.5 Request Data Commands ............................................................. 7
3.6 Error Reply to Request Data Command ....................................... 8
3.7 Reply to Valid Request Data Command ....................................... 9
3.8 Send Data Commands ................................................................ 11
3.9 MACO Error Reply to Send Data Command ............................... 13
3.10 Reply to Valid Send Data Command .......................................... 13
3.11 Changing to the File Transfer Mode ........................................... 14
3.12 Insertion of <DLE> ...................................................................... 14
3.13 Determining Error Code Definitions ............................................ 14
3.13.1 Error Code Definitions ......................................................... 15
4. RS-485 Host Communications ................................................................ 25
4.1 Hardware Requirements ............................................................. 25
4.1.1 Editor Requirements ............................................................ 25
4.1.2 Switch Definitions ................................................................ 26
4.1.2.1 Switches 1 - 6 Node Address (UID) ................................ 26
4.1.2.2 Switch 7 Save Configuration ........................................... 26
4.1.2.3 Switch 8 Data Update ..................................................... 27
4.1.3 Communication Board Location ........................................... 27
4.2 General Setup Procedure ........................................................... 27
4.2.1 Control Relays ..................................................................... 27
4.3 Wiring .......................................................................................... 28
4.4 Module Setpoints ............................................................................. 28
4.4.1 Baud Rate Setpoint .............................................................. 28
4.4.2 COMMODE Setpoint ........................................................... 28
4.4.3 Clear Data Valid Timer ........................................................ 28
4.5 Module Values ............................................................................ 28
4.5.1 Block Value 1 - Block Value 10 ............................................ 28
4.5.2 Number of Setpoints ............................................................ 28
4.5.3 Number of Values ................................................................ 29
4.5.4 Switch Value ........................................................................ 29
4.6 Module Control Relays ................................................................ 29
4.6.1 Trigger Control Relay (CR 3753) ........................................ 29
4.6.2 HOST Control Relay (CR 3754) .......................................... 29
4.6.3 Data valid Control Relay (CR 3765) .................................... 29

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 1 of 56


Host Communications Protocol
4.7 Module Error Codes .................................................................... 29
4.7.1 Data Handler Error Code Messages .................................... 30
4.8 Command Structure .................................................................... 30
5. RS-485 Command Codes ....................................................................... 32
5.1 Command #1 Download Menu Parameters ........................... 32
5.1.1 Example Command #1 ........................................................ 33
5.2 Command #2 Request Upload of Block Data ......................... 34
5.2.1 Example Command #2 ........................................................ 34
5.3 Command #3 Setpoint Change .............................................. 35
5.3.1 Example #1 Command #3 ................................................... 35
5.3.2 Example #2 Command #3 ................................................... 36
5.4 Command #6 Request Data Valid Status ................................ 36
5.4.1 Example Command #6 ........................................................ 37
5.5 Command #7 Clear DATA VALID ............................................ 38
5.5.1 Example Command 7 .......................................................... 38
5.6 Command #8 Individual Setpoint/Value Request .................... 38
5.6.1 Example Command #8 ........................................................ 38
5.7 Command #9 Control Relay ..................................................... 39
5.7.1 Example Command #9 ........................................................ 40
5.8 Command #10 Request ASCII String ...................................... 40
5.8.1 Ex. Cmd #10 ASCII String Request (Type Upper = 4XH) . 41
5.8.2 Ex. Cmd #10 ASCII String Request (Type Upper = 3XH) . 42
5.9 Command #11 Change Control Relays ................................... 43
5.9.1 Example Command #11 ...................................................... 43
5.10 Command #12 File Access Read File ................................... 44
5.10.1 Example Command #12 ...................................................... 46
5.11 Command #13 File Access Write File .................................... 48
5.11.1 Example Command #13 ...................................................... 49
5.12 Command #14 Request Host Monitor Error Table ................... 51
5.12.1 Example Command #14 ...................................................... 51
5.13 Command #15 Data Handler Host Command ............................. 52
5.13.1 Example Command #16 ...................................................... 52

Figures
Figure 1. Serial Communications Setup Screen .......................................... 4
Figure 2. RS-232 Host Communication Module ........................................... 5
Figure 3. Standard Serial Cables ................................................................ 6
Figure 4. RS-485 Host Communication Module ......................................... 25
Figure 5. Wire Multiple MACO's ................................................................. 27

Tables
Table 1. File Types .................................................................................... 45
Table 2. Host System Commands ............................................................ 53
Table 3. ASCII to Hex to Decimal Conversions ........................................ 56

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 2 of 56


Host Communications Protocol
1. Introduction
The MACO 4000, 5000 and 6000 Series systems provide a host communication
option using either an RS-232 or RS-485 host communication module to link the
control system to a host computer, allowing full Supervisory Control and Data
Acquisition (SCADA) over a standard network platform. When fitted with a MACO
RS-485 host communication module, a MACO controlled machine can be at-
tached to a network of up to 32 devices on a single serial port of a host computer
Communications can be used to collect, display and store operating data, as well
as transmit setpoints or change control relays in the MACO controllers.

1.1 Multi-Chassis Addressing


Each controller of a multi-chassis system has its own set of control relay (CR)
system addresses. The control relay addresses shown in this manual reflect the
addresses used for Controller 1 (the primary controller).

Almost all control relays repeat in a multi-chassis system. The few exceptions
relate to recipes, some SPC items (data handler modfile), print CRs, switch LED
CRs (sequence modfile), status CRs from the display processor, data handler, RS-
232 host communications, and RS-485 host communications modfiles. Refer to
the control relay tables for a complete list of control relays.

The control relay table contains a column headed Multi-Chassis Addressing?.


Those control relays which have a Yes entry in that column can be written into
the RLD if a multi-chassis system is being utilized. With the exception of control
relay addressing, multi-chassis operation is transparent to the RLD. All download-
ing and recipe storage is to Controller 1. Enabling relays which relate to system
operation (recipe saving and reading, setpoint change, etc.) must be enabled in
EACH chassis. Machine function keys and RS-232/Printer/RS-485 functions are
only in Controller 1.

Note: When counting boards in multi-chassis systems (for switch settings, RLD/
screen programming) count each control rack separately. For example, if a multi-
chassis system consists of two control racks, each with two temperature boards,
EACH controller would have a Temperature Board #1 and a Temperature Board
#2. The same numbering scheme holds true for all types of boards (including Input
and Output boards).

Note: Currently the host communications can only communicate with Controller
#1 (the primary chassis).

2. MACO Serial Communication Setup


The MACO serial communications setup screen (Figure 2.0) is used for setting
baud rates and enabling communications. This controller can have as many as
three separate external devices connected for use with serial communications.
Daughterboards purchased for the communications motherboard determine what
type of device can be connected. The COMM numbers correspond to daughterboard
locations on the motherboard:

COMM 3 Upper Slot


COMM 2 Middle Slot
COMM 1 Bottom Slot

Examine the communications motherboard and determine the type and location

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 3 of 56


Host Communications Protocol

Figure 1. Serial Communications Setup Screen

of whatever daughterboards are present (numbers are plainly marked on the


board). You may be using one or all of the communication modules listed below.

A-13405-00X RS-232 for communications


(File Transfer and Host Communications)

A-13405-10X RS-232 for communications as well as printer functions


A-60055 (Screen Printouts and SPC Reports)

A-13404-20X RS-485 for communications to a host


A-60062

2.1 COMM Setpoints


COMM setpoints (Figure 1) allow the user to enable the communication
daughterboards located in COMM slot 1, 2 or 3. To enable RS-232 host
communications enter a "1" in the correct COMM slot location. To enable an RS-
232 printer enter a "2" in the correct COMM slot location. To enable RS-485 host
communications enter a "9" in the correct COMM slot location.

Note: Only ONE of EACH DEVICE is allowed (i.e., two RS-232 printers or two RS-
232 PCs, etc. are not allowed).

2.2 Baud Rate Setpoints


Baud rate is set by entering a baud rate setpoint on the serial communications
setup screen. The baud rate must match that of the host. The serial communica-
tions setup screen is pre-configured for RS-232. If the RS-485 communication
module is being used, an RS-485 baud rate setpoint can be added using the
OptiGrafix screen editor. Enter a baud rate setpoint for each device:

0 = 9600 3 = 1200
1 = 4800 4 = 19200
2 = 2400

If the baud rate setpoint is not programmed on a screen it defaults to 9600 baud.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 4 of 56


Host Communications Protocol
2.3 Port Control Relay Status
The port control relays listed at the bottom of the communication setup screen
indicate the status of any ongoing communications. For an RS-232 device an
asterisk will indicate the status of each line. The asterisk will indicate if data is
being transmitted or received (these are not real time indicators - they are meant
only to show that communication is taking place).

3. RS-232 Host Communications


The MACO RS-232 host communication module allows you to attach your MACO
controlled machine to a single serial port of a host computer that will collect, display
and store operating data, as well as transmit setpoints to the MACO controllers.

3.1 Hardware Requirements


The RS-232 host communication module (daughterboard) resides in one of the
slots of the communication motherboard. There are no hardware jumpers or
switch settings used with the RS-232 host communication module. Simply mount
the host communication module to the motherboard.

The communications motherboard must be installed in Primary Chassis 1 in a slot


which has a control data bus connector (the middle connector on the back-plane
of the MACO controller).

3.2 Control Relays


Before attempting to establish communications between the Host and the MACO,
make certain to enable or disable the CRs appropriate for your application. If the
CRs listed below are not set correctly, change them in the RLD logic using the RLD
Editor software program.

3.2.1 Inhibit Remote Access (CR 649)


Control relay 649 is used to inhibit remote access such as from a personal
computer to the MACO controller. With this relay energized, the MACO controller
will not accept any changes from a remote device.

3.2.2 Enable Remote Setpoint Change (CR 650)


Control relay 650 is used to enable remote setpoint changes. This control relay
must be energized (and control relay 649 must be de-energized) in order to make
setpoint changes from a remote device.

3.2.3 Enable Remote CR Change (CR 651)


Control relay 651 is used to enable remote control relay changes. This control
relay must be energized (and control relay 649 must be de-energized) in order to
make control relay changes from a remote device.

3.3 Wiring
The standard cables shown in Figure 3 are available in 10 to 50 foot lengths.

U10 T1

9 Pin Male
Connector

RS-232 COMMUNICATIONS

Figure 2. RS-232 Host Communication Module

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 5 of 56


Host Communications Protocol

A - 1 3 7 0 9 - 0 0 0 - 0 - X X (XX = No. of Ft.) DB9


Cable Assembly Shield
Female DB9 to Unterminated 1 DCD Black
2 RXD White
3 TXD Red
4 DTR Green
5 SG Brown
6 DSR Blue
7 RTS Orange
8 CTS Yellow
9 RI Purple

*A-13709-100-0-XX (XX = No. of Ft.) DB9 DB9


Cable Assembly Shield
Female DB9 to Female DB9 1 DCD Black DCD 1
2 RXD White TXD 3
3 TXD Red RXD 2
4 DTR Green DSR 6
5 SG Brown SG 5
6 DSR Blue DTR 4
7 RTS Orange CTS 8
8 CTS Yellow RTS 7
9 RI Purple RI 9

A - 1 3 7 0 9 - 2 0 0 - 0 - X X (XX = No. of Ft.) DB9 DB25


Cable Assembly Shield Chassis Gnd 1
Female DB9 to Female DB25 1 DCD Black DCD 8
2 RXD White TXD 2
3 TXD Red RXD 3
4 DTR Green DSR 6
5 SG Brown SG 7
6 DSR Blue DTR 20
7 RTS Orange CTS 5
8 CTS Yellow RTS 4
9 RI Purple RI 22

A - 1 3 7 0 9 - 4 0 0 - 0 - X X (XX = No. of Ft.) DB9 DB25


Cable Assembly Shield Chassis Gnd 1
Female DB9 to Male DB25 1 DCD
(Serial to Parallel 2 RXD
Converter) 3 TXD Red RXD 3
4 DTR
5 SG Black SG 7
6 DSR Green DTR 20
7 RTS
8 CTS
9 RI

Figure 3. Standard Serial Cables

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 6 of 56


Host Communications Protocol
3.4 Establishing Data Acquisition
The Host begins with:

<DLE><ENQ>

The MACO will respond (within 10 milliseconds) with:

<DLE<ACK><NUL> (if it is ready)


or:
<DLE<NAK><SOH> (if it is NOT ready) (retry at least three times before aborting)

The Host continues with:

<DLE><SOH><DLE><STX>

followed immediately by a Request Data Command or a Send Data Command.

3.5 Request Data Commands


A Request Data Command sent from the Host must consist of the following bytes:

<BC><ST><PB><AD><FN><TYU><TYL><CK>

where:

<BC> Byte Count (from <BC> thru <TYL>) (always 07H for a Request Data)

<ST> Status Byte (always 00H for Request Data)

<PB> Primary Control Byte (always 45H for a Request Data)

<AD> Function Address - Each controller of a multi-chassis system has its own
set of system addresses, where 1, 2, 3, and 4 identify the Controller
chassis in which the function board is located.

Controller #1 (Primary) 1XH


Controller #2 2XH
Controller #3 3XH
Controller #4 4XH

The "X" indicates the board number of a function (i.e., the first tempera-
ture board of a primary system would be 11H; the second board would
be 12H; the first board in the Controller #2 would be 21H).

Note: Currently the RS-232 can only communicate with the Controller #1
chassis (primary).

<FN> Function Number - MACO functions are identified as follows:

01H Sequence
02H Temperature
03H Hydraulic
04H Parison
05H Accel/Decel
30H RS-232 Communications
38H RS-485 SPI Communications
3AH RS-485 Host Communications
40H Data Handler

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 7 of 56


Host Communications Protocol
<TYU> Type, Upper - The Type Upper Byte identification of specific Values,
Setpoints, Control Relays or ASCII Strings found in the tables under
their corresponding tabs of this manual. The first number of the MACO
types are defined as follows:

0XH is a Value
1XH is a Setpoint
2XH is a Control Relay
4XH is an ASCII String
5XH is a Module Alterable Setpoint
6XH Is a System Command

The Type Upper Byte corresponds to the two left-most digits of "ty"
and is in hexadecimal. <TYU> together with <TYL> form the entry.

<TYL> Type, Lower - The Type Lower Byte completes the identification of
specific Values, Setpoints, CRs or ASCII Strings (corresponds to the
two right-most digits of "ty"). This entry is in hexadecimal. <TYU>
together with <TYL> form the entry.

<CK> Checksum Byte - The bytes from <BC> through <TYL> are added
together and their 2's complement is taken. The sum of all the data plus
the checksum should be zero.

Note: Refer to examples to learn how to calculate a 2's complement.

3.6 Error Reply to Request Data Command


If for some reason, the MACO does not understand the request (invalid function
address, invalid function number, etc.), it will respond as follows:

<UID><BC><ST><PB><01><EC><CK>

where:

<UID> Unit ID - Unit address of MACO system (always 01H for RS-232
communications).

<BC> Byte Count (from <BC> through <EC>) (always 05H for an error reply
to Request Data).

<ST> Status Byte (always XXH (don't care) for error reply).

<PB> Primary Control Byte (always 83H for error reply).

<EC> Error Code (see Error Code explanation).

<CK> Checksum Byte - The bytes from <UID> through <EC> are added
together and their 2's complement is taken. The sum of all the data plus
the checksum should be zero.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 8 of 56


Host Communications Protocol
3.7 Reply to Valid Request Data Command
If the data request is valid and received properly, the MACO responds as follows:

<UID><BC><ST><PB><DAT1><DAT2>...<DATX><CK>

where:

<UID> Unit ID - Unit address of MACO system (always 01H for RS-232
communications).

<BC> Byte Count (all bytes from <BC> through <DATX>).

<ST> Status Byte (always XXH (don't care) for a reply to Request Data).

<PB> Primary Control Byte (dependent on byte count - see 3.15 Primary
Control Byte definition.

<DAT1> Data Byte 1.

<DAT2> Data Byte 2.

<DATX> Data Byte X.

The contents of the data bytes depend on whether the data requested is a setpoint,
value, control relay or ASCII string:

Setpoints must be sent WITHOUT decimal points. Decimal placement is deter-


mined by the column identified as "dec". For example, refer to the "Setpoint" tab
of this manual and find the Cooling Output Limit (Section 2.23). A setpoint of 100.0
is translated as "1000" (03E8H) and sent as (E8H)(03H), least significant byte first.

Note: In some setpoints and values the number of decimal places can be changed
using the OptiGrafix Screen Editor Program. The proper decimal place (dec) must
be verified from the screens installed in the control system.

Setpoints
<DAT1> is the Least Significant Byte
<DAT2> is the Most Significant Byte

Unipolar Setpoints have a range from (0000H) to (FFFFH) or (0 to 65,535


decimal). They are returned as unsigned (positive) numbers.

Bipolar Setpoints have a range from (8000H) to (7FFFH) or (-32,768 to 32,767).

If the Most Significant Bit of <DAT2> is set, the number is NEGATIVE.

Values
<DAT1> is the Least Significant Byte.
<DAT2> is the Most Significant Byte.

Unipolar Values have a range from (0000H) to (FFFFH) or (0 to 65,535 decimal).


They are returned as unsigned (positive) numbers.

Bipolar Values have a range from (8000H) to (7FFFH) or (-32,768 to 32,767).

If the Most Significant Bit of <DAT2> is set, the number is NEGATIVE.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 9 of 56


Host Communications Protocol
Control Relays
Control relays are read back in groups of 16.

<DAT1> Each of the 8 bits of <DAT1> represents the status of a single CR.

<DAT2> Each of the 8 bits of <DAT2> represents the status of a single CR.
The group of 8 CRs represented in <DAT1> is determined by <TYL> of the Request
Data Command.

The "X" digit of <TYU> completes the determination of a single CR. "X" can be any
number from zero to seven and corresponds to the bit number in <DAT1>.

For example, suppose the operator wishes to read the Retune Zone 2 CR (of
Temperature). <TYU> and <TYL> of the request would be used to identify that
particular control relay (2100H).

The MACO responds with the status of eight control relays (from 2000 to 2700)
in <DAT1>.

2000 is bit 0 of <DAT1> (the LSB)


2100 is bit 1 of <DAT1>
2200 is bit 2 of <DAT1>
2300 is bit 3 of <DAT1> 0=Off
2400 is bit 4 of <DAT1> 1=On
2500 is bit 5 of <DAT1>
2600 is bit 6 of <DAT1>
2700 is bit 7 of <DAT1> (the MSB)

<DAT2> will contain the status of eight more control relays (from 2001 to 2701).

2001 is bit 0 of <DAT2> (the LSB)


2101 is bit 1 of <DAT2>
2201 is bit 2 of <DAT2>
2301 is bit 3 of <DAT2> 0=Off
2401 is bit 4 of <DAT2> 1=On
2501 is bit 5 of <DAT2>
2601 is bit 6 of <DAT2>
2701 is bit 7 of <DAT2> (the MSB)

<DAT2> is determined by <TYL> plus 1. (If <DAT1> represents the last eight
control relays of a function, then <DAT2> will be set to zero.

Selector Switches are a special case of control relays. Each nibble of the two data
bytes represents the status of a selector switch.

20XX is bit 0 of <DAT1 or 2> Pos. 1 (the LSB)


21XX is bit 1 of <DAT1 or 2> Pos. 2
22XX is bit 2 of <DAT1 or 2> Pos. 3
23XX is bit 3 of <DAT1 or 2> Pos. 4
24XX is bit 4 of <DAT1 or 2> Pos. 1
25XX is bit 5 of <DAT1 or 2> Pos. 2
26XX is bit 6 of <DAT1 or 2> Pos. 3
27XX is bit 7 of <DAT1 or 2> (the MSB) Pos. 4

If the entire nibble is set to zero (all 4 bits), the selector switch is in Position Zero
(turned OFF).

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 10 of 56


Host Communications Protocol
ASCII Strings
ASCII strings are used by the MACO to display titles, counter values, hour meter
values, etc.

MACO ASCII strings can be a maximum of 29 characters in length. See the


Message File and System Command tab section in this manual.

3.8 Send Data Commands


A Send Data Command to the MACO consists of the following bytes:

<BC><ST><PB><AD><FN><TYU><TYL><DAT1><DAT2><CK>

where:

<BC> Byte Count. The number of bytes sent from the Host (from <BC>
through <DAT2> inclusive).

<ST> Status Byte (always 00H for a Send Data).

<PB> Primary Control Byte (<BC> minus 2 for a Send Data).

<AD> Function Address - Each controller of a multi-chassis system has its


own set of system addresses, where 1, 2, 3, and 4 identify the
controller chassis in which the function board is located.

Controller #1 (Primary) 1XH


Controller #2 2XH
Controller #3 3XH
Controller #4 4XH

The "X" indicates the board number of a function (i.e., the first tempera-
ture board of a primary system would be 11H; the second board would
be 12H; the first board in the Controller #2 would be 21H).

Note: Currently the RS-232 can only communicate with the Controller #1
chassis (Primary).

<FN> Function Number. MACO functions are identified as follows:

01H Sequence
02H Temperature
03H Hydraulic
04H Parison
05H Accel/Decel
30H RS-232 Communications
38H RS-485 SPI Communications
3AH RS-485 Host Communications
40H Data Handler

<TYU> Type, Upper - The Type Upper Byte identification of specific Values,
Setpoints, Control Relays or ASCII Strings (corresponds to the two
right-most digits of "ty"), found in the tables under the corresponding
tabs of this manual. The first number of the MACO types is defined as
follows:

1XH is a Setpoint
2XH is a Control Relay

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 11 of 56


Host Communications Protocol
5XH Is a Module Alterable Setpoint
6XH is a System Command

<TYL> Type, Lower - The Type Lower Byte completes the identification of
specific Setpoints, Control Relays or System Commands (corresponds
to the two right-most digits of "ty"). This entry is in hexadecimal format
for host communications. <TYU> together with <TYL> form "ty."

<DAT1> Data Byte 1


<DAT2> Data Byte 2

The contents of the data bytes depend on whether the data sent is a setpoint or
control relay.

Setpoints must be sent WITHOUT decimal points. Decimal placement is deter-


mined by the column identified as "dec". For example, refer to the "Setpoint" tab
of this manual and find the Cooling Output Limit (Section 2.23). A setpoint of 100.0
is translated as "1000" (03E8H) and sent as (E8H)(03H), least significant byte first.

Ninety-nine point nine would be translated as "999" (03E7H) and sent as (E7H)(03H).

Note: In some setpoints and values the number of decimal places can be changed
using the OptiGrafix Screen Editor Program. The proper decimal place (dec) must
be verified from the screens installed in the control system.

Setpoints
<DAT1> is the Least Significant Byte
<DAT2> is the Most Significant Byte

Unipolar Setpoints range from (0000H) to (FFFFH) or (0 to 65,535 decimal). They


are sent as unsigned (positive) numbers.

Bipolar Setpoints range from (8000H) to (7FFFH) or (-32,768 to 32,767). Con-


vert the decimal number to a 16-bit 2's complement binary equivalent.

Control Relays
Note that it is STRONGLY recommended NOT to use digital communications to
change the state of any Control Relay which may effect machine performance.

Use extreme caution when changing ANY control relay from a Host computer. In
may applications, it is desirable to only enable the write CR's when the machine
is in the idle state.

CR Send Data Commands are sent from the Host using a single data byte.

Only Operator control relays, Setup control relays, and Selector Switches can be
changed through digital communications.

Operator Control Relays (1657 - 1752) can be turned off (by sending a zero); can
be turned on (by sending a one); or can be toggled (by sending a two).

Momentary CRs (1753-1784 & 1913-1944) are NEVER to be energized using


digital communications. If the momentary CRs are energized from the host they will
turn ON and stay ON until turned OFF by an operator at the display.

Setup CRs (1785-1848) can be turned off (by sending a zero); can be turned on
(by sending a one); or can be toggled (by sending a two).

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 12 of 56


Host Communications Protocol
Selector Switches (1849-1912) can be turned off (by sending a zero); can be set
to Position 1 (by sending a one); can be set to Position 2 (by sending a two); can
be set to Position 3 (by sending a three); or can be set to Position 4 (by sending
a four).

System Commands
System Commands are sent from the Host without the use of a data byte. All that
is necessary in order to invoke a system command is to send the proper
<TYU><TYL> bytes. See System Commands.

<CK> Checksum Byte - The bytes from <BC> through <DAT1 or 2> (<TYL>
in the case of system commands) are added together and their 2's
complement is taken. The sum of all the data plus the checksum should
be zero.

3.9 MACO Error Reply to Send Data Command


If for some reason, the MACO does not understand the command (invalid function
address, invalid function number, corrupt data, etc.), it will respond as follows:

<UID><BC><ST><PB><01><EC><CK>

where:

<UID> Unit ID - Unit address of MACO system (always 01H for RS-232
communications).

<BC> Byte Count (from <BC> through <EC>) (always 05H for an error reply
to Send Data Command).

<ST> Status Byte (always XXH (don't care) for error reply).

<PB> Primary Control Byte (always 83H for error reply).

<EC> Error Code (see Error Code explanation).

<CK> Checksum Byte - The bytes from <UID> through <EC> are added
together and their 2's complement is taken. The sum of all the data plus
the checksum should be zero.

3.10 Reply to Valid Send Data Command


If the data sent is valid and is received properly, the MACO will respond as follows:

<UID><BC><ST><01><CK>

where:

<UID> Unit ID - Unit address of MACO system (always 01H for RS-232
communications).

<BC> Byte Count (from <BC> through <01>) (always 03H for a valid reply to
Send Data.

<ST> Status Byte (always XXH (don't care) for a valid reply to a Send Data
Command).

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 13 of 56


Host Communications Protocol
<CK> Checksum Byte - The bytes from <UID> through <01> are added
together and their 2's complement is taken. The sum of all the data plus
the checksum should be zero.

3.11 Changing to the File Transfer Mode


To change from the Data Acquisition Mode to the File Transfer Mode, the Host
must send ten sets of <DLE><EOT> characters.

To change from the File Transfer Mode to the Data Acquisition Mode, follow the
procedure for establishing the command mode.

3.12 Insertion of <DLE>


If for any reason, a Request Data string or a Send Data string contains a <DLE>
character (10H), an additional <DLE> character must be sent.

The byte count will be unaffected.

Only one of the <DLE>'s will be used in the checksum.

3.13 Determining Error Code Definitions


There are only two errors that relate directly to a problem with the RS-232
communications. They are:

81H File Checksum Error

8DH File Data Handler Communications Error

If a Checksum Error (81H) occurs, retry at least three times before resetting or
aborting communications.

A Data Handler Communications Error (8DH) is fatal.

Any other error codes relate to problems within the MACO. To determine the
meaning of whatever error code appears, convert the two bytes following <PB>
(83H) to decimal and locate the resulting number in the printout of the Message
File. For example, if a checksum error occurred, the MACO would respond with:

<UID><BC><ST><PB><01><EC><CK>
or:
<01H><05H><00H><83H><01H><81H><CK>

The two bytes following <PB> are <01H><81H>. 181hex equals 385 decimal.
Message Number 385 is "File Checksum Error."

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 14 of 56


Host Communications Protocol
3.13.1 Error Code Definitions

ty ty
dec hex description

0256 0100 Blank (reserved - DO NOT CHANGE)


0257 0101 COM BUSY ERROR
0258 0102 COM SEL TIME-OUT ERROR
0259 0103 COM BUSY TIME-OUT ERROR
0260 0104 FUNCTION TYPE ERROR
0261 0105 TYPE REQUEST ERROR
0262 0106 MODULE CHECKSUM ERROR
0263 0107 CONTROL BUSY ERROR
0264 0108 CONTROL SEL TIME-OUT ERROR
0265 0109 CONTROL BUSY TIME-OUT ERROR
0266 010A FUNCTION NOT FOUND
0267 010B PTS ERROR
0268 010C STP ERROR
0269 010D COMMAND 1 ERROR
0270 010E EEPROM ERROR
0271 010F EEPROM BUSY ERROR
0272 0110 RAM FAILURE
0273 0111 SETPOINT REJECTED ERROR
0274 0112 SETPOINT NOT FOUND
0275 0113 VALUE NOT FOUND
0276 0114 COMMAND 2 ERROR
0277 0115 RTC ERROR
0278 0116 SETPOINT LIMIT ERROR
0279 0117 CONTROL RELAY WRITE ERROR
0280 0118 MODULE REJECTS SETPOINT
0281 0119 MODULE MODE REJECTS SETPOINT
0282 011A DATA NOT READY
0283 011B CONTROL RELAY READ ERROR
0284 011C CTL DPR RAM FAILURE
0285 011D COM DPR RAM FAILURE
0286 011E CTL FAULT ERROR
0287 011F COM FAULT ERROR
0288 0120 POWER GOING DOWN
0289 0121 CMD ERROR
0290 0122 PCB ERROR
0291 0123 MESSAGE REQUEST ERROR
0292 0124 STRING REQUEST ERROR
0293 0125 PORT SETUP ERROR
0294 0126 HARDWARE SETUP ERROR
0295 0127 SCREEN MISMATCH
0296 0128 HEADER VERSION MISMATCH
0297 0129 SEQUENCE RLD HEADER MISMATCH
0298 012A SCREEN FILE NOT LOADED
0299 012B SYSTEM SCREEN FILE NOT LOADED
0300 012C CONFIGURATION NOT LOADED
0301 012D SYSTEM CONFIG NOT LOADED
0302 012E MODFILE DATA NOT LOADED
0303 012F TIMESLOT DATA NOT LOADED
0304 0130 RLD NOT LOADED
0305 0131 SYSTEM MODFILE DATA NOT LOADED
0306 0132 SPC DATA FILE NOT LOADED
0307 0133 RESERVED FILE #7 NOT LOADED

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 15 of 56


Host Communications Protocol
ty ty
dec hex description

0308 0134 RESERVED FILE #6 NOT LOADED


0309 0135 RESERVED FILE #5 NOT LOADED
0310 0136 RESERVED FILE #4 NOT LOADED
0311 0137 RESERVED FILE #3 NOT LOADED
0312 0138 RESERVED FILE #2 NOT LOADED
0313 0139 RESERVED FILE #1 NOT LOADED
0314 013A COMMAND TYPE #3 ERROR
0315 013B MODULE RLD ERROR
0316 013C TOO MANY USER CONFIGURATIONS
0317 013D TOO MANY SYSTEM CONFIGURATIONS
0318 013E CRS/SWS NOT LOADED
0319 013F HW SETUP NOT LOADED
0320 0140 DISPLAY HANDLER BUSY
0321 0141 SECURITY ACCESS ERROR
0322 0142 DATA HANDLER BUSY
0323 0143 THERMOCOUPLE REVERSED
0324 0144 CONSECUTIVE TIMESLOT ERRORS
0325 0145 RECIPE TRANSFER COMPLETE
0326 0146 RECIPE TRANSFER ERROR
0327 0147 RECIPE TRANSFER NOT ALLOWED
0328 0148 DELETING RECIPE
0329 0149 RECIPE DELETE COMPLETE
0330 014A RECIPE DELETE ERROR
0331 014B RECIPE ALLOCATION ERROR
0332 014C RECIPE ALREADY EXISTS
0333 014D RECIPE DOES NOT EXIST
0334 014E INSTA-SET TRANSFER COMPLETE
0335 014F INSTA-SET TRANSFER ERROR
0336 0150 SETPOINTS RESTORED
0337 0151 FILE TRANSFER COMPLETE
0338 0152 LOCAL ACCESS ERROR
0339 0153 REMOTE ACCESS ERROR
0340 0154 DELETE NOT ALLOWED
0341 0155 TRANSFER NOT ALLOWED
0342 0156 STM ERROR
0343 0157 MTS ERROR
0344 0158 DHTS ERROR
0345 0159 STDH ERROR
0346 015A OPTION NOT INSTALLED
0347 015B INSTA-SET DOES NOT EXIST
0348 015C INSTA-SET TRANSFER NOT ALLOWED
0349 015D SETPOINT LIMIT ON SCREEN
0350 015E LOW BATTERY
0351 015F SPC DATA NOT LOADED
0352 0160 CONTROL LIMITS NOT CALCULATED
0353 0161 CONTROL LIMITS CALCULATED
0354 0162 PRINTER NOT READY
0355 0163 DATA POINT NOT REMOVED
0356 0164 DATA POINT REMOVED
0357 0165 PRINTER BUSY
0358 0166 UPDATE SEQUENCE MODULE SOFTWARE
0359 0167 RLD ACCESS ERROR
0360 0168 PRINTER READY
0370 0172 SYS RESETTING OR COMM TIME-OUT ERROR

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 16 of 56


Host Communications Protocol
ty ty
dec hex description

0385 0181 FILE CHECKSUM


0386 0182 FILE SUB BLOCK ERROR
0387 0183 FILE MACO 4000 PORT ERROR
0388 0184 FILE EEPROM ERROR
0389 0185 FILE SIZE ERROR
0390 0186 FILE RLD ERROR
0391 0187 FILE TYPE ERROR
0392 0188 FILE FUNCTION TYPE ERROR
0393 0189 FILE TIME-OUT ERROR
0394 018A FILE TIMESLOT RUNNING ERROR
0395 018B FILE NOT FOUND ERROR
0396 018C FILE FLAT PANEL COMM ERROR
0397 018D FILE DATA HANDLER COMM ERROR
0398 018E FILE PC COMM ERROR
0399 018F FILE TRANSFER NOT ALLOWED
0400 0190 FILE PROTOCOL ERROR
0417 01A1 INSERT NEXT CARTRIDGE
0418 01A2 CARTRIDGE NOT INSTALLED
0448 01C0 EPROM CHECKSUM ERROR
0449 01C1 RAM CHECKSUM ERROR
0450 01C2 BOARD NOT CALIBRATED
0451 01C3 BALCO FAILURE
0452 01C4 BOARD WENT THROUGH RESET
0453 01C5 CRITICAL SP FAULT
0454 01C6 RLD CHECKSUM FAILURE
0455 01C7 RLD WRITE FAILURE
0456 01C8 HARDWARE SETUP CHANGED
0457 01C9 EXTERNAL RAM FAILURE
0458 01CA SEQ/HYDR DPR FAILURE
0459 01CB SEQ/HYDR CONNECT FAILURE
0460 01CC DATA HANDLER INTERRUPT ERROR
0461 01CD SUB FUNCTION LOST
0462 01CE INCOMPATIBLE RLD FILE
0497 01F1 CHECKSUM ERROR
0498 01F2 SHARED RAM TIME-OUT
0499 01F3 SHARED RAM REPLY TIME-OUT
0500 01F4 SERIAL OVERRUN
0501 01F5 BYTE COUNT ERROR
0502 01F6 BYTE TO BYTE TIME-OUT
0512 0200 (Blank)
0513 0201 TIMESLOT RUNNING
0514 0202 TIMESLOT NOT RUNNING
0515 0203 READING SETPOINTS
0516 0204 SAVING SETPOINTS
0517 0205 SETPOINTS SAVED
0518 0206 HARDWARE SETUP SAVED
0519 0207 READING SCREENS FROM SYSTEM
0520 0208 WRITING SCREENS TO SYSTEM
0521 0209 READING SYSTEM SCREENS FROM SYSTEM
0522 020A WRITING SYSTEM SCREENS TO SYSTEMS
0523 020B READING CONFIGURATION DATA
0524 020C WRITING CONFIGURATION DATA
0525 020D READING SYSTEM CONFIGURATION DATA
0526 020E WRITING SYSTEM CONFIGURATION DATA

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 17 of 56


Host Communications Protocol
ty ty
dec hex description

0527 020F READING MODFILE DATA FROM SYSTEM


0528 0210 WRITING MODFILE DATA TO SYSTEM
0529 0211 READING TIMESLOT DATA FROM SYSTEM
0530 0212 WRITING TIMESLOT DATA TO SYSTEM
0531 0213 READING RLD FROM SYSTEM
0532 0214 WRITING RLD TO SYSTEM
0533 0215 READING SYSTEM MODFILE DATA
0534 0216 WRITING SYSTEM MODFILE DATA
0535 0217 READING RECIPE FROM SYSTEM
0536 0218 WRITING RECIPE TO SYSTEM
0537 0219 READING INSTA-SET FROM SYSTEM
0538 021A WRITING INSTA-SET TO SYSTEM
0539 021B READING SPC LABEL FILE FROM SYSTEM
0540 021C WRITING SPC LABEL FILE TO SYSTEM
0541 021D READING RESERVED FILE #5
0542 021E WRITING RESERVED FILE #5
0543 021F READING RESERVED FILE #4
0544 0220 WRITING RESERVED FILE #4
0545 0221 READING RESERVED FILE #3
0546 0222 WRITING RESERVED FILE #3
0547 0223 READING RESERVED FILE #2
0548 0224 WRITING RESERVED FILE #2
0549 0225 READING RESERVED FILE #1
0550 0226 WRITING RESERVED FILE #1
0551 0227 (Blank)
0552 0228 SEQUENCE
0553 0229 TEMPERATURE
0554 022A HYDRAULIC
0555 022B ANALOG I/O
0556 022C DATA HANDLER
0557 022D PC PORT
0558 022E PRINTER PORT
0559 022F RS-232 PORT
0560 0230 RS-485 PORT
0561 0231 AC INPUT
0562 0232 AC OUTPUT
0563 0233 DC INPUT
0564 0234 DC OUTPUT
0565 0235 RESERVED FUNCTION TYPE #11
0566 0236 RESERVED FUNCTION TYPE #10
0567 0237 RESERVED FUNCTION TYPE #9
0568 0238 RESERVED FUNCTION TYPE #8
0569 0239 RESERVED FUNCTION TYPE #7
0570 023A RESERVED FUNCTION TYPE #6
0571 023B RESERVED FUNCTION TYPE #5
0572 023C RESERVED FUNCTION TYPE #4
0573 023D RESERVED FUNCTION TYPE #3
0574 023E RESERVED FUNCTION TYPE #2
0575 023F RESERVED FUNCTION TYPE #1
0576 0240 (Blank)
0577 0241 SUNDAY
0578 0242 MONDAY
0579 0243 TUESDAY
0580 0244 WEDNESDAY

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 18 of 56


Host Communications Protocol
ty ty
dec hex description

0581 0245 THURSDAY


0582 0246 FRIDAY
0583 0247 SATURDAY
0584 0248 WEEKDAY
0585 0249 WEEKEND
0586 024A JANUARY
0587 024B FEBRUARY
0588 024C MARCH
0589 024D APRIL
0590 024E MAY
0591 024F JUNE
0592 0250 JULY
0593 0251 AUGUST
0594 0252 SEPTEMBER
0595 0253 OCTOBER
0596 0254 NOVEMBER
0597 0255 DECEMBER
0598 0256 DISABLED
0599 0257 SECONDS
0600 0258 MINUTES
0601 0259 HOURS
0602 025A DAYS
0603 025B Disabled
0604 025C Ram Vel SP
0605 025D Ram PR SP
0606 025E Ram PR
0607 025F Clamp PR
0608 0260 Ram Vel
0609 0261 Ram Pos
0610 0262 Clamp Pos
0611 0263 Ejector Pos
0612 0264 Tach RPM
0613 0265 PID Output
0614 0266 Analog Out 1
0615 0267 Analog Out 2
0616 0268 Analog Out 3
0617 0269 Analog Out 4
0618 026A Screw Out
0622 026E (Blank)
0623 026F ips
0624 0270 psi
0625 0271 psi
0626 0272 psi
0627 0273 ips
0628 0274 in
0629 0275 in
0630 0276 in
0631 0277 rpm
0632 0278 %
0633 0279 (Blank)
0634 027A (Blank)
0635 027B (Blank)
0636 027C (Blank)
0637 027D %

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 19 of 56


Host Communications Protocol
ty ty
dec hex description

0641 0281 (Blank)


0642 0282 Printer
0643 0283 Reserved 2
0644 0284 System Modfile
0645 0285 RLD
0646 0286 System Screen
0647 0287 User Screen
0648 0288 User Config
0649 0289 Recipe
0650 028A Reserved 9
0651 028B User SPC Labels
0652 028C Timeslot data
0653 028D User Modfile
0654 028E Reserved 13
0655 028F Reserved 14
0656 0290 System Config
0657 0291 Reserved 16
0658 0292 Reserved 17
0659 0293 Reserved 18
0660 0294 Reserved 19
0661 0295 Insta-set
0662 0296 Reserved 21
0663 0297 Reserved 22
0664 0298 Reserved 23
0665 0299 Reserved 24
0666 029A Reserved 25
0667 029B WRITING SCREENS TO CARTRIDGE
0668 029C WRITING SYSTEM SCREENS TO CARTRIDGE
0669 029D WRITING CONFIGURATION TO CARTRIDGE
0670 029E WRITING SYS. CONFIG. TO CARTRIDGE
0671 029F WRITING MODFILE DATA TO CARTRIDGE
0672 02A0 WRITING TIMESLOT DATA TO CARTRIDGE
0673 02A1 WRITING RLD TO CARTRIDGE
0674 02A2 WRITE SYS. MODFILE DATA TO CARTRIDGE
0675 02A3 WRITING RECIPE TO CARTRIDGE
0676 02A4 WRITING INSTA-SET TO CARTRIDGE
0677 02A5 WRITING SPC LABEL FILE TO CARTRIDGE
0678 02A6 WRITING RESERVED FILE #5 TO CARTRIDGE
0679 02A7 WRITING RESERVED FILE #4 TO CARTRIDGE
0680 02A8 WRITING RESERVED FILE #3 TO CARTRIDGE
0681 02A9 WRITING RESERVED FILE #2 TO CARTRIDGE
0682 02AA WRITING RESERVED FILE #1 TO CARTRIDGE

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 20 of 56


Host Communications Protocol
3.14 Status Byte Definition

NOTE: The status byte is not used much in RS-232 host 


B B B B B B B B communications. The byte contains a CR change flag
7 6 5 4 3 2 1 0 which is monitored by the display and indicates a change
in one of the control relays with System Adressess
1977-2040 (Sequence Module).
RESERVED RESERVED
Once the display examines the flag bit, the bit is cleared.
Depending on when the status byte is examined, host
CR CHANGE FLAG communications may or may not be able to determine a
0 = No Change change has occurred.
1 = Change

3.15 Primary Control Byte Definition

B B B5 B B B B B
7 6 4 3 2 1 0

CONTROL TYPE PRIMARY CONTROL BLOCK BYTE COUNT


0 = Data 1 - 63 is valid
1 = Error Does NOT include:
<UID> Unit ID
WRITE or READ <BC> Byte Count
0 = Write (changing something) <SB> Status Byte
1 = Read (looking at something) <CK> Checksum Byte
<DLE><DLE> Any Secondary Control/Data Bytes

3.16 Example, Request Data, Counter 1 Value (Sequence)

PRIMARY
HOST COMPUTER BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE,
COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER CHECKSUM
07H 00H 45H 11H 01H 00H 18H 8AH
0001 1000
0000 0000
0000 0001
0001 0001
0100 0101
0000 0000
0000 0111
TOTAL 0111 0110
1's COMPLEMENT 1000 1001
2's COMPLEMENT 1000 1010 = 8AH

PRIMARY (LSB) (MSB)


MACO
UNIT BYTE STATUS CONTROL DATA DATA
ID COUNT BYTE BYTE 1 2 CHECKSUM
01H 05H 00H 43H 14H 79H 2AH
0111 1001
0001 0100
0100 0011
0000 0000
0000 0101
0000 0001
TOTAL 1101 0110
1's COMPLEMENT 0010 1001
2's COMPLEMENT 0010 1010 = 2AH

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 21 of 56


Host Communications Protocol
3.17 Example, Request Data, Open Loop Output Zone 2 (Temperature)

PRIMARY
HOST BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE,
COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER CHECKSUM
07H 00H 45H 11H 02H 12H 15H 7AH
0001 0101
0001 0010
0000 0010
0001 0001
0100 0101
0000 0000
0000 0111
TOTAL 1000 0110
1's COMPLEMENT 0111 1001
2's COMPLEMENT 0111 1010 = 7AH

(-100.0)
PRIMARY (LSB) (MSB)
MACO UNIT BYTE STATUS CONTROL DATA DATA
ID COUNT BYTE BYTE 1 2 CHECKSUM
01H 05H 00H 43H 18H FCH A3H
1111 1100
0001 1000
0100 0011
0000 0000
0000 0101
0000 0001
TOTAL 0101 1101
1's COMPLEMENT 1010 0010
2's COMPLEMENT 1010 0011 =A3 H

3.18 Example, Request Data, Operator Control Relay 1703 (Data Handler)

PRIMARY
HOST BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE,
COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER CHECKSUM
07H 00H 45H 11H 40H 26H 85H B8H
1000 0101
0010 0110
0100 0000
0001 0001
0100 0101
0000 0000
0000 0111
TOTAL 0100 1000
1's COMPLEMENT 1011 0111
2's COMPLEMENT 1011 1000 = B8H

PRIMARY (ALL 2X85 CRs) (ALL 2X86 CRs)


MACO UNIT BYTE STATUS CONTROL DATA DATA
ID COUNT BYTE BYTE 1 2 CHECKSUM
01H 05H 00H 43H 1FH 83H 15H
1000 0011
0001 1111
0100 0011
0000 0000
0000 0101
0000 0001
TOTAL 1110 1011
1's COMPLEMENT 0001 0100
2's COMPLEMENT 0001 0101 = 15H

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 22 of 56


Host Communications Protocol
3.19 Example, Request Data, Setup Selector Switch 1 (Data Handler)

PRIMARY
HOST COMPUTER BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE,
COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER CHECKSUM
07H 00H 45H 11H 40H 20H 98H ABH
1001 1000
0010 0000
0100 0000
0001 0001
0100 0101
0000 0000
0000 0111
TOTAL 0101 0101
1's COMPLEMENT 1010 1010
2's COMPLEMENT 1010 1011 = ABH

PRIMARY (Switch 1 & Switch 2) (Switch 3 & Switch 4)


MACO UNIT BYTE STATUS CONTROL DATA DATA
ID COUNT BYTE BYTE 1 2 CHECKSUM
01H 05H 00H 43H 41H 20H 56H
0010 0000
0100 0001
0100 0011
0000 0000
0000 0101
0000 0001
TOTAL 1010 1010
1's COMPLEMENT 0101 0101
2's COMPLEMENT 0101 0110 = 56H

3.20 Example, Send Data, Setup Selector Switch 1, Position 2 (Data Handler)
PRIMARY
HOST COMPUTER BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE, DAT1
COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER 1 CHECKSUM
08H 00H 06H 11H 40H 21H 98H 02H E6H
0000 0010
1001 1000
0010 0001
0100 0000
0001 0001
0000 0110
0000 0000
0000 1000
TOTAL 000 1 1010
1's COMPLEMENT 1110 0101
2's COMPLEMENT 1110 0110 = E6H

MACO UNIT BYTE STATUS


ID COUNT BYTE OK CHECKSUM
01H 03H 00H 01H FBH

0000 0001
0000 0000
0000 0011
0000 0001
TOTAL 0000 0101
1's COMPLEMENT 1111 1010
2's COMPLEMENT 1111 1011 = FBH

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 23 of 56


Host Communications Protocol
3.21 Example, Send Data, Clamp Sensor Length (35.500) (Hydraulic)
PRIMARY (LSB) (MSB)
HOST BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE, DATA DATA
COMPUTER COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER 1 2 CHECKSUM
09H 00H 07H 11H 03H 10H 83H ACH 8AH 13H

1000 1010
1010 1100
1000 0011
0001 0000
0000 0011
0001 0001
0000 0111
0000 0000
0000 1001
TOTAL 1110 1101
1's COMPLEMENT 0001 0010
2's COMPLEMENT 0001 0011 = 13H

MACO UNIT BYTE STATUS


ID COUNT BYTE OK CHECKSUM
01H 03H 00H 01H FBH

0000 0001
0000 0000
0000 0011
0000 0001
TOTAL 0000 0101
1's COMPLEMENT 1111 1010
2's COMPLEMENT 1111 1011 = FBH

3.22 Example, Send Data, Operator CR 1729 (Data Handler)


PRIMARY
HOST BYTE STATUS CONTROL FUNCTION FUNCTION TYPE, TYPE, DATA
COMPUTER COUNT BYTE BYTE ADDRESS NUMBER UPPER LOWER 1 CHECKSUM
08H 00H 06H 11H 40H 20H 89H 01H F7H

0000 0001
1000 1001
0010 0000
0100 0000
0001 0001
0000 0110
0000 0000
0000 1000
TOTAL 0000 1001
1's COMPLEMENT 1111 0110
2's COMPLEMENT 1111 0111 = F7H

MACO UNIT BYTE STATUS


ID COUNT BYTE OK CHECKSUM
01H 03H 00H 01H FBH

0000 0001
0000 0000
0000 0011
0000 0001
TOTAL 0000 0101
1's COMPLEMENT 1111 1010
2's COMPLEMENT 1111 1011 = FBH

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 24 of 56


Host Communications Protocol
4. RS-485 Host Communications
The MACO RS-485 Host communications module provides the capability to link
your MACO 4000, 5000 and 6000 series control systems to a host computer. This
allows full Supervisory Control and Data Acquisition (SCADA) over a standard
network platform. A single serial port on a computer can communicate with up to
32 MACO controlled machines on a single cable. The host computer can collect,
display and store operating data, as well as transmit setpoints and change control
relay states to the MACO controllers.

Data can be read or written to MACO in blocks or as individual values or setpoints.


Up to ten blocks can be defined. Each block can have as many as 60 values and/
or setpoints. The module scans the menu of data items requested by the host
computer, starting with block 0 and proceeds until it encounters a blank block.
There can be no blank fields within a block so be sure to construct a contiguous
menu when setting up your data acquisition routine at the host computer.

The buffer holds up to five blocks of data. The BUFFER MODE setpoint
determines the number of blocks to be gathered on a zero to 1 transition of the
TRIGGER CR. If the BUFFER MODE setpoint = 0, the module collects data
continuously. If the BUFFER MODE setpoint = 1, 2, 3, 4 or 5, data collection starts
when the TRIGGER CR goes high. The trigger does not have to be held high for
the entire gathering cycle. The DATA VALID CR (3765) is set when the specified
number of blocks has been collected and transferred to the output buffer.
(Additional blocks, if requested, are gathered continuously).

4.1 Hardware Requirements


There are two hardware jumpers and a bank o f 8 switches that must be manually
set before installing the RS-485 host communications module (daughterboard)
onto the communications motherboard.

Jumpers J1 and J2 are used to terminate the RS-485 data lines of your network.
If you have three machines equipped with MACO's, the node located farthest from
host would have the jumpers in the "IN" position and the other nodes would have
the jumpers in the "OUT" position.

The first 6 (1 - 6) switches of S1 are used to establish a node address for the card.
Switches 7 and 8 determine some data transfer parameters (see next page).

The RS-485 host communication module can be used with Data Handler V20.76
or newer and Sequence V03.46 or newer.

4.1.1 Editor Requirements


The following versions of screen and RLD editors are required:

OptiGrafix V3.04 or newer


RLD V4.5 or newer

U10 T1
J2
IN OUT

J1
IN OUT
8
7 4 SHIELD
6
5 3 ISOCOM
4
3
2 DATA
2 1 DATA
1

ON OFF
RS-485 COMMUNICATIONS S1

Figure 4. RS-485 Host Communication Module

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 25 of 56


Host Communications Protocol
4.1.2 Switch Definitions

4.1.2.1 Switches 1 - 6 Node Address (UID)


The MACO node address on the RS-485 network is set by using dip switch S1 on
the RS-485 host communication module. The module address is encoded in
binary as shown below.

Switches Setting 0=OFF 1=ON x = Don't Care

Switches
1 2 3 4 5 6 7 8
Node
1 0 1 1 1 1 1 x x
2 1 0 1 1 1 1 x x
3 0 0 1 1 1 1 x x
4 1 1 0 1 1 1 x x
5 0 1 0 1 1 1 x x
6 1 0 0 1 1 1 x x
7 0 0 0 1 1 1 x x
8 1 1 1 0 1 1 x x
9 0 1 1 0 1 1 x x
10 1 0 1 0 1 1 x x
11 0 0 1 0 1 1 x x
12 1 1 0 0 1 1 x x
13 0 1 0 0 1 1 x x
14 1 0 0 0 1 1 x x
15 0 0 0 0 1 1 x x
16 1 1 1 1 0 1 x x
17 0 1 1 1 0 1 x x
18 1 0 1 1 0 1 x x
19 0 0 1 1 0 1 x x
20 1 1 0 1 0 1 x x
21 0 1 0 1 0 1 x x
22 1 0 0 1 0 1 x x
23 0 0 0 1 0 1 x x
24 1 1 1 0 0 1 x x
25 0 1 1 0 0 1 x x
26 1 0 1 0 0 1 x x
27 0 0 1 0 0 1 x x
28 1 1 0 0 0 1 x x
29 0 1 0 0 0 1 x x
30 1 0 0 0 0 1 x x
31 0 0 0 0 0 1 x x
32 1 1 1 1 1 0 x x

Note: If all the switches (1-6) are in the ON position or a node address is greater
than 32, the host communications module address will default to "0" and commu-
nications will be disabled.

4.1.2.2 Switch 7 Save Configuration


Switch 7 ON: With switch 7 in the "ON" position, the table of parameters is saved
in EEROM (on the RS-485 card). If the controller resets or powers down/powers
up, the table will be read from the RS-485 card and does not need to be resent from
the computer.

Switch 7 OFF: With switch 7 in the "OFF" position, the table of parameters is not

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 26 of 56


Host Communications Protocol
saved on the RS-485 card. If the controller resets or powers down/ powers up, the
table will have to be resent from the host.

4.1.2.3 Switch 8 Data Update


When new data blocks are loaded, all setpoints and then all values are updated
during the first pass through the new data. A block of data will not be sent to the
host until all setpoints and values have been updated (an error code of <NAK><46H>
is sent until the data is ready).

Switch 8 ON: With switch 8 in the "ON" position, after the first update, values and
setpoints are updated at a ratio of 8 to 1 (values to setpoints, respectively).

Switch 8 OFF: With switch 8 in the "OFF" position, all setpoints and then all values
are continuously updated.

4.1.3 Communication Board Location


The RS-485 host communications module (daughterboard) mounts into any
position on the communications motherboard.

The communications motherboard must be installed in a slot which has a control


data bus connector (the middle connector on the back-plane of the MACO controller.

4.2 General Setup Procedure


The setup procedure consists of: setting the module node address (UID); installing
the MACO RS-485 host communications module; wiring each module to the host
computer; enabling the data handler (COMM SETPOINT = 9); and selecting a
baud rate compatible with the host computer.

4.2.1 Control Relays


Before attempting to establish communication between the host and MACO, make
certain the following CRs are properly set in the RLD.

The following control relays should be energized as required:

CR 650 Enable Remote Setpoint Change


CR 651 Enable Remote Control Relay Change
CR 652 Enable Other Remote Functions (needed for Command #15)
CR 653 Enable Remote Recipe Save
CR 654 Enable Remote Recipe Read
CR 655 Enable Remote Recipe Delete

RS-232/RS-485
Converter A-12356-3 1 1 1 DATA (+)
Host E
2 2 2 DATA (-)
RS-232 F
Port 3 3 3 ISOCOM
H 4 SHIELD
4 4
or

Host MACO MACO MACO


RS-485 NODE 1 NODE 2 NODE X
Port

Figure 5. Wire Multiple MACO's

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 27 of 56


Host Communications Protocol
The following control relay should be de-energized:

CR 649 Inhibit Remote Access

Decide if the following CR should be energized:

CR 642 Inhibit Local Setpoint Change

4.3 Wiring
The RS-485 module uses a four pin connector to communicate with the host.
Connector E23-1134-004 is provided with screw terminals for field wiring.

The RS-485 cabling must run on the low voltage side of the MACO controller's
cable tray located at the bottom of each chassis.

4.4 Module Setpoints

4.4.1 Baud Rate Setpoint


The MACO RS-485 host communications module baud rate can be set by placing
the baud rate setpoint on a user screen using the OptiGrafix screen editor. Baud
rate setpoints available are listed below;

0 = 9600 3 = 1200
1 = 4800 4 = 19200
2 = 2400

If the baud rate setpoint is not programmed on a screen, it defaults to 9600 baud.

4.4.2 COMMODE Setpoint


This setpoint determines the mode of operation for monitoring data (triggered or
continuous). The user must to add the COMMODE setpoint to a user screen in
order to allow access to this setpoint. The COMMODE setpoint listing is found in
the "Setpoint" section of this manual, Section 6.2. If the COMMODE setpoint is set
to "0," monitored data is scanned continuously. If the COMMODE setpoint is not
set to "0," the data gathering is in the triggered mode. The number of blocks (1 to
5) are scanned when the TRIGGER control relay is energized.

Note: Only value parameters are triggered. Setpoints are monitored continuously.

4.4.3 Clear Data Valid Timer


This setpoint is used to enter the time delay after which the Data Valid Control
Relay (CR 3765) will be cleared by the module after it goes high. Valid only if the
Host Control Relay (CR 3743) is low (logic 0). If the Host Control Relay (CR 3743)
is high (logic 1), the module does not clear the Data Valid Timer (instead it would
be cleared by the Host using Command #7). Setpoint range is 3 to 20 seconds.
If the setpoint is not included on any screen, it will default to 3 seconds.

4.5 Module Values

4.5.1 Block Value 1 - Block Value 10


These values are used to display the number of parameters (setpoints plus values)
in a specific data block. Note that early modfile versions may show these as
Reserved Value 2 - Reserved Value 11, respectively).

4.5.2 Number of Setpoints


This value is used to display the total number of setpoints in all of the data blocks
(formerly labeled "reserved value 12").

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 28 of 56


Host Communications Protocol
4.5.3 Number of Values
This value is used to display the total number of values in all of the data blocks
(formerly labeled "reserved value 13").

4.5.4 Switch Value


This value is used to display the settings of switch 1 (formerly labeled "reserved
value 16").

4.6 Module Control Relays


The RS-485 Host communications module has three control relays that can be
addressed by the Relay Ladder Diagram (RLD). They are TRIGGER (CR #3753),
HOST CONTROL (CR #3754) and DATA VALID (CR #3765).

The HOST CONTROL relay should be set high in the RLD if the host will be used
to clear the DATA VALID CR. After the host has read the last block, the DATA
VALID control relay will be cleared when the host sends the COMMAND #7
"CLEAR DATA VALID COMMAND". If the HOST CONTROL relay is not set high,
the DATA VALID control relay will be cleared by the module 3 to 20 seconds after
it is set.

4.6.1 TRIGGER Control Relay (CR 3753)


This is a "Sequence to Module" (STM) control relay which initiates gathering of
triggered monitor data when it is energized by logic (1). Recommend holding high
for at least two line cycles. The CR does not have to be held high while data is being
gathered. The CR must be de-energized (logic 0) after the DATA VALID control
relay is energized (logic 1) and then re-energized (logic 1) to initiate the next cycle.

4.6.2 HOST Control Relay (CR 3754)


This is a "Sequence to Module" (STM) control relay. When de-energized (logic 0),
it causes the module to clear the DATA VALID according to the Clear Data Valid
Timer setting (3 to 20 seconds). See Section 4.4.3.

Note: DATA VALID can still be cleared by the host.

If energized (logic 1), DATA VALID is cleared by the host using command #7.

4.6.3 DATA VALID Control Relay (CR 3765)


this is a "Module to Sequence" (MTS) control relay. When the COMMODE setpoint
is zero (the non-triggered mode) CR 3765 is set high when data gathering.

When the COMMODE setpoint is 1-5 (the triggered mode), CR 3765 is set high
when all data has been collected. It is cleared according to status of the HOST
CONTROL relay.

4.7 Module Error Codes


The RS-485 Host communication module will return one or more of the following
error codes if it detects a communication error:

31H LRC checksum error


32H Invalid number of parameters
34H Invalid command parameters
35H Setpoint limit error
3AH Data command error
3BH Time-slot running and remote access control relay not enabled
3FH Invalid host command
40H Time-out waiting for data handler
44H Triggered Data Block Request and Data Valid not set.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 29 of 56


Host Communications Protocol
4.7.1 Data Handler Error Code Messages
The RS-485 host communication module will return one or more of the Data
Handler Error Code Messages (0100H to 01FFH) listed in the System Message
Definitions section (1640-IN-051-0-xx) of this manual.

The RS-485 host communication module removes the first byte of the two byte
code and transmits messages using the last byte (00H to FFH).

4.8 Command Structure


Commands and responses are transmitted between the host computer and the
RS-485 Host communications module in code bytes (< >). Commands are
initiated at the host and the RS-485 Host communications module responds.
Unique code bytes are defined in the following paragraphs corresponding to the
command in which they are used. Common code bytes include:

Mnemonic Definition

<AD> Function Address


Each controller of a multi-chassis system has its own set of
system addresses where 1, 2, 3, and 4 identify the chassis
in which the function board is located.

Controller #1 (Primary) 1XH


Controller #2 2XH
Controller #3 3XH
Controller #4 4XH

The "X" identifies the board number of a function (i.e., the first
temperature board of a primary system would be 11H; the
second board would be 12H).

Note: Currently the RS-485 can only communicate with the


Controller #1 chassis (Primary).

<ACK> Acknowledge <06H>

<BB> ASCII decimal number of blocks, range <30H to 39H> (0 to 9)

<CC><CC> Command code... for example, command #1:

<CC><CC> = <30H><31H> = 01

or command #5:

<CC><CC>=<30H><35H>= 05

<CMD> Data Handler host command (see Cmd #15, Section 5.13)

<EOT> End of transmission <04H> (see Note)

<EP> Ending parameter number, range <01H to 3CH> (1 to 60)

<ETX> End of text <03H>

<F Num> File Number. For exmple, 01H = First Recipe

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 30 of 56


Host Communications Protocol
<FN> Function Number. MACO functions are identified as follows:

01H Sequence
02H Temperature
03H Hydraulic
04H Parison
05H Accel/Decel
30H RS-232 Communications
38H RS-485 SPI Communications
3AH RS-485 Host Communications
40H Data Handler

<FT> File Type (see Cmd #12, Section 5.10).

<LRC> Longitudinal redundancy check (Exclusive OR of all characters


in transmission except for the first <EOT>. Only the first <EOT>
of a double <EOT><EOT> is included.

<LSB> Least significant byte. Example, CR 273E <LSB>=3E

<MF> Mode Function, (File/DH=C0H)

<MSB> Most significant byte. Example, CR 273E <MSB>=27

<NAK> Not acknowledged <15H>

<NN><NN> ASCII decimal character of number of parameters to be down-


loaded. Example: 15 parameters <31H><35H>

<RCMD> Write code for operator control relays, setup control relays and
selector switch control relays:

<RCMD>=0 Turn OFF control relay


<RCMD>=1 Turn ON control relay
<RCMD>=2 Toggle control relay

Selector Switches:

<RCMD>=0 OFF position


<RCMD>=1 Position 1
<RCMD>=2 Position 2
<RCMD>=3 Position 3
<RCMD>=4 Position 4

<Res> Reserved Byte (00H)

<SB> Sub-Block Number (always 0)

<SP> Starting parameter number, range <01H to 3CH> (1 to 60)

<STX> Start of Text <02H>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 31 of 56


Host Communications Protocol
<TYU> Type, Upper - The Type Upper Byte distinguishes MACO types
as follows:

0XH is a Value
1XH is a Setpoint
2XH is a Control Relay
4XH is an ASCII String
5XH is a Module Alterable Setpoint
6XH is a System Command

(Corresponds to the two left-most digits of parser entry. This


entry is shown in both decimal and in hexadecimal (as used with
host communications). <TYU> and <TYL> form "ty."

<TYL> Type, Lower - The Type Lower Byte completes the identification
of specific Values, Setpoints, Control Relays or ASCII Strings
(corresponds to the two right-most digits of parser entry). This
entry is shown in decimal and in hexadecimal (as used with
host communications). <TYU> together with <TYL> form "ty."

<UID><UID> Node address of the MACO controlled machine. For example,


machine #5:

<UID><UID> = <30H><35H> =05;

or machine #21:

<UID><UID> = <32H><31H> = 21

Note: If data includes <EOT> (04H), then a second <EOT> (04H) should be sent,
and only one <EOT> (04H) should be counted in the LRC.

If the LRC = <EOT> (04H), a backspace (08H) should be sent.

5. RS-485 Command Codes


The RS-485 Host communications module recognizes 13 commands from the
host computer:

Command Description
1 Download menu parameters
2 Request upload of block data
3 Setpoint change (standard and module alterable)
6 Request data valid status
7 Clear data valid
8 Individual setpoint/value request
9 Control Relay Read
10 Request ASCII String
11 Change Operator Control Relay (Write)
12 File Access - Read File
13 File Access - Write File
14 Request Host Monitor Error Table
15 Data Handler Host Command

5.1 Command #1 Download Menu Parameters


This command downloads up to ten menu blocks, each of which can contain 60
setpoint and/or value definitions (AD, FN, TYU, TYL). A 3 to 5 second delay should
be allowed between blocks (depending on how the driver is written). The menu

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 32 of 56


Host Communications Protocol
must be contiguous starting with block #0, item #0. Data will collect until the module
encounters an empty block.

Command format from the host computer:

<EOT><UID><UID><CC><CC><BB><NN><NN><ETX><LRC>

where:

<CC><CC> =<30H><31H> Command #1

<BB> = ASCII decimal character of block number <30H> through <39H>(0


through 9)

<NN><NN> = ASCII decimal character of number of parameters to be down-


loaded. For example, 15 parameters would be <31H><35H>.

Response format from the module is:

<ACK><0>
<06H><30H> if successful, or

<NAK><ERROR CODE> if not successful

5.1.1 Example Command #1


In this example we are defining the Download Menu Parameters for block 3, which
is the fourth block. Block 3 menu is a request for: Node address 1; Command 1;
Block number 3, number of parameters 2, Controller Chassis #1, temperature
board 1, Process Setpoint 1 Zone 5 and Process Setpoint 1 Zone 6.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <BB> <NN><NN> <AD>


<04H> <30H><31H> <30H><31H> <33H> <30H><32H> <11H>

<FN> <TYU><TYL> <AD> <FN> <TYU><TYL> <ETX> <LRC>


<02H> <15H><01H> <11H> <02H> <16H><01H> <03H> <31H>

LRC= 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 0001B <CC>
XOR 0011 0011B <BB>
XOR 0011 0000B <NN>
XOR 0011 0010B <NN>

XOR 0001 0001B <AD>


XOR 0000 0010B <FN>
XOR 0001 0101B <TYU>
XOR 0000 0001B <TYL>

XOR 0001 0001B <AD>


XOR 0000 0010B <FN>
XOR 0001 0110B <TYU>
XOR 0000 0001B <TYL>

XOR 0000 0011B <ETX>


XOR = 0011 0001H <LRC>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 33 of 56


Host Communications Protocol
Response from the module:

<ACK> <0>
<06H> <30H>

5.2 Command #2 Request Upload of Block Data


This command requests upload of the data defined by command #1. Any or all
values can be requested from any or all blocks.

Command format from the host computer:

<EOT><UID><UID><CC><CC><BB><SP><EP><ETX><LRC>
where:

<CC><CC> = <30H><32H> Command #2

<BB> = ASCII decimal character of block number <30H> through <39H>(0


through 9)

<SP> = starting parameter number (01H 3CH) (range 1 60)

<EP> = ending parameter number (01H 3CH) (range 1 60)

Note: <SP> <= <EP>

Response format from the module:

<STX><UID><UID><BB><LSB><MSB> . . . <ETX><LRC>

where:

<LSB><MSB> = are two bytes of data per variable configured in the block.

5.2.1 Example Command #2


In this example we are requesting data from block 2, which is the third block.
Request is: Node address 1; Command 2; Block number 2, starting at parameter
1 and ending with parameter 2.

Command format from host:

<EOT> <UID><UID> <CC><CC> <BB> <SP> <EP> <ETX> <LRC>


<04H> <30H><31H> <30H><32H> <32H> <01H> <02H> <03H> <31H>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 0010B <CC>
XOR 0011 0010B <BB>
XOR 0000 0001B <SP>
XOR 0000 0010B <EP>
XOR 0000 0011B <ETX>
XOR = 0011 0001H <LRC>

Response from the module:

Parameter 1 is 0037H and parameter 2 is 0042H.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 34 of 56


Host Communications Protocol
<STX> <UID><UID> <BB> <LSB><MSB> <LSB><MSB> <ETX> <LRC>
<02H> <30H><31H> <32H> <37H><00H> <42H><00H> <03H> <47H>

LRC = 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0011 0010B <BB>
XOR 0011 0111B <LSB>
XOR 0000 0000B <MSB>
XOR 0100 0010B <LSB>
XOR 0000 0000B <MSB>
XOR 0000 0011B <ETX>
XOR = 0100 0111B <LRC>

5.3 Command #3 Setpoint Change


This command is used to change MACO setpoints from the host computer on an
individual basis. This is not a block transfer.

Command format from host:

<EOT><UID><UID><CC><CC><AD><FN><TYU><TYL><LSB><MSB><ETX><LRC>

where:

<CC><CC> = <30H><33H> COMMAND #3

Response format from module:

<ACK> <0> if successful, or


<NAK><ERROR CODE> if not successful.

5.3.1 Example #1 Command #3


In this example we are changing the setpoint of temperature module 1, process
setpoint 1 zone 1 (1101H) to 100.

Command format from host:

<EOT> <UID><UID> <CC><CC> <AD> <FN> <TYU><TYL>


<04H> <30H><31H> <30H><33H> <11H> <02H> <11H><01H>

<LSB><MSB> <ETX> <LRC>


<64H><00H> <03H> <66H>

Response format from module, setpoint change accepted:

<ACK> <0>
<06H> <30H>

Response format from module, remote setpoint change CR not enabled.

<NAK><ETX>
<15H><03H>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 35 of 56


Host Communications Protocol
5.3.2 Example #2 Command #3
In this example we are changing the setpoint of temperature module 1, process
setpoint 1 zone 1 (1101H) to 4.

Command format from host:

<EOT> <UID><UID> <CC><CC> <AD> <FN> <TYU><TYL>


<04H> <30H><31H> <30H><33H> <11H> <02H> <11H><01H>

<LSB><EOT><MSB> <ETX> <LRC>


<04H><04H><00H> <03H> <05H>

Because the setpoint is equal to 4 (an EOT), two 4's are transmitted. Response
format from module, setpoint change accepted:

<ACK> <0>
<06H> <30H>

5.4 Command #6 Request Data Valid Status


This command requests the status of the DATA VALID control relay (CR 3765).
The control relay is set to "1" when the data in the buffer is valid; and set to "0" when
it is not valid.

Command format from the host computer:

<EOT><UID><UID><CC><CC><ETX><LRC>

Response from Module:

<STX><UID><UID><BYTE 1><BYTE 2><BYTE 3><ETX> <LRC>


if successful, else

<NAK><ERROR CODE> if not successful.

BYTE1 and BYTE 2 are dummy bytes and should be zero (0). Byte 3 contains all
of the module's MTS control relays (8).

bit 0 CR3761 Reserved


bit 1 CR3762 Reserved
bit 2 CR3763 Reserved
bit 3 CR3764 Reserved
bit 4 CR3765 0=Data not ready; 1=Data Valid
bit 5 CR3766 Reserved
bit 6 CR3767 Reserved
bit 7 CR3768 Reserved

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 36 of 56


Host Communications Protocol
5.4.1 Example Command #6
Request status of Data Valid CR 3765:

<EOT> <UID><UID> <CC><CC> <ETX> <LRC>


<04H> <30H><31H> <30H><36H> <03H> <08H>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 0110B <CC>
XOR 0000 0011B <ETX>
XOR = 0000 0100B <LRC>
= 0000 1000B <LRC>

Because the LRC is an EOT <04H>, change the LRC to a backspace (BS) <08H>.

Response from Module: If data valid not set.

<STX> <UID><UID> <BYTE 1> <BYTE 2> <BYTE 3>


<02H> <30H><31H> <00H> <00H> <00H>

<ETX> <LRC>
<03H> <0H>

The first two (2) data bytes are dummy bytes and will always be zero (0). Data valid
is bit 4 of the third data byte.

LRC = 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0000 0000B <BYTE 1>
XOR 0000 0000B <BYTE 2>
XOR 0000 0000B <BYTE 3>
XOR 0000 0011B <ETX>
XOR =0000 0000B <LRC>

Response from Module: If data valid is set.

<STX> <UID><UID> <BYTE 1> <BYTE 2> <BYTE 3>


<02H> <30H><31H> <00H> <00H> <10H>

<ETX> <LRC>
<03H> <10H>

The first two (2) data bytes are dummy bytes and will always be zero (0).

LRC = 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0000 0000B <BYTE 1>
XOR 0000 0000B <BYTE 2>
XOR 0001 0000B <BYTE 3>
XOR 0000 0011B <ETX>
XOR = 0001 0000B <LRC>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 37 of 56


Host Communications Protocol
5.5 Command #7 Clear DATA VALID
This command clears the Data Valid control relay status flag after the host has read
the last block of data.

Command format from the host computer:

<EOT><UID><UID><CC><CC><ETX><LRC>

Response from Module:

<ACK><30H> if successful, or
<NAK><ERROR CODE> if not successful.

5.5.1 Example Command 7

<EOT> <UID><UID> <CC><CC> <ETX> <LRC>


<04H> <30H><31H> <30H><37H> <03H> <05H>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 0111B <CC>
XOR 0000 0011B <ETX>
XOR = 0000 0101B <LRC>

Response from the module:

<ACK> <3>
<06H> <30H>

5.6 Command #8 Individual Setpoint/Value Request

This command requests an individual system setpoint or value.

Command format from the host computer:

<EOT><UID><UID><CC><CC><AD><FN><TYU><TYL> <ETX><LRC>

where: <CC><CC> = <30H><38H>

Response from the module:

<STX><UID><UID><LSB><MSB><ETX><LCR> if successful, or
<NAK><ERROR CODE> if not successful.

5.6.1 Example Command #8


Request timer setpoint 1 from module 1, rack 1.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <AD> <FN> <TYU><TYL>


<04H> <30H><31H> <30H><38H> <11H> <01H> <10H><00H>

<ETX> <LRC>
<03H> <0AH>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 38 of 56


Host Communications Protocol
LRC = 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 1000B <CC>
XOR 0001 0001B <AD>
XOR 0000 0001B <FN>
XOR 0001 0000B <TYU>
XOR 0000 0000B <TYL>
XOR 0000 0011B <ETX>
XOR = 0000 1010B <LRC>

Response from the module:

The value for the requested setpoint is 0190H, 400.

<STX> <UID><UID> <LSB><MSB> <ETX> <LRC>


<02H> <30H><31H> <90H><01H> <03H> <91H>

LRC = 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 1001 0000B <LSB>
XOR 0000 0001B <MSB>
XOR 0000 0011B <ETX>
XOR = 1001 0001B <LRC>

5.7 Command #9 Control Relay


This command reads the status of any control relay (CR) with a system address.
The following control relays may be read or written to:

Operator Control Relays, CR 1657 to 1752


Off = logic 0, On = logic 1 and Toggle = logic 2

Setup Control Relays, CR 1785 to 1848


Off = logic 0, On = logic 1 and Toggle = logic 2

Selector Switches , CR 1849 to 1912


Off = logic 0, Position 1 = logic 1, Position 2 = logic 2
Position 3 = logic 3, Position 4 = logic 4

Command format from the host computer:

<EOT><UID><UID><CC><CC><AD><FN><TYU><TYL> <ETX><LRC>

Response from Module:

<STX><UID><UID><BYTE 1><BYTE 2><ETX><LRC> if successful, or


<NAK><ERROR CODE> if not successful.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 39 of 56


Host Communications Protocol
5.7.1 Example Command #9
In this example of control relay access, we are requesting the status sequence
Input 1 of sequence module 1 in chassis 1.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <AD> <FN> <TYU><TYL>


<04H> <30H><31H> <30H><39H> <11H> <01H> <20H><00H>

<ETX> <LRC>
<03H> <3BH>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0000B <CC>
XOR 0011 1001B <CC>
XOR 0001 0001B <AD>
XOR 0000 0001B <FN>
XOR 0010 0000B <TYU>
XOR 0000 0000B <TYL>
XOR 0000 0011B <ETX>
XOR = 0011 1011B <LRC>

Response from Module:

<STX> <UID><UID> <BYTE 1><BYTE 2> <ETX> <LRC>


<02H> <30H><31H> <00H><00H> <03H> <00H>

LRC = 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0000 0000B <BYTE 1>
XOR 0000 0000B <BYTE 2>
XOR 0000 0011B <ETX>
XOR = 0000 0000B <LRC>

5.8 Command #10 Request ASCII String


This command is used to request ASCII Strings, System Messages and System
Commands. These strings are up to 29 characters in length.

Command format from the host computer:

<EOT><UID><UID><CC><CC><AD><FN><TYU><TYL> <ETX><LRC>

where: <CC> <CC> = <31>30>


<AD> = Function Address
<FN> = Function Number
<TYU> = Type, Upper (3xH or 4xH)
<TYL> = Type, Lower

If Type Upper = 4xH, the reply is a 29 character ASCII string. If the Type Upper =
3xH, the reply is a sytem message number followed by 27 ASCII spaces. The
system messa number is converted within the Barber-Colman RS-485 DDE
Server to return an ASCII string.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 40 of 56


Host Communications Protocol
Response from Module:

<STX><UID><UID><BYTE 1><BYTE 2> .... <BYTE X> <ETX><LRC>


if successful, or
<NAK><ERROR CODE> if not successful.

Note that if the ASCII string is less than 29 characters it will be padded with ASCII
spaces (20H).

5.8.1 Example Command #10 ASCII String Request (Type Upper = 4XH)

We are requesting the System Header File #3, System Modfile.

<EOT><30H><31H><31H><30H><11H><40H><45H><83H><ETX><94H>

LRC = XOR 0011 0000B


XOR 0011 0001B
XOR 0011 0001B
XOR 0011 0000B
XOR 0001 0001B
XOR 0100 0000B
XOR 0100 0101B
XOR 1000 0011B
XOR 0000 0011B (ETX)
XOR = 1001 0100B (LRC = 94H)

VALID REPLY:
The requested sac string reply is:

<STX><30H><31H><M><4><5><0><0>< ><S><T><A><N><D<A><R><D>
< ><S><Y><S><T><E><M>< >< >< ><V><3><.><0>< ><ETX><29H>

NOTE: < > is an ASCII space (20H)

The requested ASCII string is: M4500 STANDARD SYSTEM V3.0


LRC = 0000 0010B (STX)
XOR 0011 0000B (UID)
XOR 0011 0001B (UID)
XOR 0100 1101B (M)
XOR 0011 0100B (4)
XOR 0011 0101B (5)
XOR 0011 0000B (0)
XOR 0011 0000B (0)
XOR 0010 0000B (SPACE)
XOR 0101 0011B (S)
XOR 0101 0100B (T)
XOR 0100 0001B (A)
XOR 0100 1110B (N)
XOR 0100 0100B (D)
XOR 0100 0001B (A)
XOR 0101 0010B (R)
XOR 0100 0100B (D)
XOR 0010 0000B (SPACE)
XOR 0101 0011B (S)
XOR 0101 1001B (Y)
XOR 0101 0011B (S)
XOR 0101 0100B (T)

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 41 of 56


Host Communications Protocol
XOR 0100 0101B (E)
XOR 0100 1101B (M)
XOR 0010 0000B (SPACE)
XOR 0010 0000B (SPACE)
XOR 0010 0000B (SPACE)
XOR 0101 0110B (V)
XOR 0011 0011B (3)
XOR 0010 1110B (.)
XOR 0011 0000B (0)
XOR 0010 0000B (SPACE)
XOR 0000 0011B (ETX)
XOR = 0010 1001B (LRC = 29H)

5.8.2 Example Command #10 ASCII String Request (Type Upper = 3XH)

Request module displayable message for Module type 1 (module message


3400H)

<EOT><30H><31H><31H><30H><11H><40H><34H><00H><ETX><0BH>

We are requesting the System Header File #3, System Modfile.

LRC = XOR 0011 0000B <ADDRESS, MSB>


XOR 0011 0001B <ADDRESS, LSB>
XOR 0011 0001B <COMMAND, MSB>
XOR 0011 0000B <COMMAND, LSB>
XOR 0001 0001B <Function Address>
XOR 0100 0000B <Function number> ( 40H = Data Handler)
XOR 0011 0100B <Type Upper, 3XH = Message No. request)
XOR 0000 0000B <Type Lower, message
XOR 0000 0011B (ETX)
XOR = 0110 0110B (LRC = 66H)

VALID REPLY:

<STX><30H><31H><29H><02H><20H><20H><ETX><0BH>
NOTE: 27 bytes of ascii spaces (20H)

LRC = 0000 0010B (STX)


XOR 0011 0000B module address (MSB)
XOR 0011 0001B module address (LSB)
XOR 0010 1001B setpoint LSB
XOR 0000 0010B setpoint MSB
XOR 0010 00000 twenty seven bytes of (20H) XORd = 20H
XOR 0000 0011B (ETX)
XOR = 0000 1011B (LRC = 0BH)

The message number = (2 * 256) + 41 = 553

The corresponding message in the message table is msg 553 = TEMPERA-


TURE.

NOTE: IN SOME MESSAGE TABLES, THE FIRST MESSAGE IS LABELED


MESSAGE 1, THE FIRST MESSAGE IS ACTUALLY MESSAGE 0.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 42 of 56


Host Communications Protocol
5.9 Command #11 Change Control Relays
This command is used to change the state of Operator Control Relays (CR 1657
to 1752), Setup Control Relays (CR 1785 to 1848) and Selector Switches (CR
1849 to 1912) from the host computer.

Command format from the host computer:

<EOT><UID><UID><CC><CC><AD><FN><TYU><TYL><RCMD><ETX><LRC>

Where <CC><CC> = <31H><31H> (11)


<RCMD> = RELAY COMMAND

For operator control relays and setup control relays:

<RCMD> = 0 Turn OFF control relay


<RCMD> = 1 Turn ON control relay
<RCMD> = 2 Toggle control relay

For selector switch Control Relays:

<RCMD> = 0 OFF Position


<RCMD> = 1 Position1
<RCMD> = 2 Position2
<RCMD> = 3 Position3
<RCMD> = 4 Position4

Response from Module:

<ACK> < 0> no errors


<06H> <30H>

<NAK><ERROR CODE> if not successful

5.9.1 Example Command #11


This example changes Setup Control Relay #24 (CR 1808) to the ON state.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <AD> <FN> <TYU> <TYL>


<04H> <30H><31H> <31H><31H> <11H> <40H> <27H> <92H>

<RCMD> <ETX> <LRC>


<01H> <03H> <E7H>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0001B <CC>
XOR 0011 0001B <CC>
XOR 0001 0001B <AD>
XOR 0100 0000B <FN>
XOR 0010 0111B <TYU>
XOR 1001 0010B <TYL>
XOR 0000 0001B <RCMD>
XOR 0000 0011B <ETX>
XOR = 1110 0111B <LRC>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 43 of 56


Host Communications Protocol
Response from the module:

Valid Reply: Control Relay change accepted


<ACK> < 0>
<06H> <30H>

Error Reply: Remote Control Relay change CR not enabled


<NAK> <;>
<15H> <3BH>

5.10 Command #12 File Access Read File


This command is used to request a file from the MACO.

Command format from the host computer:


<EOT><UID><UID><CC><CC><AD><MF><Res><FT><BN_LSB><BN_MSB>
<SB><F Num><Res><Res><Res><ETX><LRC>

where:

<EOT> Start of transmission (04H)


<UID><UID> Node address of MACO controlled machine
<CC><CC> Command code
<AD> Function Address
<MF> Mode Function (File request for Data Handler = C0H)
<Res> Reserved byte (00H)
<FT> File type (for example 08H= Recipe file, see Table 1)
<BN_LSB> Block number, LSB
<BN_MSB> Block number, MSB
<SB> Sub-Block number (always 0)
<F Num> File number (for example, 01H=First recipe)
<Res> Reserved byte (00H)
<Res> Reserved byte (00H)
<Res> Reserved byte (00H)
<ETX> End of text (03H)
<LRC> Longitudinal redundancy check

Response from the module:


Each file block reply will be a 256 byte block consisting of a 16 byte header followed
by 240 bytes of data, an <ETX> and an <LRC> for a total of 258 bytes.

The first block of each file (Block 0) contains only 96 bytes of data and is padded
with nulls (00H) to make a full block of 256 bytes. The first 64 bytes are ASCII
characters and the next 32 bytes contain the file information, followed by 144 bytes
of nulls (00H), then ETX and the LRC.

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 44 of 56


Host Communications Protocol
File File File
Description Status
Type Extension Type

3 System Modfile Version File .SVO Read/Write Available

4 RLD File .MP Read/Write Available

5 System Screen Files .SSO Read/Write Not available

6 User Screen Files .USO Read/Write Not available

7 User Configuration File .UCO Read/Write Available

8 Recipe File .RCP Read/Write All except Recipe 0 available

9 User Math Function .UMO Read/Write Not available

10 SPC Label File .LAB Read/Write Not available

11 Time-slot Data File .MP Read/Write Available

12 User Modfile Version File .UVO Read/Write Available

14 Linegraph Descriptor File .LGD Read/Write Available

15 System Configuration File .OBJ Read/Write Available

16 Process/Parison Control Linegraph Data #1 .DAT Read Only Available

17 Process/Parison Control Linegraph Data #2 .DAT Read Only Available

18 Process/Parison Control Linegraph Data #3 .DAT Read Only Available

19 Process/Parison Control Linegraph Data #4 .DAT Read Only Available

20 Insta-Set File .INS Read/Write Not available - cannot access the active recipe

21 SPC Linegraph Data, X-Bar .XBR Read Only Available

22 SPC Linegraph Data, Range .RAN Read Only Available

24 Parison SP Profile #1 .PRO Read/Write Available

25 Parison SP Profile #2 .PRO Read/Write Available

26 Parison SP Profile #3 .PRO Read/Write Available

27 Parison SP Profile #4 .PRO Read/Write Available

28 SPC Tabular Data #1 .SPC Read Only Available

29 SPC Tabular Data #2 .SPC Read Only Available

30 SPC Tabular Data #3 .SPC Read Only Available

31 SPC Tabular Data #4 .SPC Read Only Available

32 SPC Tabular Data #5 .SPC Read Only Available

33 SPC Tabular Data #6 .SPC Read Only Available

34 SPC Tabular Data #7 .SPC Read Only Available

35 SPC Tabular Data #8 .SPC Read Only Available

36 SPC Tabular Data #9 .SPC Read Only Available

37 SPC Tabular Data #10 .SPC Read Only Available

Table 1. File Types

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 45 of 56


Host Communications Protocol
5.10.1 Example Command #12
This example requests the first block (block 0) of recipe 1.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <AD> <MF> <Res> <FT>


<04H> <30H><31H> <31H><32H> <11H> <C0H> <00H> <08H>

<BN_LSB> <BN_MSB> <SB> <F Num> <Res> <Res>


<00H> <00H> <00H> <01H> <00H> <00H>

<Res> <ETX> <LRC>


<00H> <03H> <D9H>

LRC = 0011 0000B <UID>


XOR 0011 0001B <UID>
XOR 0011 0001B <CC>
XOR 0011 0010B <CC>
XOR 0001 0001B <AD>
XOR 1100 0000B <MF>
XOR 0000 0000B <Res>
XOR 0000 1000B <FT>
XOR 0000 0000B <BN_LSB>
XOR 0000 0000B <BN_MSB>
XOR 0000 0000B <SB>
XOR 0000 0001B <F Num>
XOR 0000 0000B <Res>
XOR 0000 0000B <Res>
XOR 0000 0000B <Res>
XOR 0000 0011B <ETX>
XOR = 1101 1001B <LRC>

Response from the module:


Each file block reply will be a 256 byte block consisting of a 16 byte header followed
by 240 bytes of data, an <ETX> and an <LRC> for a total of 258 bytes.

The first block of each file (Block 0) contains only 96 bytes of data and is padded
with nulls (00H) to make a full block of 256 bytes. The first 64 bytes are ASCII
characters and the next 32 bytes contain the file information.

The request internal recipe file #1 reply for block 0 is:


<STX> <30H> <31H> <00H> <00H> <11H> <C0H> <00H> <08H> <00H> <00H>
<00H> <01H> <00H> <00H> <00H>

followed by a 64 byte ASCII file header:


<R> <E> <C> <I> <P > <E> < > <#> <2> < > < < > <=> <=> <=> <=> <=> <=> <=>
<=> <=> <=> <=> <=> <=> <=> <=> <=> <=> < > > < > < > < > < > <5> < > < > <0>
<5> </> <2> <9> </> <9> <6> < > < > <2> <0> <:> <1> <4> <:> <1> <8> < > < >
< > < > < > < > < > < > < > <1AH>

followed by 32 bytes of data:


<9BH> <53H> <40H> <03H> <00H> <00H> <AEH> <00H> <08H> <00H> <00H>
<00H> <00H> <00H> <00H> ..... <00H>

where:

<9BH> <53H> = File checksum (LSB)(MSB)

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 46 of 56


Host Communications Protocol
<40H> <03H> <00H> <00H> = File size (LSB) ... (MSB)
<AEH> <00H> = Number of setpoints
<08H> = File type

followed by 144 bytes of nulls (00H), then ETX and the LRC. For this example the
LRC = D3H. Note that < > is an ASCII space (20H).

LRC= 0000 0010B <STX>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0101 0010B <R>
XOR 0100 0101B <E>
XOR 0100 0011B <C>
XOR 0100 1001B <I>
XOR 0101 0000B <P>
XOR 0100 0101B <E>
XOR 0010 0000B <>
XOR 0010 0011B <#>
XOR 0011 0010B <2>
XOR 0010 0000B <>
XOR 0011 1100B << >
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0101B <5>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0000B <0>
XOR 0011 0101B <5>
XOR 0010 1111B </>
XOR 0011 0010B <2>
XOR 0011 1001B <9>
XOR 0010 1111B </>
XOR 0011 1001B <9>
XOR 0011 0110B <6>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0010B <2>
XOR 0011 0000B <0>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 47 of 56


Host Communications Protocol
XOR 0011 1010B <:>
XOR 0011 0001B <1>
XOR 0011 0100B <4>
XOR 0011 1010B <:>
XOR 0011 0001B <1>
XOR 0011 1000B <8>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0001 1010B (1AH)
XOR 1001 1011B (9BH) <data >
XOR 0101 0011B (53H) <data >
XOR 0100 0000B (40H) <data >
XOR 0000 0011B (03H) <data >
XOR 0000 0000B (00H) <data >
XOR 0000 0000B (00H) <data >
XOR 1010 1110B (AEH) <data >
XOR 0000 0000B (00H) <data >
XOR 0000 1000B (08H) <data >
XOR 0000 0000B (00H)
.
XOR 0000 0000B (00H)
XOR 0000 0011B <ETX>
XOR = 1101 0011B (D3H) <LRC>

5.11 Command #13 File Access Write File


The purpose of this command is to write a file to the MACO.

Command format from the host computer:


<EOT><UID><UID><CC><CC><AD><MF><Res><FT><BN_LSB><BN_MSB>
<SB><F Num><Res><Res><Res><240 bytes of file data<ETX><LRC>

where:

<EOT> Start of transmission (04H)


<UID><UID> Node address of MACO controlled machine
<CC><CC> Command code
<AD> Function Address
<MF> Mode Function (File request for Data Handler = C0H)
<Res> Reserved byte (00H)
<FT> File type (for example 08H= Recipe file, see Table 1)
<BN_LSB> Block number, LSB
<BN_MSB> Block number, MSB
<SB> Sub-Block number (always 0)
<F Num> File number (for example, 01H=First recipe)
<Res> Reserved byte (00H)
<Res> Reserved byte (00H)
<Res> Reserved byte (00H)
240 bytes of Data
<ETX> End of text (03H)
<LRC> Longitudinal redundancy check

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 48 of 56


Host Communications Protocol
Response from the module:
<ACK><0> if successful, or
<NAK><Error Code> if not successful

5.11.1 Example Command #13


This example sends the first block (block 0) of recipe 1.

Command format from the host computer:

<EOT> <UID><UID> <CC><CC> <AD> <MF> <Res> <FT>


<04H> <30H><31H> <31H><33H> <11H> <C0H> <00H> <08H>

<BN_LSB> <BN_MSB> <SB> <F Num> <Res> <Res>


<00H> <00H> <00H> <01H> <00H> <00H>

<Res> <240 bytes of data> <ETX> <LRC>


<00H> <03H> <xxH>

Each file block will be a 256 byte block consisting of a 16 byte header followed by
240 bytes of data, an <ETX> and an <LRC> for a total of 258 bytes.

The first block of each file (Block 0) contains only 96 bytes of data and is padded
with nulls (00H) to make a full block of 256 bytes. The first 64 bytes are ASCII
characters and the next 32 bytes contain the file information.

The write recipe file #1 for block 0 is:


<EOT> <30H> <31H> <31H> <33H> <11H> <C0H> <00H> <08H> <00H> <00H>
<00H> <01H> <00H> <00H> <00H>

followed by a 64 byte ASCII file header:


<R> <E> <C> <I> <P > <E> < > <#> <2> < > < < > <=> <=> <=> <=> <=> <=> <=>
<=> <=> <=> <=> <=> <=> <=> <=> <=> <=> < > > < > < > < > < > <5> < > < > <0>
<5> </> <2> <9> </> <9> <6> < > < > <2> <0> <:> <1> <4> <:> <1> <8> < > < >
< > < > < > < > < > < > < > <1AH>

followed by 32 bytes of data:


<9BH> <53H> <40H> <03H> <00H> <00H> <AEH> <00H> <08H> <00H> <00H>
<00H> <00H> <00H> <00H> ..... <00H>

followed by 144 bytes of nulls (00H), then ETX and the LRC. For this example the
LRC = D2H. Note that < > is an ASCII space (20H).

LRC= 0000 0010B <EOT>


XOR 0011 0000B <UID>
XOR 0011 0001B <UID>
XOR 0011 0001B <CC>
XOR 0011 0011B <CC>
XOR 0001 0001B <AD>
XOR 1100 0000B <MF>
XOR 0000 0000B <Res>
XOR 0000 1000B <FT>
XOR 0000 0000B <BN_LSB>
XOR 0000 0000B <BN_MSB>
XOR 0000 0000B <SB>
XOR 0000 0001B <F Num>
XOR 0000 0000B <Res>
XOR 0000 0000B <Res>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 49 of 56


Host Communications Protocol
XOR 0000 0000B <Res>
XOR 0101 0010B <R>
XOR 0100 0101B <E>
XOR 0100 0011B <C>
XOR 0100 1001B <I>
XOR 0101 0000B <P>
XOR 0100 0101B <E>
XOR 0010 0000B <>
XOR 0010 0011B <#>
XOR 0011 0010B <2>
XOR 0010 0000B <>
XOR 0011 1100B << >
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0011 1101B <=>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0101B <5>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0000B <0>
XOR 0011 0101B <5>
XOR 0010 1111B </>
XOR 0011 0010B <2>
XOR 0011 1001B <9>
XOR 0010 1111B </>
XOR 0011 1001B <9>
XOR 0011 0110B <6>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0011 0010B <2>
XOR 0011 0000B <0>
XOR 0011 1010B <:>
XOR 0011 0001B <1>
XOR 0011 0100B <4>
XOR 0011 1010B <:>
XOR 0011 0001B <1>
XOR 0011 1000B <8>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 50 of 56


Host Communications Protocol
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0010 0000B <>
XOR 0001 1010B (1AH)
XOR 1001 1011B (9BH) <data >
XOR 0101 0011B (53H) <data >
XOR 0100 0000B (40H) <data >
XOR 0000 0011B (03H) <data >
XOR 0000 0000B (00H) <data >
XOR 0000 0000B (00H) <data >
XOR 1010 1110B (AEH) <data >
XOR 0000 0000B (00H) <data >
XOR 0000 1000B (08H) <data >
XOR 0000 0000B (00H)
.
XOR 0000 0000B (00H)
XOR 0000 0011B <ETX>
XOR = 1101 0010B (D2H) <LRC>

5.12 Command #14 Request Host Monitor Error Table


The purpose of this command is to request the host monitor error table.

Command format from the host computer:


<EOT><UID><UID><CC><CC><ETX><LRC>

where:

<EOT> Start of transmission (04H)


<UID><UID> Node address of MACO controlled machine
<CC><CC> Command code
<ETX> End of text (03H)
<LRC> Longitudinal redundancy check

Response from the module:


<STX><UID><UID><128 bytes of daata><ETX><LRC> if successful, or
<NAK><Error code> if not successful.

5.12.1 Example Command #14


This is an example of a request host monitor error table.

Command format from the host computer:


<EOT><UID><UID><CC><CC><ETX><LRC>
<04H><30H><31H><31H><34H><03H><03H>

Response from the module:

<STX><UID><UID><128 bytes of data><ETX><LRC>

Data format:
Each error consists of 8 bytes:
<Block number byte><Parameter number byte>< ID (4 bytes)>
<Error code (2 bytes)>

The Block number is the number of the block (0-9, downloaded from the host) that

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 51 of 56


Host Communications Protocol
holds the parameter that generated the error. The Parameter number is the
number of the parameter (0-59, within the block). The ID is the parameter ID
(consisting of AD, FN, TYU and TYL). The last 2 bytes contain the error code (from
Sections 4.7 and 4.7.1 of this manual).

5.13 Command #15 Data Handler Host Command


The purpose of this command is to send a system command to the Data Handler.

Command format from the host computer:


<EOT><UID><UID><CC><CC><CMD><ETX><LRC>

where:

<EOT> Start of transmission (04H)


<UID><UID> Node address of MACO controlled machine
<CC><CC> Command code
<CMD> Data Handler command (see Table 2)
<ETX> End of text (03H)
<LRC> Longitudinal redundancy check

Response from the module:


<ACK><0> if successful, or
<NAK><Error Code> if not successful.

5.13.1 Example Command #16


This is an example of a "copy recipe" data handler host command.

Command format from the host computer:


<EOT><UID><UID><CC><CC><CMD<ETX><LRC>
<04H><30H><31H><31H><35H><17H<03H><15H>

Response from the module:


<ACK><0>

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 52 of 56


Host Communications Protocol
Command Function Status

00H Enable Outputs

01H Disable Outputs

02H Reset

05H Clear Error Code

0BH Save Setpoints/CRs

0EH Save MACO Hardware setup

11H Stop Timeslot

15H Recipe, Accept Changes

16H Recipe, Reject Changes

17H Recipe, Copy Tested with NT

18H Recipe, Delete Tested with NT

19H Recipe, Scroll Character Up

1AH Recipe, Increment Character

1BH Recipe, Move Left

1CH Recipe, Move Right

1DH Recipe, Decrement Character

1EH Recipe, Scroll Character Down

1FH Recipe, Display Next Group, Internal

20H Recipe, display Previous Group, Internal

24H Insta-Set Write

25H Insta-Set Read

27H Recipe, Clear Editable Title

28H Restore Setpoints

29H Fix Setpoint Limit Errors

2AH Scroll SPC Tabular Data Up

2BH Scroll SPC Tabular Data Down

2DH Send Form Feed to Printer

35H Math Trace Buffer - Previous Function

36H Math Trace Buffer - Next Function

37H Math Trace Buffer - Decrement 1

38H Math Trace Buffer - Increment 1

39H Math Trace Buffer - Clear Data

Table 2. Host System Commands

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 53 of 56


Host Communications Protocol

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 54 of 56


Host Communications Protocol

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 55 of 56


Host Communications Protocol
ASCII HEX DEC ASCII HEX DEC ASCII HEX DEC ASCII HEX DEC
NUL 00 00 SP 20 32 @ 40 64 ` 60 96
SOH 01 01 ! 21 33 A 41 65 a 61 97
STX 02 02 " 22 34 B 42 66 b 62 98
ETX 03 03 # 23 35 C 43 67 c 63 99
EOT 04 04 $ 24 36 D 44 68 d 64 100
ENQ 05 05 % 25 37 E 45 69 e 65 101
ACK 06 06 & 26 38 F 46 70 f 66 102
BEL 07 07 ' 27 39 G 47 71 g 67 103
BS 08 08 ( 28 40 H 48 72 h 68 104
HT 09 09 ) 29 41 I 49 73 i 69 105
LF 0A 10 * 2A 42 J 4A 74 j 6A 106
VT 0B 11 + 2B 43 K 4B 75 k 6B 107
FF 0C 12 2C 44 L 4C 76 l 6C 108
CR 0D 13 - 2D 45 M 4D 77 m 6D 109
SO 0E 14 . 2E 46 N 4E 78 n 6E 110
SI 0F 15 / 2F 47 O 4F 79 o 6F 111
DLE 10 16 0 30 48 P 50 80 p 70 112
DC1 11 17 1 31 49 Q 51 81 q 71 113
DC2 12 18 2 32 50 R 52 82 r 72 114
DC3 13 19 3 33 51 S 53 83 s 73 115
DC4 14 20 4 34 52 T 54 84 t 74 116
NAK 15 21 5 35 53 U 55 85 u 75 117
SYN 16 22 6 36 54 V 56 86 v 76 118
ETB 17 23 7 37 55 W 57 87 w 77 119
CAN 18 24 8 38 56 X 58 88 x 78 120
EM 19 25 9 39 57 Y 59 89 y 79 121
SUB 1A 26 : 3A 58 Z 5A 90 z 7A 122
ESC 1B 27 ; 3B 59 [ 5B 91 { 7B 123
FS 1C 28 < 3C 60 \ 5C 92 | 7C 124
GS 1D 29 = 3D 61 ] 5D 93 } 7D 125
RS 1E 30 > 3E 62 ^ 5E 94 ~ 7E 126
US 1F 31 ? 3F _ 5F 95 DEL 7F 127

Table 3. ASCII to Hex to Decimal Conversions

Barber-Colman Company 1354 Clifford Avenue


P.O. Box 2940
Phone: 1-815-637-3222
FAX: (815) 637-5341
Industrial Instruments Division Loves Park, IL U.S.A. 61132-2940 http://www.barber-colman.com
Copyright 1999 Barber-Colman Company. March 1999

1640-IN-025-A-05 Barber-Colman Company, Loves Park, IL Page 56 of 56

Вам также может понравиться