Reference Manual
CONTEC Data Collector
for Modbus
CONTENTS
Introduction .................................................................. 3
Software ......................................................................... 9

Examples of Data Collector Applications ........ 19

Appendix...................................................................... 32
Customer Support and Inquiry............................ 36

Table of Contents
Introduction ....................................................................... 3
1. Related Manuals......................................................................................................................................................4
2. Product Overview ...................................................................................................................................................5
1. About Edgecross ..............................................................................................................................................5
2. About “CONTEC Data Collector for Modbus " .....................................................................................6
3. Data Collector Specifications .............................................................................................................................7
1. Modbus Function .............................................................................................................................................7
2. Common Specifications.................................................................................................................................7
3. Data Type ............................................................................................................................................................7

4. Function......................................................................................................................................................................8
1. Collection Function .........................................................................................................................................8
2. Read Function....................................................................................................................................................8
3. Write Function...................................................................................................................................................8

Software .............................................................................. 9
1. About Driver .......................................................................................................................................................... 10
1. Data Collector Installing ............................................................................................................................. 10
2. Uninstall ............................................................................................................................................................ 11
2. About Data Collector ......................................................................................................................................... 12
1. Parameter Setting ......................................................................................................................................... 12
2. Error Handling ................................................................................................................................................ 18

Examples of Data Collector Applications ..................... 19
1. Procedure ............................................................................................................................................................... 20
1. Items................................................................................................................................................................... 20
2. Device Setting ................................................................................................................................................ 20
3. Data Collection Setting............................................................................................................................... 24
4. Data Collection............................................................................................................................................... 30

Appendix .......................................................................... 32
1. Inquiries ................................................................................................................................................................... 33
2. Open Source Software....................................................................................................................................... 34
1. RapidJSON ....................................................................................................................................................... 34
2. msinttypes........................................................................................................................................................ 35

Customer Support and Inquiry ...................................... 36
1. Services .................................................................................................................................................................... 37— 2 —Introduction

This chapter provides necessary information of the productsuch as the product configuration and manuals before
actual use.

— 3 —

— —
Introduction

CONTEC Data Collector for Modbus Reference Manual

1.Related Manuals

The manuals related to the product are listed below.
Read them as necessary along with this document.

 Must Read The Following Manuals.
Name

When To Read

Contents

How To Get

CONTEC Data Collector for Read this when setting This describes the usable
Modbus (This document)
up the product.
specifications and how to set
parameters with the product.

Download fromthe EdgecrossMarketplace(PDF)

Edgecross Basic Software
User’s Manual

Download fromthe EdgecrossMarketplace(PDF)

Read this when setting This describes thethe [CONTEC Data
specifications, procedure to
Collector for Modbus]. run the software, functions,troubleshooting, and more.

 Download Manuals
Download the manuals from the following URL.
Download

https://www.marketplace.edgecross.org/

— 4 —

— —
Introduction

CONTEC Data Collector for Modbus Reference Manual

2.Product Overview
1. About EdgecrossEdgecross is a standard open edge computing software platform going beyond the bounds ofcompanies and industries that promote the use of IoT at manufacturing sites. It connects the edge
computing area between FA and IT systems and realizes seamless data coordination, which is
independent from hardware.

Since 2017, which is when “Edgecross Consortium” was establishment, operation monitoring,

preventive maintenance and data analysis software, or supporting industrial computers have beenreleased, and the applications for those have expanded in the field of edge applications. On the other
hand, while data were collected from industrial networks such as OPC UA in the area of FA field, it
was difficult to collect the data from sensors or switch circuits that were incompatible with industrial
networks due to the lack of supporting devices or software.

With the “CONTEC Data Collector” software, you can utilize our extensive measuring controllers

and remote I/O devices on the Edgecross platform, and collect data from sensors or switch circuitsthat are incompatible with industrial networks. This software enhances the application range of the

Edgecross platform, and contributes to the development for various industries as well as the
manufacturing industry.

— 5 —

— —
Introduction

CONTEC Data Collector for Modbus Reference Manual

2. About “CONTEC Data Collector for Modbus "The [CONTEC Data Collector for Modbus] is software that implements data coordination between
the Edgecross basic software platform and the digital, analog I/O measurement control, remote I/O

devices of the CONTEC.

Modbus is a communication protocol widely used in the industrial field.
Collecting, reading, and writing data for the CONTEC devices containing Modbus slave function canbe performed by installing the Data Collector on higher-level communication devices containing a
Modbus master function.

— 6 —

— —
Introduction

CONTEC Data Collector for Modbus Reference Manual

3.Data Collector Specifications
1. Modbus Function
The following table lists supporting function codes.
Modbus function code

Description

Read Coil Status (0x01)

Read coil and digital outputs.

Read Input Status (0x02)

Read input status and digital inputs.

Read Holding Registers (0x03)

Read holding registers.

Read Input Registers (0x04)

Read input registers.

Force Single Coil (0x05)

Write single to coil and digital output.

Preset Single Register (0x06)

Write to holding register.

Force Multiple Coil (0x0F)

Write to multiple coils and to digital outputs simultaneously.

Preset Multiple Registers (0x10)

Write to multiple holding registers simultaneously.

2. Common Specifications
Item

Specification

Support Language
Collection Function

Read Function

Write Function

English, JapaneseCollection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, REAL

Collection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, REAL

Collection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, REAL

3. Data Type
There are four types of data handled by Modbus: Coil, Input Status, Input Registers, and Holding

Registers.

Data type

AccessData size

CoilRead/Write

1bit

Input Status

Read

1bit

Input Registers

Read

16bit

Holding Registers

Read/Write

16bit

— 7 —

Corresponding function code

0x01, 0x05, 0x0F
0x02
0x04

0x03, 0x06, 0x10

— —Introduction

CONTEC Data Collector for Modbus Reference Manual

4.Function

1. Collection Function
Inputting is performed at the set time interval from the specified function code and register.

2. Read Function
Inputting is performed at the timing requested by the Edgecross basic software from the specified
function code and register.

3. Write Function
Outputting is performed at the timing requested by the Edgecross basic software from the specified
function code and register.

— 8 —SoftwareThis section provides the information on the settings of thedata collector software.

— 9 —■Software■
CONTEC Data Collector for Modbus Reference Manual

1.About Driver
1. Data Collector Installing

1 Extract the downloaded data collector package to an appropriate place.
2 Execute the extracted file listed below.
\Installer\Modbus\setup.exe

3 Select the language you wish to install, and click the [Next].

4 Enter the license code, and click the "Next".

— 10 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

5 Select the program icon to add into the Program Folder, and click the "Next".

6 When the installation is completed, the "CONTEC Data Collector for Modbus " will be added to
the Start menu, and this Reference Manual will be stored in the program folder.

2. Uninstall
Select the "CONTEC Data Collector for Modbus" from the "Programs and Features " in the "Control
Panel", and uninstall it.

— 11 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

2.About Data Collector
This section describes how to set the data collector.

1. Parameter Setting Target Device Setting
Select and set a device used in the data collector.
On the "Real-time Flow Designer", select the [Target Device Setting].

On the [Target Device Setting List], select a row which has no target device.
Click the [Edit] button.

— 12 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

On the "Select Data collector", select the [CONTEC Data Collector for Modbus Version 1].
Click the [OK] button.

Set the [IP Address] and the [Port No.] of the target device.

Setting Item

Description

Setting Name *1

Set a name of the target device with 1-32 letters.
The target device names that have already been used are displayed by default in order
to avoid the same names to be set.
Dev01, Dev02, Dev03, ...

Comment

A comments can be set within 100 letters

IP Address

Set IP address of the slaves.
The default is 10.1.1.101.
The range is 0.0.0.0 - 255.255.255.255.

— 13 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

Setting Item

Description

Port No.

Set a port No. with 1-4 letters.
The default is 502.
The range is 0 - 1023.

Unit identifier

Set a unit identifier.
The default is 0001(HEX).
The range is 0000 - FFFF(HEX).

*1

The target device names that have already been set are unavailable.

— 14 —

■Software■
CONTEC Data Collector for Modbus Reference Manual Collection Parameters
On the "Data Collection Setting" of the Edgecross, open the [Collection Option] tab.

Specify the data collection interval.

As for the collection interval, refer to "Common Specifications”(page7).

— 15 —

■Software■
CONTEC Data Collector for Modbus Reference Manual Location Parameters
Specify the location parameters to access devices set in the Target Device Setting.
On the "Data Collection Setting" of the Edgecross, select the button framed in by the red square

Set the location parameters.

— 16 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

Setting Item
The function

Description
Set the function from Modbus function code.
The default is Read Coil Status(0x00000).

The starting address Set the starting address.
The default is 00001(HEX).
The number ofregisters

Set the number of registers to access.
The default is 0001(HEX).

Data typeSet a data type.
The default is Bool (1Bit).
If there is an inconsistency in the combination of function and data type, an error will
be output.
As for the data type, refer to "Common Specifications
Item

Speci

Support Language

English, JapaneseCollection Function

Read Function

Write Function

Collection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, RE

Collection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, RE

Collection Interval

100 msec to 900 msec
1 sec to 3600 sec

Data Type

BOOL, UINT, UDINT, RE

Data Type"(page7).
Analog input range

Set the analog input range.
This is available only when the data type is REAL (4Byte).
Select the range from five choices listed below.
(-10 to +10V, -5 to +5V, -2.5 to +2.5V, 0 to +10V, -20 to +20mA)— 17 —

■Software■
CONTEC Data Collector for Modbus Reference Manual

2. Error Handling
The detailed information on the errors that occur in the data collector function is listed below.

 An example of the display contents
Overview

Collection parameters acquisition failure
Event code
2002
Detailed information[Process flow information]
Error occurrence function : Data collector
Process flow type: Data diagnostic flow
Data logging / Diagnostic flow No. : 1
Process No. : 1
Target device setting No. : 1
CausesAn error occurred in collection parameters.
Troubleshooting
Check the data collection interval.

 Error CodeError Code [Hex]Description

1001

Target device

Connected

1002

Target device

Disconnected2001

Communication parameter acquisition failed

2002

Collection parameter acquisition failed

2003

Data parameter acquisition failed

2010

Communication state report failed

2011

Data collection interval setting failed

2021

Socket creation error

2022

Socket transmission error

2023

Socket reception error

2024

Modbus response function code is not the expected value

2025

Modbus response message size is not the expected value— 18 —Examples of Data
Collector Applications

This section describes how to collect data using the CONTEC's remote IoT device [CPSN-MCB271-S1]. For details
on the CPSN-MCB271-S1, refer to the Reference Manual.

— 19 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

1. Procedure
1. Items- PC with Edgecross Basic Software pre-installed (hereafter referred to as the Modbus master)- CPSN-MCB271-S1-041 (hereafter referred to as the Modbus slave)- Power unit for the CPSN-MCB271-S1-041- I/O module for connecting a coupler unit of the CPSN-MCB271-S1-041(The [CPSN-DI-16BCL] is used in the example).
- Ethernet cable

2. Device Setting

1 Install this Data Collector into the Modbus master. (Refer to “Data Collector
Installing(page10)”)2 Set up the Modbus master network.

See the "Set the Computer Network" section in Reference Manual (Software) of CPSNMCB271-S1-041, and set up the network with IP address as listed below.
IP address: 10.1.1.200
Subnet mask: 255.0.0.0— 20 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

3 Connect the I/O module to the Modbus slave.
4 Connect the Modbus slave and the Modbus master with Ethernet cable, then, turn on the
power of the slave.

5 Open Internet Explorer on the Modbus master.
6 Type "10.1.1.101" in the address bar. Press the [Enter] key on the keyboard.
The login page appears. Type "mcb271" and click the [Login].

— 21 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

7 Enter an arbitrary value in the register of the I/O module to see whether data can be collected
appropriately. The CONPROSYS nano WEB Setting page appears. Click the [I/O Module].

8 The I/O module setting page opens. Go to [CPSN-DI-16BCL] - [CH0].
Enter any values in the [Comparison Value].

Then, click the [Submit].

— 22 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

9 The following page opens. Click the [Save & Reboot].

10 Wait for three minutes or so, and repeat steps 5-7, then click the "Modbus Data
View".

Check whether the setting value has been saved as shown below.

— 23 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

3. Data Collection Setting

1 On the Modbus master, start up the “Edgecross Real-time Flow Designer”.

Select the [Target Device Setting] and choose the blank row where no [Target Device Setting] isset. Click the [Edit].

2 On the [Select Data collector], select the [CONTEC Data Collector for Modbus Version
1(CONTEC CO., LTD.].

Click the [OK].

— 24 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

3 For the target device, set the IP address and the port number as listed below. Click the [OK].
Setting Name: Any nameComment: Any comment
IP Address: 10.1.1.101
Port No.: 502
Unit identifier: 01(HEX)

4 Go to the [Process Flow Setting] menu and select the [Data Logging Flow Setting].
Choose the blank row where no [Data Logging Flow Name] is set.

— 25 —

Click the [Edit].

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

5 The Data Logging Flow Setting page opens. Select the "Not Set" in the [Detailed Setting].

6 The Data Collection Setting page opens. Select the [Collection Option] tub.
For the Collection interval, select 1 and Second.

7 Select the [Collection Data] tab and click the place framed in by the red square.

— 26 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

8 The [Location Setting] page opens. Set the details as listed below and click the [OK].
The function: Read Holding Registers(0x400000)
The starting address: 0000(HEX)The number of registers: 0002(HEX)
Data type: UDInt(4Byte)

9 On the [Data Logging Flow Setting] page, select the "Do not execute" in the [Data Storing].

— 27 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

10 For the Executable form, select the [File] and click the [Next].

11 Select the file format to output and click the [Next].

12 Check off the box of the created process and click the [Next].

— 28 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

13 Set the format of output data. If no particular problems can be found, click the [Next].

14 Set the Saving File Setting. If no particular problems can be found, click the [OK].

15 Select the [OK] and click the [Apply].

— 29 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

4. Data Collection

1 Select the [Diagnostic] tab and select the [Real-time Flow Manager Diagnostics].

2 The [Real-time Flow Manager Diagnostics] page opens. Click the [Start Operation].

Wait for a minute or so. Make sure that there are no errors listed in the [Error Information List].

— 30 —

—

Examples of Data Collector Applications—

CONTEC Data Collector for Modbus Reference Manual

3 Select the [Stop].

The log will be created in the Save Destination Folder specified in the [Data Collection Setting
No. 14]. *Default is a user's document folder.

4 Open the log file. Check whether setting values specified in the [Device Setting No. 8] areobtained.

*This example shows that obtained 4294967290(DEC), FFFF FFFA(HEX).

— 31 —

Appendix

This section describes software details, and inquiries.

— 32 —

— —Appendix

CONTEC Data Collector for Modbus Reference Manual

1.Inquiries

Contact your retailer about the matter which is not described in this reference manual or unusual
operation.

Moreover, because the contents of question are hard to grasp as being oral, please inquire it in Email or Web form. We will contact you back.

When it is thought that operation is unusual, please write down the version of driver, Edgecross basic
software, Data Collector and the hardware environment of PC or other using devices in detail.

Please note that we cannot answer general questions such as how to use the Edgecross basic
software.

Before inquiry
The retailer first checks whether the hardware is not working properly or the software is not working,and responds according to each situation.

If you suspect an abnormal operation, please let us know in detail as much as possible after
confirming the reproduction procedure and the location where the problem occurred.

Inquiry Contact toPlease refer to the contact information and templates for making inquiries on our website.
https://www.contec.com/support/
FAQ library is also available.

— 33 —

— —Appendix

CONTEC Data Collector for Modbus Reference Manual

2.Open Source SoftwareThis software consists of multiple software components. Each of them is copyrighted by this company
and/or third parties.

This software contains the following open source software.

Software copyrighted by third parties and distributed as free software

In addition, source codes are not distributed for the software that this company and/or third parties
have copyrights to.

Please refrain from inquiring about the source codes of this open source.

1. RapidJSONThis product uses RapidJSON licensed under the MIT License.

The copyright and permission notices of RapidJSON are described below.
Tencent is pleased to support the open source community by making RapidJSON available.
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.

All rights reserved.

If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the
RapidJSON binary is licensed under the MIT License.

If you have downloaded a copy of the RapidJSON source code from Tencent, please note that
RapidJSON source code is licensed under the MIT License, except for the third-party components

listed below which are subject to different license terms.

Your integration of RapidJSON into your own projects may require compliance with the MIT License,
as well as the other licenses applicable to the third-party components included within RapidJSON.

To avoid the problematic JSON license in your own projects, it's sufficient to exclude thebin/jsonchecker/ directory, as it's the only code under the JSON license.
A copy of the MIT License is included in this file.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software andassociated documentation files (the "Software"), to deal in the Software without restriction, including

without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A— 34 —

— —Appendix

CONTEC Data Collector for Modbus Reference Manual

PARTICULAR PURPOSE AND NONINFRINGEMENT.

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGESOR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

2. msinttypes
This product uses msinttypes licensed under the BSD License.

The copyright and permission notices of msinttypes are described below.
The msinttypes r29 Copyright (c) 2006-2013 Alexander Chemeris.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions andthe following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the
distribution.

* Neither the name of copyright holder nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESSOR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITEDTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR

BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANYWAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

— 35 —Customer Support andInquiry

CONTEC provides the following support services for you to
use CONTEC products more efficiently and comfortably.

— 36 —

—

Customer Support and Inquiry—

CONTEC Data Collector for Modbus Reference Manual

1.Services

CONTEC offers the useful information including product manuals that can be downloaded throughthe CONTEC website.

Download
https://www.contec.com/download/
You can download updated driver software, firmware, and differential
manuals in several languages. Membership registration (myCONTEC)
is required to use the services.

— 37 —

—

Revision History—

CONTEC Data Collector for Modbus Reference Manual

Revision History
MONTH YEAR

Summary of Changes

June 2020

The First Edition

December 2020

The section of Examples of Data Collector Applications was added.

— 38 —

CONTEC CO., LTD.

3-9-31, Himesato, Nishiyodogawa-ku, Osaka 555-0025, Japan

https://www.contec.com/
No part of this document may be copied or reproduced in any form by any means without prior written consent
of CONTEC CO., LTD.

CONTEC Data Collector for Modbus Reference Manual

NA07267 (LYYA752) 12092020_rev2 [06052020]

December 2020 Edition