EtherNet/IP Communication

Mech-MSR can communicate with external devices by using the EtherNet/IP protocol. Before you read the following content, make sure that the communication configuration has been completed in Mech-MSR.

About EtherNet/IP

The EtherNet/IP protocol supports the data transformation between a PLC and Mech-MSR.

Communication Workflow

The workflow of EtherNet/IP communication is shown in the figure below.

You can check the table in Input and Output Signals to learn the meaning of each signal.
handshake flow

Input and Output Signals

You can configure the PLC based on the following table.

Input (from the PLC to Mech-MSR) Output (from Mech-MSR to the PLC)

Module

Name

Bytes occupied

Module

Name

Bytes occupied

Control input

Command enable

1 byte

Control output

Heartbeat

1 byte

Command trigger

Trigger acknowledge

Data read finished

Data ready

Reset

Execution completed

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Error

Reserved field

3 bytes

Overall judge

1 byte

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

Reserved field

2 bytes

Status code

Status code

1 byte

Command

Command code

4 bytes

Judgment result

Judgment result of ID 1

Judgment result of ID 2

Judgment result of ID 3

8 bytes

Command parameter 1

4 bytes

Command parameter 2

4 bytes

Measurement result

Measurement result of ID 1

Measurement result of ID 2

Measurement result of ID 3

256 bytes

(4 bytes × 64)

Command parameter 3

4 bytes

Command parameter 4

4 bytes

Input (from the PLC to Mech-MSR)

Control Input

Address Data Description

0.0

Command enable (bool)

Only when the command enable signal is set to 1, other input signals take effect.

0.1

Command trigger (bool)

When the command trigger signal changes from 0 to 1 (a rising edge is detected), Mech-MSR reads command codes and command parameters. When Mech-MSR returns the command trigger acknowledge signal, the command trigger signal can be set to 0.

0.2

Data read finished (bool)

When the PLC completes data reading, this signal can be set to 1. When the PLC is informed that the data ready signal changes to 0, this signal can be set to 0.

0.3

Reset (bool)

When this signal is set to 1, the PLC clears the received judgement result and measurement result. At this point, the PLC can send new commands and status code signals are reset.

0.4

Reserved field (bool)

A reserved field.

0.5

Reserved field (bool)

A reserved field.

0.6

Reserved field (bool)

A reserved field.

0.7

Reserved field (bool)

A reserved field.

1.0

Reserved field (byte)

A reserved field.

Commands

The following table describes the commands supported by the Modbus TCP communication, the command codes, and the command parameters.

Command Command code Command parameter Description

execute

1

The project ID. Only one project ID can be set each time.

Used to trigger the project and obtain project judgement result and measurement result.

trigger

2

The project ID. One to four project IDs can be set at a time.

Used to trigger the project to run.

return

3

The project ID. Only one project ID can be set each time.

Used to obtain the judgement result and the measurement result of the specified project.

judge

4

Used to obtain the overall quality judgment result of the specified project or the judgment results of individual measurement items.

value

5

Used to obtain the measured values of a specified project.

You can check Project List of Mech-MSR to learn how to view the ID of a project.

Output (from Mech-MSR to the PLC)

Control Output

Address Data Description

0.0

Heartbeat (bool)

System heartbeat that flips every 1 second. Used to determine whether the PLC and Mech-MSR are connected or disconnected.

0.1

Trigger acknowledge (bool)

When Mech-MSR receives the rising edge for the command trigger signal, this signal is set to 1. When a failing edge is detected for the command trigger signal, this signal is set to 0.

0.2

Data ready (bool)

Mech-MSR writes data to output ports and waits for the PLC to read the output data. When the data read signal is set to 1, this signal is set to 0.

0.3

Execution completed (bool)

When the command execution completes, this signal is set to 1, which indicates that the command execution is completed.

0.4

Reserved field (bool)

A reserved field.

0.5

Reserved field (bool)

A reserved field.

0.6

Reserved field (bool)

A reserved field.

0.7

Error (bool)

If the status code returned by Mech-MSR is not 0, an error occurred and this signal will be set to 1.

1.1

Overall judge (bool)

The overall judgement of the project. 0 indicates OK, and 1 indicates NG.

1.2~1.7

Reserved field (bool)

A reserved field.

Status Codes

Five status codes may be returned by Mech-MSR:

  • Normal status code: 0, which indicates that the command has been successfully executed.

  • Error codes: -1, -2, -3 and -4. For more information, see Error Codes.

Judgment Results

Judgement results were added for measurement items on the Communication output tab in the Output Management dialog box. 0 indicates OK, and 1 indicates NG.

At most 64 judgement results can be output for a single project at a time.

Measurement Results

Measurement results are added for measurement items on the Communication output tab in the Output Management dialog box.

At most 64 measurement results can be output for a single project at a time.

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.