Table of Contents:
Product Overview
External / Internal Gateway Specifications
Operation – MLAN Gateway
Power Requirements – External Units Only
LED Operation
Installation – Default IP Address
Ethernet Connector
Programming Overview
Introduction
Programming Considerations
MLAN Command History
Modbus TCP/IP Communication for WSB
General Information
Error Code Explanations
Additions to the MLAN Command Descriptions for use with Modbus TCP/IP
Modbus TCP/IP Command Example
Modbus TCP/IP Reference Numbers for Blender Parameters
Data Commands
Clear Totals
Clear Totals Immediately
Get All Parameters
Get Batch Info
Get Cycle Weight and Time
Get Display
Get Parameter
Get Settings
Get Status
Get Steady State Rate
Get Target Throughput & Status
Get Totals
Get Type
Get Version
Get Weight Units
Send Keystroke
Send Settings
Set Batch Weight
Set Date And Time
Set Steady State Rate
Set Tag
Set Target Throughput
Set Weight Units
Silence Alarm
Start/Stop/Status
Stop Cycle / Stop Retry
Parameter Table for 12 Component Blender Software (Sample as of version 01003T)
Trademark Credits
Microsoft and MS-DOS are trademarks of Microsoft Corporation. IBM is a trademark of International Business Machine Corporation.
Ethernet is a trademark of Xerox Corporation.
Product Overview
The MLAN Gateway has been designed to connect to a 10BaseT Ethernet network. Connecting to a company or factory network utilising other Ethernet wirings standards (e.g. 10Base2, 10Base5, 100BaseT etc.) can be achieved by the use of hubs.
External / Internal Gateway Specifications
General
/ External Size / H90 x W105 x D60mmMounting / Direct onto 35mm DIN rail
Network Interface / 10BaseT Ethernet
Host Interface / MLAN
Operating Temperature / 0-55 C
Operating Humidity / 30-90% non-condensing
Power Requirements / Supply Voltage / 5 – 24Volts dc
Maximum Power / 2 Watts
Operation – MLAN Gateway
Power Requirements – External Units Only
The External MLAN Gateway unit requires 5 to 24 Volts DC to be connected via the 3-way plug in connector.
LED Operation
The 2 (yellow & green) front LEDs represents the Ethernet network status and have the following meaning.
Ethernet State: / LED Colour:Network Traffic / Yellow
Ethernet Link Active (i.e. connected) / Green
The 2 (yellow & green) LEDs within the gateway represent the Comms status between the MLAN unit and Ethernet gateway and have the following meaning.
MLAN Comms State: / LED Colour:Data Traffic from Ethernet gateway to MLAN / Yellow
Data Traffic from MLAN to Ethernet gateway / Green
Installation – Default IP Address
The Gateway is shipped with a default IP address and subnet mask. Use of a node-commissioning software tool provided with the Gateway allows the user to set the IP address and subnet mask to the required values for the network. This configuration information is stored in non-volatile memory on the Gateway.
Ethernet Connector
The Ethernet connector on the Gateway is located on the left hand side of the unit in the form of a standard 8-Way RJ45 connector. This connector contains the transformer isolation and filtering compliant with the Ethernet 10BaseT specification.
When utilizing the Internal MLAN Gateway Card this replaces the standard RS232 Serial Port.
Programming Overview
Introduction
This manual is intended to provide information for individuals who are writing software for Programmable Logic Controllers (PLCs) and need to communicate with the Maguire Weigh Scale Blender.
For a complete understanding of the operation of the Weigh Scale Blender (WSB), it is recommended that you have the four and / or twelve component controller manual(s) available as a reference.
Likewise if you require additional information on the Maguire Blender MLAN Communication Protocol then please refer to the MLAN Protocol manual.
Both of these manuals are available to download from the Maguire website at alongside other useful documents and product information.
All numbers in this document are assumed to be decimal (base 10) unless otherwise noted.
Programming Considerations
The software type within the blender controller must be determined before commencing programming. There are 2 options for the type of software, either 4 software or 12 software.
There are three ways to determine the controller’s software type:
- The simplest and quickest method is to turn the blender controller off and on again. You will either see “TWELVE” or “FOUR”.
If the controller is very old, look at the number that appears on the display during power up. This number will have a “T” on the end of it if it is twelve component software. If there is some other letter present, the controller has four component software.
- Use the command “Get Settings from Weigh Scale” command code 20
- Use the command “Get Weigh Scale Type” command code 49
Messages and responses are different according to which type of software is used. For example, the “Send Settings to the Weigh Scale” command (command code 19) has different formats for each software type.
Finally, the blender series must be known. Blender load cells read in either tenths of grams or whole grams. These are as follows:
- Load Cells for the Micro blender, 100 and 200 series of blenders read in tenths of grams.
- Load Cells for the 400, 900, and 1800 series of blenders read in whole grams.
For example, a response of 234 from a 100 or 200 series blender indicates that 23.4 grams of material have been processed. A response of 234 from a 400, 900, or 1800 series blender indicates that 234 grams of material have been processed.
Summary of all MLAN commands
MLAN Command / Code / DescriptionClear Totals / 24 / Resets all materials totals to zero at the end of the next blender cycle.
Clear Totals Immediately / 28 / Resets all materials totals to zero immediately.
Get Address / 54 / Returns Controller Address
*** Not supported by the MLAN Gateway Adapter ***
Get All Parameters / 22 / Returns all of the parameters and their values
*** Not supported by the MLAN Gateway Adapter ***
Get Batch Info / 84 / Returns the batch weight, current portion of the batch, accumulated total and batch count number.
(See WSB Manual for more information on how the WSB operates)
Get Cycle Weight & Time / 50 / Returns the size of the last batch / cycle and the duration of time between the last two cycles.
Get Display / 56 / Returns the current display buffer.
Get Parameter / 69 / Returns the value of a specific parameter.
Get Settings / 20 / Returns the mix percentages and component types along with the recipe, work order and operator number.
Get Status / 53 / Returns the current state of all signal inputs and outputs.
Get Steady State Rate / 64 / Returns the steady state throughput rate of the blender.
Get Target Throughput & Status / 29 / Returns the current target throughput and the extrusion control status.
Get Totals / 16 / Returns the current totals and resets the internal flag
Get Totals / 17 / Returns the current totals without resetting the internal flag
Get Type / 49 / Returns the controller software type (4 or 12) and load cell type (tenths of grams or full grams)
Get Version / 80 / Returns the version of software in the controller.
Get Weigh Units / 85 / Returns the units that the blender is using to display totals – Pounds, Kilograms, Ounces or Grams
Send Keystroke / 87 / Sends a virtual keystroke to the keypad on the controller – see Set Remote Keypad
Send Settings / 19 / Sets the mix percentages and material types – also sets work order and operator numbers.
Set Batch Weight / 83 / Sets the size of a single batch in blender in grams.
Set Date & Time / 81 / Sets the Date and Time of a blender.
Set Parameter / 68 / Sets the value of a specific parameter.
Set Remote Keypad / 88 / Enable / Disable Controller Keypad and or the “Send Keystroke” command
Set Steady Rate / 65 / Sets the steady state throughput rate of the blender – this tells the blender the rate to report back for the “Get Steady State Rate” command
Set Tag / 90 / Sets either recipe, operator or work order number on the controller.
Set Target Throughput / 30 / Sets the target throughput rate for extrusion control mode.
Set Weight Units / 86 / Sets the weight unit used by the blender to display totals such as pounds or kilos.
Silence Alarm / 82 / Silences the alarm for a specific blender
Start / Stop / Status / 55 / Instructs the blender to stop at the end of the current cycle, start up, or return current operating status.
Stop Cycle / Stop Retry / 27 / Instructs the blender to abort current cycle or current material dispense.
Aborting current cycle cause blender to start a new cycle.
Aborting current dispense causes the blender to start dispensing the next material in its current settings.
MLAN Command History
The following table documents when commands have been added to the MLAN software. The chip version number can be found on the MLAN chip within the controller.
In most cases with the introduction of new commands to the software in MLAN chips, 12 software chips were either first to be updated or both the 12 software and the 4 software chips were updated at the same time.
Not all chips are listed below. What are listed are chips that marked a change in the software and were available for testing. If your chip is not listed, it may indicate that your chip did not mark a change in the software or possibly it was not available for testing when this information was compiled.
Chips versions numbers indicate a date. For instance chip "60603A" means 1996 (6), June (06), 3rd (03) followed by "T" or “TC” for twelve software or "A" or “WS” for four software. Your chip version number may fall somewhere in between the chips listed below if it is not directly listed.
Other Notes:
- Controllers using chips prior to 60603A (06/03/1996) have an earlier circuit board, which would need replacement if the chip is to be updated.
- Chips after 90317A (03/17/1999) will have all parameters available.
- Chips prior to 90317A (03/17/1999), please see chart on the following page.
MLAN Command / Chip Version Printed on Chip / MLAN Command / Chip Version
Printed on Chip
Get Version / 60603A / Get Weight Units / 60710T
Clear Totals / 20414A / Set Remote Keypad / 60911T
Clear Totals Immediately / 80609A / Send Keystroke / 60911T
Get Address / 50925A / Send Settings / 20414T
Get All Parameters / 60809A / Set Batch Weight / 60603A
Get Batch Info / 60603A / Set Date & Time / 60603A
Get Cycle, Weight & Time / 30913A / Set Parameter / 70529A
Get Display / 50925A / Set Steady State Rate / 70916T
Get Parameter / 70205T / Set Tag / 60710T
Get Settings / 20414A / Set Target Throughput / 90317A
Get Status / 41019A / Set Weight Units / 60710T
Get Steady State Rate / 60603A / Silence Alarm / 60603A
Get Target Throughput Status / 90317A / Start / Stop / Status / 60603A
Get Totals / 20414A / Stop Cycle / Stop Retry / 71222T
Get Type / 20414A / XT Parameters / 60603A
PLEASE NOTE:
Depending on the date of the chip in your controller, all commands may not be available. The chips can be upgraded, so if you need a newer chip, please contact your nearest Maguire reseller.
Modbus TCP/IP Communication for WSB
General Information
The Modbus TCP/IP command protocol data format used has been designed to be as consistent as possible with the MLAN command set. A full description of the Modbus TCP/IP specification can be found at
The Modbus registers are Word (two-byte) values. Values shown are decimal (base 10) values.
Command Format (Write)
Output Byte / Modbus TCP/IP Description / Name / Range / MLAN Description0 / Transaction ID / Usually 0
1 / Transaction ID / Usually 0
2 / Protocol ID / Usually 0
3 / Protocol ID / Usually 0
4 / Total Data Length / 0
5 / Total Data Length / 7 to 255
6 / Slave Address / MLAN Address
7 / Function Code / 15 or 16
8 / Register Hi / Command Code / 24 / MLAN Command
9 / Register Lo / 0
10 / Register Count Hi / 0
11 / Register Count Lo / 0 to N
12 / Data Byte Count / 0 to (N+1)*2
13 / Data Word 0 Hi
14 / Data Word 0 Lo
. / .
. / .
X / Data Word N Hi
X+1 / Data Word N Lo
Response Format (Write)
Input Byte / Modbus Description / Name / Range / Description
0 / Transaction ID / Usually 0
1 / Transaction ID / Usually 0
2 / Protocol ID / Usually 0
3 / Protocol ID / Usually 0
4 / Total Data Length / 0
5 / Total Data Length / 2
6 / Slave Address / MLAN Address
7 / Function Code / 15 or 16 / Top bit set on error
Command Format (Read)
Output Byte / Modbus Description / Name / Range / MLAN Description
0 / Transaction ID / Usually 0
1 / Transaction ID / Usually 0
2 / Protocol ID / Usually 0
3 / Protocol ID / Usually 0
4 / Total Data Length / 0
5 / Total Data Length / 6
6 / Slave Address / MLAN Address
7 / Function Code / 3 or 4
8 / Register Hi / Command Code / 84 / Get Batch Information Command
9 / Register Lo / 0
10 / Point Count Hi / 0
11 / Point Count Lo / N
Response Format (Read)
Input Byte / Modbus Description / Name / Range / Description
0 / Transaction ID / Usually 0
1 / Transaction ID / Usually 0
2 / Protocol ID / Usually 0
3 / Protocol ID / Usually 0
4 / Total Data Length / 0
5 / Total Data Length / 3 to 255
6 / Slave Address / MLAN Address
7 / Function Code / 3 or 4 / Top bit set on error
8 / Byte Count / 0 to (N+1)*2
9 / Data Word 0 Hi
10 / Data Word 0 Lo
. / .
. / .
X / Data Word N Hi
X+1 / Data Word N Lo
The Modbus register fields are used to hold the command codes and are the same as those used for the MLAN communication. The number denoting each command is shown in table 3.
Note: One potential source of confusion is the relationship between the reference numbers used in MODBUS functions, and the ‘register numbers’ used in Modicon PLC’s. For historical reasons, user reference numbers were expressed as decimal numbers with a starting offset of 1. However MODBUS uses the more natural software interpretation of an unsigned integer index starting at zero.
So a modbus message requesting the read of a register at offset 0 would return the value known to the application programmer as found in register 4:00001 (memory type 4 = output register, reference 00001)
The checksum specified in the MLAN protocol is NOT used in the Modbus TCP/IP communication. Error checking is taken care of automatically by the Modbus TCP/IP software as each Ethernet frame contains it's own CRC.
When the blender controller has executed the command, the Modbus function code is echoed in the reply Modbus TCP/IP data packet. If an error is encountered the top bit of the reply function code will be set and will be followed by a single byte indicating the reason for the error.
Response Format with Error (Write/Read)Input Byte / Modbus Description / Name / Range / Description
0 / Transaction ID / Usually 0
1 / Transaction ID / Usually 0
2 / Protocol ID / Usually 0
3 / Protocol ID / Usually 0
4 / Total Data Length / 0
5 / Total Data Length / 3
6 / Slave Address / MLAN Address
7 / Function Code / 131, 132, 143 or 144
8 / Error Code / Reason for failure
Error Code Explanations
The Modbus TCP/IP Error Code byte can take the following values:
07Communication error (NAK negative-acknowledge).
01 This means that the command is not supported.
06 Communication Error (Time-out).
03 Invalid parameter passed in the command.
Additions to the MLAN Command Descriptions for use with Modbus TCP/IP
The “Set-Parameter” (68) and “Get-Parameter” (69) commands use an integer value to identify the particular parameter requested.
Table 4 shows how this number relates to the three-letter parameter abbreviation. “Four-component” software and the “Twelve-component” software options are shown. For the parameters 50 upwards, a second variable is required. This specifies the component number. The number is 1 to 12 for the “Twelve” software. For the “Four” software:
1 = Regrind 2 = Natural 3 = Colour 4 = Additive
Modbus TCP/IP Command Example
The example below illustrates the “Get-Parameter _LA (Lag Time) for component 3” command over Modbus TCP/IP on MLAN address 1. The Purpose of this would be to retrieve the setting for the Lag Time (LA parameter) for hopper / component number 3 on a blender:
Example Get Parameter Command _LA component 3Output Byte / Modbus Description / Name / Range / MLAN Description
0 / Transaction ID / 0
1 / Transaction ID / 0
2 / Protocol ID / 0
3 / Protocol ID / 0
4 / Total Data Length / 0
5 / Total Data Length / 6
6 / Slave Address / 1 / MLAN Address = 1
7 / Function Code / 3 or 4
8 / Register Hi / Command Code / 69 / MLAN Command Code Get Parameter
9 / Register Lo / 75 / Reference number for the LA Parameter +
Hopper / Component number 3
10 / Point Count Hi / 0
11 / Point Count Lo / 1
Table 2: Input Data: Reply to Command
Input Byte / Modbus Description / Name / Range / Description
0 / Transaction ID / 0
1 / Transaction ID / 0
2 / Protocol ID / 0
3 / Protocol ID / 0
4 / Total Data Length / 0
5 / Total Data Length / 5
6 / Slave Address / 1 / MLAN Address
7 / Function Code / 3 or 4 / Top bit set on error
8 / Byte Count / 2
9 / Data Word 0 Hi / 0
10 / Data Word 0 Lo / 20 / _AL value
Please refer to Table 4 on the next page to see the Modbus TCP/IP reference number for other MLAN parameters.
Modbus TCP/IP Reference Numbers for Blender Parameters
(Reference Table 4)
Modbus Register Reference #(Lo Byte) / 4 Software Parameters / 12 Software Parameters / Modbus Register Reference #
(Lo Byte) / 4 Software Parameters / 4 Software Component # / 12 Software Parameters / 12 Software Component #
1 / FLG / FLG / 50 to 61 / _TY / 1 TO 12
2 / MIX / MIX / 62 to 73 / _CS / 1 TO 12
3 / FCV / FCV / 74 to 85 / RAL / 1 / _AL / 1 TO 12
4 / DTI / DTI / NAL / 2
5 / KDF / KDF / CAL / 3
6 / WDF / WDF / AAL / 4
7 / BER / BER / 86 to 97 / CXT / 3 / _XT / 1 TO 12
8 / ROC / ROC / AXT / 4
9 / ROV / ROV / 98 to 109 / RSE / 1 / _SE / 1 TO 12
10 / RHL / RHL / CSE / 3
11 / FUL / FUL / ASE / 4
12 / MAX / MAX / 110 to 121 / RWT / 1 / _WT / 1 TO 12
13 / TH / TH / NWT / 2
14 / TL / TL / CWT / 3
15 / PRT / PRT / AWT / 4
16 / RLO / 122 to 133 / RTI / 1 / _TI / 1 TO 12
17 / DLY / DLY / NTI / 2
18 / LT1 / CTI / 3
19 / LT2 / ATI / 4
20 / PRC / PRC / 134 to 145 / RMI / 1 / _MI / 1 TO 12
21 / STL / STL / NMI / 2
22 / LCL / LCL / CMI / 3
23 / LCH / LCH / AMI / 4
24 / LCF / LCF / 146 to 157 / RNC / 1 / _NC / 1 TO 12
25 / LCZ / LCZ / NNC / 2
26 / DS1 / CNC / 3
27 / DS2 / ANC / 4
28 / SCR / SCR / 158 to 169 / RPT / 1 / _PT / 1 TO 12
28 / BCR / BCR / NPT / 2
30 / XCV / XCV / CPT / 3
31 / XRC / XRC / APT / 4
32 / TCV / TCV / 170 to 181 / RRP / 1 / _RP / 1 TO 12
33 / TRC / TRC / NRP / 2
34 / XTP / XTP / CRP / 3
35 / XAL / XAL / ARP / 4
36 / XUL / XUL / 182 to 193 / RRD / 1 / _RD / 1 TO 12
37 / CPL / CPL / NRD / 2
38 / MPO / MPO / CRD / 3
ARD / 4
194 to 205 / RLA / 1 / _LA / 1 TO 12
NLA / 2
CLA / 3
Data Commands
Clear Totals