user904: I have simple code. The library downloaded from github:smarmengol/Modbus-Master-Slave-for-Arduino.
I wanted to store floating point. In the code blow, I type casted to integer value. As I know uint16_t au16data[30]; is integer 
#include <avr/wdt.h>
#include"glob.h"


#define ID   1
int8_t state = 0;
Modbus slave(ID, 0, 0);
unsigned long tempus;
// data array for modbus network sharing
uint16_t au16data[30];

void Take_Reading()
{
  for(row=0;row<9;row++)
  {
  int k=(8*array[row][0]+4*array[row][1]+2*array[row][2]+1*array[row][3]);
    digitalWrite(Enablepin,array[row][0]);
    digitalWrite(SO_enable,array[row][1]);
    digitalWrite(S1_enable,array[row][2]);
    digitalWrite(S2_enable,array[row][3]); 
   //delay(100); 
    Sensor_Value0=analogRead(A0);
    Sensor_Value1=analogRead(A5);
   Mux1_array[row]=(Sensor_Value0 * ARDUINO_ANALOG_SCALING);
   Mux2_array[row]=(Sensor_Value1 * ARDUINO_ANALOG_SCALING);

   Current_Value1[row]=  (Mux1_array[row]*40)-98;
   Current_Value2[row]=  (Mux2_array[row]*40)-98;


  }
}


void setup()
{
     wdt_enable(WDTO_8S);
   slave.begin( 9600 );
  tempus = millis() + 100;
  pinMode(3,OUTPUT);
  pinMode(SO_enable, OUTPUT) ;// pin can enable/disable using digital IO 7 of arduino
  pinMode(S1_enable, OUTPUT) ;// pin can enable/disable using digital IO 6 of arduino
  pinMode(S2_enable, OUTPUT) ;// pin can enable/disable using digital IO 5 of arduino
  pinMode(Enablepin, OUTPUT) ;// pin can enable/disable using digital IO 4 of arduino
  pinMode(A0, INPUT) ;
  pinMode(A5, INPUT) ;

//  Serial.begin(9600);
}


void loop()
{
  digitalWrite(3,HIGH);
// wdt_reset();
 Take_Reading(); 
 state = slave.poll( au16data,30 );
  if (state > 4) {
    tempus = millis() + 50;
    digitalWrite(13, HIGH);
  }
  if (millis() > tempus) digitalWrite(13, LOW );

Modbus_call();

}




void Modbus_call()
{

/*reading of coil where i can succefully read value*/
  au16data[0]=(int)Current_Value1[0];
  au16data[1]=(int)Current_Value1[1];
  au16data[2]=(int)Current_Value1[2];
  au16data[3]=(int)Current_Value1[3];
  au16data[4]=(int)Current_Value1[4];
  au16data[5]=(int)Current_Value1[5];
  au16data[6]=(int)Current_Value1[6];
  au16data[7]=(int)Current_Value1[7];
  au16data[8]=(int)Current_Value1[8]; 
  au16data[9]=(int)Current_Value2[0];
  au16data[10]=(int)Current_Value2[1];  
  au16data[11]=(int)Current_Value2[2];
  au16data[12]=(int)Current_Value2[3];
  au16data[16]=(int)Current_Value2[4];
   au16data[17]=(int)Current_Value2[5];
   au16data[18]=(int)Current_Value2[6];
   au16data[19]=(int)Current_Value2[7];
 uint16_t calcCRC( au16data[15]);
     au16data[13] = slave.getInCnt();
  au16data[14] = slave.getOutCnt();
  au16data[15] = slave.getErrCnt(); 

 }

Conversion method as below.
CS=30.10
Int_CS=int(CS)
FLOAT_CS=(Int_CS-CS)*100

How to store the Int_CS & FLOAT_CS values in au16data[0]??

I have change code accordingly.

But I get zero. After some time its values don't even show
#include <avr/wdt.h>
#include"glob.h"


#define ID   1
int8_t state = 0;
Modbus slave(ID, 0, 0);
unsigned long tempus;
// data array for modbus network sharing
uint16_t au16data[5];
float auFloatData[30];
void Take_Reading()
{
  for(row=0;row<9;row++)
  {
  int k=(8*array[row][0]+4*array[row][1]+2*array[row][2]+1*array[row][3]);
    digitalWrite(Enablepin,array[row][0]);
    digitalWrite(SO_enable,array[row][1]);
    digitalWrite(S1_enable,array[row][2]);
    digitalWrite(S2_enable,array[row][3]); 
   //delay(100); 
    Sensor_Value0=analogRead(A0);
    Sensor_Value1=analogRead(A5);
   Mux1_array[row]=(Sensor_Value0 * ARDUINO_ANALOG_SCALING);
   Mux2_array[row]=(Sensor_Value1 * ARDUINO_ANALOG_SCALING);

   Current_Value1[row]=  (Mux1_array[row]*40)-98;
   Current_Value2[row]=  (Mux2_array[row]*40)-98;


  }
}


void setup()
{
     wdt_enable(WDTO_8S);
   slave.begin( 9600 );
  tempus = millis() + 100;
  pinMode(3,OUTPUT);
  pinMode(SO_enable, OUTPUT) ;// pin can enable/disable using digital IO 7 of arduino
  pinMode(S1_enable, OUTPUT) ;// pin can enable/disable using digital IO 6 of arduino
  pinMode(S2_enable, OUTPUT) ;// pin can enable/disable using digital IO 5 of arduino
  pinMode(Enablepin, OUTPUT) ;// pin can enable/disable using digital IO 4 of arduino
  pinMode(A0, INPUT) ;
  pinMode(A5, INPUT) ;

//  Serial.begin(9600);
}


void loop()
{
  digitalWrite(3,HIGH);
// wdt_reset();
 Take_Reading(); 
 state = slave.poll( au16data,5 );
  if (state > 4) {
    tempus = millis() + 50;
    digitalWrite(13, HIGH);
  }
  if (millis() > tempus) digitalWrite(13, LOW );

Modbus_call();

}




void Modbus_call()
{

/*reading of coil where i can succefully read value*/
  auFloatData[20]=Current_Value1[0];
  auFloatData[21]=Current_Value1[1];
  auFloatData[22]=Current_Value1[3];
  auFloatData[4]=Current_Value1[4];
  auFloatData[5]=Current_Value1[5];
  auFloatData[6]=Current_Value1[6];
  auFloatData[7]=Current_Value1[7];
  auFloatData[8]=Current_Value1[8]; 
  auFloatData[9]=Current_Value2[0];
  auFloatData[10]=Current_Value2[1];  
  auFloatData[11]=Current_Value2[2];
  auFloatData[12]=Current_Value2[3];
  auFloatData[16]=Current_Value2[4];
   auFloatData[17]=Current_Value2[5];
   auFloatData[18]=Current_Value2[6];
   auFloatData[19]=Current_Value2[7];
uint16_t calcCRC( au16data[3]);
     au16data[1] = slave.getInCnt();
  au16data[2] = slave.getOutCnt();
  au16data[3] = slave.getErrCnt(); 

 }


user3866: 
Sizes

Integer Types (int, long and long long)
Size of Boolean type is 1 byte(s)
Number of bits in a character: 8
Size of character types is 1 byte
Signed char min: -128 max: 127
Unsigned char min: 0 max: 255
Default char is unsigned
Size of short int types is 2 bytes
Signed short min: -32768 max: 32767
Unsigned short min: 0 max: 65535
Size of int types is 4 bytes
Signed int min: -2147483648 max: 2147483647
Unsigned int min: 0 max: 4294967295
Size of long int types is 4 bytes
Signed long min: -2147483648 max: 2147483647
Unsigned long min: 0 max: 4294967295
Size of long long types is 8 bytes
Signed long long min: -9223372036854775808 max: 9223372036854775807
Unsigned long long min: 0 max: 18446744073709551615
Note that int and long are the same size and if you want a 64 bit integer then you need to use long long (or unsigned long long).

What do you want to achieve with 

.
CS=30.10 // 30.10
Int_CS=int(CS) // 30
FLOAT_CS = (Int_CS-CS)*100 //-10.00 because 30 - 30.10 = -0.1 and -0.1 * 100 = -10.00

CS is already float, why you want to convert it to int and back to float? If value of int is higher than 255 you have to save it in 2 bytes(highByte and lowByte), float is 32bit(4bytes) value.
I think you have to do like this:
float CS = 30.10;
au16data[0]= (int)(CS*100);//3010.00 > 3010

And for better way use :
float auFloatData[30]; // 
...
auFloatData[0]=Current_Value1[0];


904: 

<p>I have simple code. The library downloaded from <a href="https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino" rel="nofollow noreferrer">github:smarmengol/Modbus-Master-Slave-for-Arduino</a>.</p>

<p>I wanted to store floating point. In the code blow, I type casted to integer value. As I know <code>uint16_t au16data[30];</code> is integer </p>

<pre class="lang-C++ prettyprint-override"><code>#include &lt;avr/wdt.h&gt;
#include"glob.h"


#define ID   1
int8_t state = 0;
Modbus slave(ID, 0, 0);
unsigned long tempus;
// data array for modbus network sharing
uint16_t au16data[30];

void Take_Reading()
{
  for(row=0;row&lt;9;row++)
  {
  int k=(8*array[row][0]+4*array[row][1]+2*array[row][2]+1*array[row][3]);
    digitalWrite(Enablepin,array[row][0]);
    digitalWrite(SO_enable,array[row][1]);
    digitalWrite(S1_enable,array[row][2]);
    digitalWrite(S2_enable,array[row][3]); 
   //delay(100); 
    Sensor_Value0=analogRead(A0);
    Sensor_Value1=analogRead(A5);
   Mux1_array[row]=(Sensor_Value0 * ARDUINO_ANALOG_SCALING);
   Mux2_array[row]=(Sensor_Value1 * ARDUINO_ANALOG_SCALING);

   Current_Value1[row]=  (Mux1_array[row]*40)-98;
   Current_Value2[row]=  (Mux2_array[row]*40)-98;


  }
}


void setup()
{
     wdt_enable(WDTO_8S);
   slave.begin( 9600 );
  tempus = millis() + 100;
  pinMode(3,OUTPUT);
  pinMode(SO_enable, OUTPUT) ;// pin can enable/disable using digital IO 7 of arduino
  pinMode(S1_enable, OUTPUT) ;// pin can enable/disable using digital IO 6 of arduino
  pinMode(S2_enable, OUTPUT) ;// pin can enable/disable using digital IO 5 of arduino
  pinMode(Enablepin, OUTPUT) ;// pin can enable/disable using digital IO 4 of arduino
  pinMode(A0, INPUT) ;
  pinMode(A5, INPUT) ;

//  Serial.begin(9600);
}


void loop()
{
  digitalWrite(3,HIGH);
// wdt_reset();
 Take_Reading(); 
 state = slave.poll( au16data,30 );
  if (state &gt; 4) {
    tempus = millis() + 50;
    digitalWrite(13, HIGH);
  }
  if (millis() &gt; tempus) digitalWrite(13, LOW );

Modbus_call();

}




void Modbus_call()
{

/*reading of coil where i can succefully read value*/
  au16data[0]=(int)Current_Value1[0];
  au16data[1]=(int)Current_Value1[1];
  au16data[2]=(int)Current_Value1[2];
  au16data[3]=(int)Current_Value1[3];
  au16data[4]=(int)Current_Value1[4];
  au16data[5]=(int)Current_Value1[5];
  au16data[6]=(int)Current_Value1[6];
  au16data[7]=(int)Current_Value1[7];
  au16data[8]=(int)Current_Value1[8]; 
  au16data[9]=(int)Current_Value2[0];
  au16data[10]=(int)Current_Value2[1];  
  au16data[11]=(int)Current_Value2[2];
  au16data[12]=(int)Current_Value2[3];
  au16data[16]=(int)Current_Value2[4];
   au16data[17]=(int)Current_Value2[5];
   au16data[18]=(int)Current_Value2[6];
   au16data[19]=(int)Current_Value2[7];
 uint16_t calcCRC( au16data[15]);
     au16data[13] = slave.getInCnt();
  au16data[14] = slave.getOutCnt();
  au16data[15] = slave.getErrCnt(); 

 }
</code></pre>

<p>Conversion method as below.</p>

<pre class="lang-C++ prettyprint-override"><code>CS=30.10
Int_CS=int(CS)
FLOAT_CS=(Int_CS-CS)*100
</code></pre>

<p>How to store the <code>Int_CS</code> &amp; <code>FLOAT_CS</code> values in <code>au16data[0]</code>??</p>

<hr>

<p>I have change code accordingly.</p>

<p><a href="https://i.stack.imgur.com/Nd4WO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nd4WO.jpg" alt="Output file"></a></p>

<p>But I get zero. After some time its values don't even show</p>

<pre class="lang-C++ prettyprint-override"><code>#include &lt;avr/wdt.h&gt;
#include"glob.h"


#define ID   1
int8_t state = 0;
Modbus slave(ID, 0, 0);
unsigned long tempus;
// data array for modbus network sharing
uint16_t au16data[5];
float auFloatData[30];
void Take_Reading()
{
  for(row=0;row&lt;9;row++)
  {
  int k=(8*array[row][0]+4*array[row][1]+2*array[row][2]+1*array[row][3]);
    digitalWrite(Enablepin,array[row][0]);
    digitalWrite(SO_enable,array[row][1]);
    digitalWrite(S1_enable,array[row][2]);
    digitalWrite(S2_enable,array[row][3]); 
   //delay(100); 
    Sensor_Value0=analogRead(A0);
    Sensor_Value1=analogRead(A5);
   Mux1_array[row]=(Sensor_Value0 * ARDUINO_ANALOG_SCALING);
   Mux2_array[row]=(Sensor_Value1 * ARDUINO_ANALOG_SCALING);

   Current_Value1[row]=  (Mux1_array[row]*40)-98;
   Current_Value2[row]=  (Mux2_array[row]*40)-98;


  }
}


void setup()
{
     wdt_enable(WDTO_8S);
   slave.begin( 9600 );
  tempus = millis() + 100;
  pinMode(3,OUTPUT);
  pinMode(SO_enable, OUTPUT) ;// pin can enable/disable using digital IO 7 of arduino
  pinMode(S1_enable, OUTPUT) ;// pin can enable/disable using digital IO 6 of arduino
  pinMode(S2_enable, OUTPUT) ;// pin can enable/disable using digital IO 5 of arduino
  pinMode(Enablepin, OUTPUT) ;// pin can enable/disable using digital IO 4 of arduino
  pinMode(A0, INPUT) ;
  pinMode(A5, INPUT) ;

//  Serial.begin(9600);
}


void loop()
{
  digitalWrite(3,HIGH);
// wdt_reset();
 Take_Reading(); 
 state = slave.poll( au16data,5 );
  if (state &gt; 4) {
    tempus = millis() + 50;
    digitalWrite(13, HIGH);
  }
  if (millis() &gt; tempus) digitalWrite(13, LOW );

Modbus_call();

}




void Modbus_call()
{

/*reading of coil where i can succefully read value*/
  auFloatData[20]=Current_Value1[0];
  auFloatData[21]=Current_Value1[1];
  auFloatData[22]=Current_Value1[3];
  auFloatData[4]=Current_Value1[4];
  auFloatData[5]=Current_Value1[5];
  auFloatData[6]=Current_Value1[6];
  auFloatData[7]=Current_Value1[7];
  auFloatData[8]=Current_Value1[8]; 
  auFloatData[9]=Current_Value2[0];
  auFloatData[10]=Current_Value2[1];  
  auFloatData[11]=Current_Value2[2];
  auFloatData[12]=Current_Value2[3];
  auFloatData[16]=Current_Value2[4];
   auFloatData[17]=Current_Value2[5];
   auFloatData[18]=Current_Value2[6];
   auFloatData[19]=Current_Value2[7];
uint16_t calcCRC( au16data[3]);
     au16data[1] = slave.getInCnt();
  au16data[2] = slave.getOutCnt();
  au16data[3] = slave.getErrCnt(); 

 }
</code></pre>
 3866: <ol>
<li>Sizes</li>
</ol>

<p><a href="http://developer.mbed.org/users/mbed714/notebook/integer-types-int-long-and-long-long/" rel="nofollow">Integer Types (int, long and long long)</a></p>

<p>Size of Boolean type is 1 byte(s)</p>

<p>Number of bits in a character: 8
Size of character types is 1 byte
Signed char min: -128 max: 127
Unsigned char min: 0 max: 255
Default char is unsigned</p>

<p>Size of short int types is 2 bytes
Signed short min: -32768 max: 32767
Unsigned short min: 0 max: 65535</p>

<p>Size of int types is 4 bytes
Signed int min: -2147483648 max: 2147483647
Unsigned int min: 0 max: 4294967295</p>

<p>Size of long int types is 4 bytes
Signed long min: -2147483648 max: 2147483647
Unsigned long min: 0 max: 4294967295</p>

<p>Size of long long types is 8 bytes
Signed long long min: -9223372036854775808 max: 9223372036854775807
Unsigned long long min: 0 max: 18446744073709551615
Note that int and long are the same size and if you want a 64 bit integer then you need to use long long (or unsigned long long).</p>

<ol start="2">
<li>What do you want to achieve with </li>
</ol>

<p>.</p>

<pre><code>CS=30.10 // 30.10
Int_CS=int(CS) // 30
FLOAT_CS = (Int_CS-CS)*100 //-10.00 because 30 - 30.10 = -0.1 and -0.1 * 100 = -10.00
</code></pre>

<p>CS is already float, why you want to convert it to int and back to float? If value of int is higher than 255 you have to save it in 2 bytes(highByte and lowByte), float is 32bit(4bytes) value.</p>

<p>I think you have to do like this:</p>

<pre><code>float CS = 30.10;
au16data[0]= (int)(CS*100);//3010.00 &gt; 3010
</code></pre>

<p>And for better way use :</p>

<pre><code>float auFloatData[30]; // 
...
auFloatData[0]=Current_Value1[0];
</code></pre>
