Suchen Sie etwas anderes?
Scenario details:
- Although MTX-Tunnel allows independent readings from ModBus devices to be made, we consider a PLC being the master in a MODBUS communication with a network of meters
- The PLC only allows the use of the MODBUS protocol and we want to be able to send some data from the meters to a central server
- To do so the PLC will consider the MTX-Tunnel as any other modbus (slave) device, with an address @100. That is, the MTX-Tunnel must not send, via GPRS, all the traffic of bus RS485 (that is, not all the traffic between the control PLC and the meters), but only the frames going to the address @100, so the central server will receive only that data
- The communication must be made in TCP Client mode, i.e., the MTX-Tunnel must be connected in client mode against the IP server (200.1.2.3) and the TCP port 20010
Solution: MTX-Tunnel firmware + MTX-Java-IoT/MTX-Java-T/MTX-Java-T2
EXAMPLE of settings (file config.txt) for this scenario:
Configuration | Observations |
COMM_baudrate: 9600 COMM_bitsperchar: 8 COMM_autocts: off COMM_autorts: off COMM_stopbits: 1 COMM_parity: none GPRS_apn: movistar.es GPRS_login: MOVISTAR GPRS_password: MOVISTAR GPRS_timeout: 0 MTX_PIN: 0000 MTX_mode: client MTX_model: MTX-4G-JAVA-T MTX_ping: 35 MTX_pingIP: 8.8.8.8 MTX_radioBand: europe MTX_filter: 100 MTX_msToSend: 200 TCP_IP: 200.1.2.3 TCP_port: 20010 |
Serial port baud rate 8 bit data No flow control No flow control 1 stop bit No parity GPRS APN by GSM operator GPRS Login GPRS Password GPRS connection is active 100% of time If SIM card does not have PIN, leave as 0000 Working mode is TCP client MTX model Ping every 35 minutes without comms IP address to ping Not necessary if the MTX is installed in Europe Only frames beginning by byte 100 will be sent Minimum stop with no data to be a new frame IP of the server the MTX-Tunnel will connect to Minimum stop with no data to be a new frame |
Details:
- In a MODBUS frame the first byte is the address. Therefore, when specifying the value 100in the MTX_filter parameter, only the frames beginning with 100 will be sent to the central server.
- If, for example, we want to resend to the server only the frames whose modbus command is the write command (0x10), since this command is the second byte in a modbus frame, the parameter MTX_filter will have to be: MTX_filter: 100,16 (100 corresponding to the modbus address 100 and 16 to the decimal value of the 0x10 command)