private void btnSetSettings_Click(object sender, EventArgs e) { float fTempSET = 0.0F, fHumiditySET = 0.0F; short timeOut = 0; // float.TryParse(txtTempSET.Text, out fTempSET); float.TryParse(txtHumiditySET.Text, out fHumiditySET); short.TryParse(txtTimeOut.Text, out timeOut); //Update data plc.SetTimeOut(timeOut); plc.SetTempSET(fTempSET); plc.SetHumiditySET(fHumiditySET); }