title: Converting real data type from Siemens PLC (S7-1200) to be displayed in Visual C# Windows Form
body: <p>I am trying to read a real value from a Siemens PLC (S7-1200) and display it in Windows Form. I am using the S7.NET library to communicate with the PLC and a TIA Portal V15 to program/Monitor the PLC.</p>
  
  <p>I am able to read the particular data block (<strong>DB3.DBD0</strong>) in the Windows Form from the PLC, it does return a value, but the value is displayed in some other format. For example, if I modify the value in <strong>DB3.DBD0</strong> to "2.22", it gives me "1.074665+09". I would like it to return the same value as in the TIA Portal which is "2.22".</p>
  
  <p>Below is the code I am using to convert the values.</p>
  
  <pre class="lang-vb prettyprint-override"><code>object real0 = Convert.ToSingle(plc.Read("DB3.DBD0"));
  label43.Text = real0.ToString();
  </code></pre>
  
  <p>If my question is not clear, please let me know, I can try to explain in more detail.</p>
  
  <p>Thank you in advance!</p>