Changes

Line 56: Line 56:     
Now that we have '''Modbus TCP Master''' and '''Modbus TCP Slave''' configurated, we will need to create '''Request Configuration'''. The Request configuration will be used to store the SMS message and the number of the recipient. Lastly, we will send the SMS message to the recipient with the set Command.
 
Now that we have '''Modbus TCP Master''' and '''Modbus TCP Slave''' configurated, we will need to create '''Request Configuration'''. The Request configuration will be used to store the SMS message and the number of the recipient. Lastly, we will send the SMS message to the recipient with the set Command.
To store Phone numbers and SMS messages we will use '''ASCII''' and '''HEX''' Data Types, you can configure either one of them, and both of them will work.
+
To store Phone numbers and SMS messages we will use '''ASCII''' and/or '''HEX''' Data Types, you can configure either one of them, and both of them will work.
 
----
 
----
 
So first of all, we will create a Request in which we will store the Recipient number and SMS message, we will use '''ASCII Data Type''', '''Set Multiple holding registers(16) Function''' and '''398 Register'''.
 
So first of all, we will create a Request in which we will store the Recipient number and SMS message, we will use '''ASCII Data Type''', '''Set Multiple holding registers(16) Function''' and '''398 Register'''.
Line 66: Line 66:       −
The first 10 registers are reserved for the phone number ('''1 register = 4 symbols''') additionally you will require to put in front '+' which is equal to 00 here. If your number (together with 00) does not take 10 registers we will require you to fill out the left registers with 0 values, that's why we use the '''\u0000 symbol''', which means 0 value.
+
The first 10 registers are reserved for the phone number ('''1 register = 2 symbols''') additionally you will require to put in front '+' which is equal to 00 here. If your number (together with 00) does not take 10 registers we will require you to fill out the left registers with 0 values, that's why we use the '''\u0000 symbol''', which means 0 value.
    
Here we will explore two examples, one for the ASCII data type and one for the HEX.
 
Here we will explore two examples, one for the ASCII data type and one for the HEX.
Line 82: Line 82:  
* '''00''' - + symbol
 
* '''00''' - + symbol
 
* '''3706xxx1594''' - phone number
 
* '''3706xxx1594''' - phone number
* '''\u0000\u0000\u0000\u0000\u0000\u0000\u0000''' - our number only takes up to 3 registers(4 symbols = 1 register), all other registers will be filled with 0 value
+
* '''\u0000\u0000\u0000\u0000\u0000\u0000\u0000''' - our number only takes up to 6 and a half registers(2 symbols = 1 register), all other registers will be filled with 0 value
 
* '''test''' - the message that will be sent
 
* '''test''' - the message that will be sent
  

Navigation menu