CONPROSYS use case : Collect PLC data and send to on premises server

More
1 month 4 weeks ago #92 by Tom_Contec
System overview
  • Collect PLC data vir Modbus TCP in every 1 second
  • Create CSV file for 1 minute
  • Send CSV data to on premises server in every 1 minute
  • Display current PLC data on HMI trend graph

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago - 1 month 4 weeks ago #93 by Tom_Contec
System structure

Below diagram shows virtual system structure. Modbus TCP is used for sending PLC data to CONPROSYS and HTTP is used for sending CSV file to on premises server.



Below diagram shows actual system structure. Modbus TCP simulator is used instead of PLC so that you can use this demo without PLC devices. IP address of CONPROSYS is 10.1.1.101 and 10.1.1.100 for on premises server.



CONPROSYS gateway model is necessary for this dmeo.
Attachments:
Last edit: 1 month 4 weeks ago by Tom_Contec.

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago - 1 month 4 weeks ago #94 by Tom_Contec
CONPROSYS configuration for Modbus TCP communication

Below picture shows necessary PLC configuration for CONPROSYS.



1. Link Setting

At first, click Add Link button and configure link setting. This setting is necessary to determine what kind of PLC is used, what protocol is used or register IP address or port number of PLC.


  • Link Name
  • Any strings that identifies Link setting.
  • Maker
  • PLC type. MODBUS is used in this demo.
  • Communication Method
  • PLC communication has 2 method. Modbus TCP is used in this demo so select Ethernet.
  • Format
  • TCP is set automatically.
  • Frame
  • Do not need to care when using Modbus TCP.
  • IP Address
  • Modbus simulator in on premises server is used so set IP of server PC.
  • Port Number
  • In general, 502 is used for Modbus TCP.

2. CPU Setting

Next, click Add CPU to Link and connect CPU setting to Link setting.


  • CPU name
  • Any strings that identifies CPU setting.
  • Target Link Name
  • Specify Link setting that CPU setting is connected to. Select sim in this demo.
  • CPU
  • PLC generally has some CPU categories but does not matter in the case of Modbus.
  • Station Number
  • PLC generally has station number (station ID) that identifies multiple CPUs. We use only 1 simulator in this demo so set 0.
  • Timeout (sec)
  • You can set timeout for waiting PLC's response but generally 0 is fine.
  • Retry Number
  • You can set retry number for requesting command to PLC when timeout occurs but 0 is fine since there is no timeout setting.

3. Device setting

At last, click Add device to CPU and configure PLC registers from which you want to collect data.


  • Device name
  • Any strings that identifies Device setting.
  • Target CPU Name
  • Specify CPU setting that Device setting is connected to. Select cpu in this demo.
  • Device Type
  • Select Modbus function register. InputRegister is used in this demo.
  • Start Address
  • Specify starting address of Modbus InputRegister.
  • End Address
  • Specify ending address of Modbus InputRegister. 16 words from 0 to 15 are used in this demo.
  • Modbus Address
  • Automatically assigned. PLC data is mapped to 2000H of CONPROSYS Modbus InputRegister.
  • Read/Write
  • Specify Read for collecting data from PLC.
  • Scan Interval (msec)
  • Specifying less than 1000 msec since sampling interval is 1 second.
  • Data Type
  • Assume data range from PLC is from 0 to 65535 so select Unsigned 16 bit Data.
  • Cloud Key
  • Used for identifying each data but only 1 register is used in this demo so no need to specify key.
  • Cloud Interval (sec)
  • Used for cloud sending service but this time we use VTC for sending data to server so no need to specify Cloud Interval.
Attachments:
Last edit: 1 month 4 weeks ago by Tom_Contec.

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #95 by Tom_Contec
CONPROSYS configurtion for sending data

1. Service setting


 
Data Transfer Service must be disabled if data is sent from VTC.

2. Data transfer setting


 
  • Data Transfer URL
  • Specify the endpoint of on premises server.
    In this demo we use Data collection software that can be downloaded from CONTEC website below and need to specify http://10.1.1.100/PostData.php. Details of PostData.php is explained later.
    www.contec.com/products-services/daq-con...-conprosys/software/
  • Cycle (min)
  • Specify interval time for sending data to on premises server. It hould be disabled if VTC is used instead of using Data Transfer Service.
  • CloudKey
  • You can specify unique name for CONPROSYS device. Cloud key can be referred from VTC but we don't use key in this demo.

3. NTP setting



NTP server must be specified so that CONPROSYS can use exact time stamp. This example uses local NTP server on server PC.
Attachments:
Last edit: 1 month 3 weeks ago by Tom_Contec.

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago - 1 month 2 weeks ago #96 by Tom_Contec
Installation of Data collection software

Data collection software is a free software for establishing on premises server.
You can download software from below link.(Data collector software ver.1.00)
www.contec.com/products-services/daq-con...-conprosys/software/

There is a instruction on the link above but I'll write down here too.
  1. Download Ache-php_v100.zip and extract the file to below directoly.
  2. C:\Apache22
    C:\php
  3. Run C:\Apache22\bin\httpd.exe.
  4. The first time you will get Windows Security Alert and need to allow this application for network.
  5. CONPROSYS configuration is already done.

At this moment data transfer does not begin because we use VTC instead of data transfer service. How to build VTC is explained later.
Last edit: 1 month 2 weeks ago by Tom_Contec.

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago - 1 month 2 weeks ago #104 by Tom_Contec
Modbus simulator setup

You can use any kind of Modbus TCP slave simulator and Mod_RSsim is used in this demo.
  1. Download latest version of Mod_RSsim from below link.
  2. www.plcsimulator.org/downloads
  3. Extract and run mod_RSsim.exe.
  4. The first time you will get Windows Security Alert and need to allow this application for network.
  5. Select Analogue Input (30000) from I/O list
  6. Select MODBUS TCP/IP from Port list
  7. Click Simulation icon
  8. Select Increment BYTES and set any value
  9. This setting automatically updates each register so that we can easily find changes of Modbus data.





Attachments:
Last edit: 1 month 2 weeks ago by Tom_Contec.

Please Log in or Create an account to join the conversation.

Time to create page: 0.393 seconds
Powered by Kunena Forum