=====================================================================
=        DAQ-LIBMB-WIN Additional Sample Program for CPSR           =
=                                                         Ver.1.00  =
=                                                 CONTEC Co., Ltd.  =
=====================================================================

- Contents
=======================
  Introduction
  Folder Structure
  Specification
  Support device
  About this sample
  Usage for GUI version
  Usage for CUI version
  About Open Source Software
  Version up history

- Introduction
===========
  Thank you for using our products.

  This package contains sample programs exclusively for CONPROSYS Robust I/O series using DAQ-LIBMB-WIN.
  Please use it as a reference when using CONPROSYS Robust I/O series.
  [DAQ-LIBMB-WIN]  :
    - Download： https://www.contec.com/en/products-services/daq-control/iiot-conprosys/cps-software/daq-libmb-win

- older Structure
=======================
  <User Directory>
   +--<Sample>
   |   +--<jp>
   |     +--<Inc>           Include file for each language
   |     |
   |     +--<Lib_amd64>     Library files for each language (64bit)
   |     |
   |     +--<Lib_i386>      Library files for each language (32bit)
   |     |
   |     +--<VB>
   |     |   +-- <DotNetFramework4>      Visual Basic.Net (.NET Framework) Sample
   |     |   +-- <DotNet8>               Visual Basic.Net (.NET) Sample
   |     |
   |   +--<VC>
   |     |   +-- <Vc2015>                Visual C++ (MFC) Sample
   |     |
   |     +--<VC#>
   |     |   +-- <DotNetFramework4>      Visual C# (.NET Framework) Sample
   |     |   +-- <DotNet8>               Visual C# (.NET) Sample
   |     |
   |     +--<Python>                     Python Sample
   |
   +--<SampleExe>
   |   +--<64bit>         Sample EXE file (64bit)
   |   +--<32bit>         Sample EXE file (32bit)
   |
   +-- Readme_e.txt       Readme(English)  *This file
   +-- Readme_j.txt       Readme(Japanese)
   +-- COPYING.LESSER     COPYING.LESSER

   In the folder of each language above, sample programs are stored in the following configuration.
  <Sample folder>
   +-- TcpDioSimple      TCP Master Digital I/O Sample for CPSR
   +-- TcpAiSimple       TCP Master Analog Input Sample for CPSR
   +-- TcpAoSimple       TCP Master Analog Output Sample for CPSR
   +-- RtuDioSimple      RTU Master Digital I/O Sample for CPSR
   +-- RtuAiSimple       RTU Master Analog Input Sample for CPSR
   +-- RtuAoSimple       RTU Master Analog Output Sample for CPSR

- Support device
=======================
[CONPROSYS Robust I/O Series]
CPSR-ET7017, CPSR-ET7026, CPSR-ET7028, 
CPSR-ET7044, CPSR-ET7051, CPSR-ET7052,
CPSR-ET7053, CPSR-ET7060, CPSR-ET7066
CPSR-ET7217, CPSR-ET7224
CPSR-M7017G, CPSR-M7028DG, CPSR-M7051DG, 
CPSR-M7052DG, CPSR-M7053DG, CPSR-M7055UDG,
CPSR-M7060PDG, CPSR-M7066PDG

- Specification
===========
  [Supported driver]
  DAQ-LIBMB-WIN

  [Supported development languages]
  Microsoft Visual C++ (MFC)  (2015, 2017, 2019, 2022)
  Microsoft Visual C#         (2015, 2017, 2019, 2022)
  Microsoft Visual Basic .NET (2015, 2017, 2019, 2022)
  Python                      (3.9, 3.10, 3.11, 3.12, 3.13)

  *Samples for Python are provided in CUI version.
   Samples for other development languages are provided in GUI version.

- About this sample
===========
  I/O data is sent and received for the corresponding Modbus function code and register address.
  For details, please refer to the CONPROSYS Robust I/O series reference manual.
   <TCP Master> 
        This is a sample program of Modbus/TCP master.
        It is possible to specify the IP address and communication port, and execute Modbus/TCP communication.
   <RTU Master> 
        This is a sample program for Modbus/RTU master.
        Specify the COM port, baud rate, parity, etc., and execute Modbus/RTU communication.

- Usage for GUI version
===========

  1.Connection 
   <TCP master> 
   - Enter the IP address and port number of the device you wish to access, and press the “Connect” button.
   <RTU master> 
   - Enter the COM port to be used, baud rate, parity, and slave ID, and press the “Connect” button. 2.

  2.Input/Output 
   <Digital I/O> 
   - Data input/output is available from channel 0 to 15.
   - Single Input 
     To input only one designated channel, enter the desired channel number in “Channel No.:” in the 
     designated channel input frame.
     The input value from the device is displayed in “Input Data:” in the specified channel input frame.
     The input value can be 0 or 1.
   - Multi Input 
     For multi-channel input, enter the desired channel number in “Channel number:” in the 
     multi-channel input frame.
     The input value from the device is displayed in “Input Data:” in the multi-channel input frame.
     The start channel number is fixed to 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     The input value is converted to a hexadecimal number and displayed.
   - Single Output 
     To output only one specified channel, enter the desired channel number in “Channel No.:” in the 
     specified channel output frame.
     Specify the desired output value in “Output Data:” in the specified channel output frame.
     Specify 0 or 1 for the output value.
   - Multi Output 
     For multi-channel output, enter the desired channel number in “Channel number:” in the 
     multi-channel output frame.
     Specify the desired output value in “Output Data:” in the multi-channel output frame.
     The start channel number is fixed to 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     The output value must be converted to a hexadecimal number.
   - EchoBack Single 
     To input the current output value of the specified channel, input the desired channel number at “Channel number:” in the 
     specified channel output frame.
     The input value from the device is displayed in “Output Data:” in the specified channel output frame.
     The input value can be 0 or 1.
   - EchoBack Multi 
     To input the current output value of multiple channels, enter the desired channel number in “Channel number:” in the 
     multiple-channel output frame.
     The input value from the device is displayed in “Output Data:” in the multi-channel output frame.
     The start channel number is fixed at 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     The input value is converted to a hexadecimal number and displayed.
   <Analog Input> 
   - Data can be input from channel 0 to 8.
   - Use with devices that are set to ±10[V] for range and differential input for input method.
   - Single Input 
     To input only one designated channel, input the desired channel number at “Channel No.:” in the 
     designated channel input frame.
     The input value from the device is displayed in “Input Data:” in the specified channel input frame.
     Input values from -10000[mV] to 10000[mV] can be obtained.
   - Multi Input 
     For multi-channel input, enter the desired channel number in “Channel number:” in the 
     multi-channel input frame.
     The input value from the device is displayed in “Input Data:” in the multi-channel input frame.
     The start channel number is fixed to 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     Input values from -10000[mV] to 10000[mV] can be acquired.
   <Analog output> 
   - Data can be input from channel 0 to 8.
   - Use with devices that are set to 0-10[V] for range and differential input for input method.
   - Single Output 
     To output only one specified channel, enter the desired channel number in “Channel No.:” in the 
     specified channel output frame.
     Specify the desired output value in “Output Data:” in the specified channel output frame.
     Specify an output value from 0[mV] to 10000[mV].
   - Multi Output 
     For multi-channel output, enter the desired channel number in “Channel number:” in the 
     multi-channel output frame.
     Specify the desired output value in “Output Data:” in the multi-channel output frame.
     The start channel number is fixed to 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     Specify output values from 0[mV] to 10000[mV]. 3.

  Exit processing 
   - [Close] disconnects the connection with the device and releases the allocated memory.
   - [Exit] button terminates the program.

- Usage for CUI version
===========

  1.Connection 
   <TCP master> 
   - When you select the command [Connect], you can specify the IP address and the port number to be used.
     When these are specified, a connection to the device is initiated.
   <RTU master> 
   - When “Connect” is selected, you can specify the COM port to be used, baud rate, parity, and slave ID.
     When these are specified, a connection to the device is initiated.

  2.Input/Output 
   <Digital I/O> 
   - Data input/output is available from channel 0 to 15.
   - Single Input 
     When inputting only one specified channel, select the command 
     [Single Input] to specify the channel number.
     When a channel number is specified, the input value from the device is displayed.
     The input value can be 0 or 1.
   - Multi Input 
     When inputting multiple channels, select the command 
     [Multi Input] to specify the number of channels.
     When the number of channels is specified, the input value from the device is displayed.
     The starting channel number is fixed at 0ch. When the number of channels 4 is specified, data is acquired from 0ch to 3h.
     The input value is converted to a hexadecimal number and displayed.
   - Single Output 
     To output only one specified channel, select the command 
     [Single Output] to specify the channel number and output data.
     When the channel number and output data are specified, the specified value is output from the specified channel number of the device.
     The output value must be 0 or 1.
   - Multi Output 
     To output multiple channels, select the command 
     [Multi Output] to specify the number of channels and output data.
     When the number of channels and output data are specified, the specified value is output from the specified channel number of the device.
     The start channel number is fixed at 0ch. If channel number 4 is specified, data is acquired from 0ch to 3h.
     The output value should be the value converted to hexadecimal number.
   - EchoBack Single 
     To input the current output value of a specified channel, select the command 
     [EchoBack Single] to specify the channel number.
     When a channel number is specified, the input value from the device is displayed.
     The input value can be 0 or 1.
   - EchoBack Multi 
     To input the current output value of multiple channels, select the command 
     [EchoBack Multi] to specify the number of channels.
     When the number of channels is specified, the input value from the device is displayed.
     The starting channel number is fixed at 0ch. When the number of channels 4 is specified, data is acquired from 0ch to 3h.
     The input value is converted to a hexadecimal number and the value is displayed.
   <Analog Input> 
   - Data can be input from channel 0 to 8.
   - Use with devices that are set to ±10[V] range and differential input method.
   - Single Input 
     When inputting only one specified channel, select the command 
     [Single Input] to specify the channel number.
     When a channel number is specified, the input value from the device is displayed.
     Input values from -10000[mV] to 10000[mV] can be obtained.
   - Multi Input 
     When you want to input multiple channels, you can specify the number of channels by selecting the command 
     [Multi Input].
     When the number of channels is specified, the input value from the device is displayed.
     The start channel number is fixed to 0ch. When the number of channels 4 is specified, data is acquired from 0ch to 3h.
     Input values from -10000[mV] to 10000[mV] can be acquired.
   <Analog output
   - Data can be input from channel 0 to 8.
   - Use with devices with the range set to 0-10[V] and the input method set to differential input.
   - Single Output 
     To output only one specified channel, select the command 
     [Single Output] to specify the channel number and output data.
     When the channel number and output data are specified, the specified value is output from the specified channel number of the device.
     Specify output values from 0[mV] to 10000[mV].
   - Multi Output 
     To output multiple channels, select the command 
     [Multi Output] to specify the number of channels and output data.
     When the number of channels and output data are specified, the specified value is output from the specified channel number of the device.
     The start channel number is fixed to 0ch. When the number of channels 4 is specified, data is acquired from 0ch to 3h.
     Specify output values from 0[mV] to 10000[mV].

  3. exit process
   - Selecting[Close]disconnects from the device and releases the allocated memory.
   - Selecting the command [Exit] terminates the program.

- About Open Source Software
=======================
  This product contains open source software.
  Please note that you must comply with the terms of the LGPLv2.1+ when distributing the product, including libraries.
  For license information on open source software, please refer to the “COPYING.LESSER”.

  [libmodbus]  :
    - Download： https://github.com/stephane/libmodbus
  
- Version up history
=======================
  Ver.1.00 (Web Release 2025.06)
  ----------------------------------------
  - First release
    Support device: CPSR-ET7017, CPSR-ET7026, CPSR-ET7028,
                    CPSR-ET7044, CPSR-ET7051, CPSR-ET7052,
                    CPSR-ET7053, CPSR-ET7060, CPSR-ET7066
                    CPSR-ET7217, CPSR-ET7224
                    CPSR-M7017G, CPSR-M7028DG, CPSR-M7051DG, 
                    CPSR-M7052DG, CPSR-M7053DG, CPSR-M7055UDG,
                    CPSR-M7060PDG, CPSR-M7066PDG