So he wrote about the receiving modbus rtu data - program, read the 50 registers, return to get a 100 byte [] array of bytes,
Converted to a string can be seen after every two bytes is a hexadecimal data, how do I want to decimal conversion?
Then I'm going to finish this 50 data into a mysql database is should direct deposit byte array is converted to a string to save?
CodePudding user response:
With the flow (binary) storage is better, the efficiency is high, decimal and hexadecimal values are the same,Byte a=0 x69;
String s;
S=(a) (int). The ToString ();
S=(a) (int). ToString (" x ");
Only you feel different, depends on the actual value