Send Register Values to Internet
Jump to navigation Jump to search
What You Need to Know Before Design
- Modbus TCP protocol to read and change the word register value via GSM communication.
- In the above picture with the online monitoring screen image, the word register data with the modbus address 4000 is read via GSM communication.
- PLC device was arranged server and slave, for GSM connection .
- The server was selected from the TCP socket block and written as listening port 502. The IP filter is not defined because the connection is requested from any IP address. If only one IP was to be connected, an IP filter would have to be specified.
- The Modbus ID number is determined by the Modbus TCP slave block contents. Modbus slave address will allow communication with multiple slave terminals.
- In order to provide GSM connection, firstly Mikroterminal is opened in Tools section in Mikrodiagram. CSQ, CONNECTION and GPRSIP interrogation must be performed after the APN description is made.
- If the data line used has a static IP address, the APN number that can be learned from the GSM operator must be entered correctly. For example, if the APN address of the GSM operator is 'mgbs', then the AT+GPRSAPN command is typed as 'mgbs' and the write button is pressed.
- To read the quality of the GSM line, press the read button on the AT + CSQ command line. In the example, the CSQ value is read as between 16 and 20. This value indicates that there is enough attraction power to make the connection.
- After starting the GSM line, AT+CONNECTION=? command is sent. If the command reply is '6', GPRS IP is received. AT+GPRSIP=? command is sent to find out the IP address, the device is connected.