UMAS (Schneider Electric PLCs)
This protocol is used by Schneider Electric PLCs such as the M340, M580 and the Quantum PLCs with the Unity firmware.
This driver supports reading, writing and browsing of PLC tags.
The Data Dictionary needs to be enabled on the PLC.
| The driver is available in Java and in Plc4Py. The tag address syntax differs slightly between the two; where that is the case it is called out below. |
Supported Operations
| Name | Value | Description |
|---|---|---|
|
||
|
||
|
||
|
||
|
Java, polling-emulated. Go, native - the Go driver’s subscriptions are not built on top of polling reads. |
|
Connection String
UMAS has the following connection string format:-
umas:{transport}://{ip-address}:{port}?{options}
An example connection string would look like:-
umas:tcp://127.0.0.1:502
Note the transport, port and option fields are optional.
Connection String Options
Name |
Type |
Default Value |
Required |
Description |
Name |
UMAS (Schneider Electric) |
|||
Code |
|
|||
Maven Dependency |
<dependency> <groupId>org.apache.plc4x</groupId> <artifactId>plc4j-driver-umas</artifactId> <version>1.0.0</version> </dependency> |
|||
Default Transport |
|
|||
Supported Transports |
|
|||
Config options: |
||||
|
INT |
0 |
Modbus unit identifier (slave address). UMAS typically uses 0. |
|
|
INT |
4000 |
Timeout in milliseconds for UMAS requests. |
|
|
INT |
65535 |
Maximum UMAS frame size. The PLC reports its actual limit during InitComms. |
|
|
BOOLEAN |
true |
Tells the browser to generate artificial child nodes representing individual array elements. |
|
Transport config options: |
||||
tcp |
||||
|
INT |
5000 |
Connection timeout in milliseconds. |
|
|
INT |
0 |
Socket read timeout in milliseconds. 0 means no timeout. |
|
|
INT |
0 |
Socket write timeout in milliseconds. 0 means no timeout. |
|
|
BOOLEAN |
true |
Enable TCP_NODELAY (disable Nagle’s algorithm). |
|
|
BOOLEAN |
false |
Enable SO_KEEPALIVE. |
|
|
INT |
81920 |
Send buffer size in bytes. 0 uses system default. |
|
|
INT |
81920 |
Receive buffer size in bytes. 0 uses system default. |
|
|
STRING |
Local address to bind to (optional). If not set, uses default. |
||
|
INT |
0 |
Local port to bind to (optional). 0 uses ephemeral port. |
|
Tag Addresses
Addressing is implemented in Go, Java and Python. See the protocol support matrix for what each implementation does.
General Format
UMAS addresses are the symbolic names declared in the PLC program, following the usual IEC 61131-3 conventions:
{tag-name}
{tag-name}[{index}]
{tag-name}.{child-name}
{tag-name}.{child-name}[{index}].{child-name}
Depending on the type of tag the child-name parameters are optional.
e.g. A tag with a BOOL data type could be TESTING_BOOL_1, whereas if it is a UDT the tag name is
followed by the child TESTING_UDT_1.START, which in itself could be a BOOL.
An index in square brackets selects a single element and may appear at any position of the path.
|
Array selection uses the shared notation - a single index, an inclusive range, and optionally the array’s declared lower bound, placed before the type. See Addressing arrays. |
The Java driver takes the data type from the PLC’s data dictionary, so an address carries
no :{data-type} suffix - appending one makes the address invalid.
|
Memory Areas
Apart from tags defined in the PLC, Plc4Py is also able to access the %S and %SW system memory areas.
The specific address details of the data in these areas are outlined in the devices manual.
An example of the address format of these areas is %SW1 or %S20.
These system memory addresses are supported by Plc4Py only. The Java driver’s address parser
accepts symbolic names only and rejects addresses starting with %.
|
Notes and Tips
The Go driver’s generated DataItem parser has no case for DATE, TIME_OF_DAY (TOD) or
DATE_AND_TIME - by itself it would fall through to "unsupported type" for those three.
The driver works around that gap: decodeReadResponse and encodeWriteValue in
plc4go/internal/umas/Values.go hand-decode and hand-encode all three temporal types (plus
STRING), the same way plc4j’s UmasConnection does, so reads and writes of DATE and
TIME_OF_DAY tags succeed rather than being refused. Every data type listed above reads and
writes in both languages.
UMAS ships no captured test data in any language - there is no packet capture or golden byte sequence for either driver to compare against. The Java and Go drivers are instead verified against each other: their symbolic-address pattern is byte-for-byte identical, and the Go temporal/string decoding above is a deliberate port of plc4j’s hand-decoding. Treat this driver’s correctness as validated by cross-implementation agreement, not by a real captured exchange.