public bool CalibrationPreloadCapacityTest(Behavior behavior) { double preload = 1; double capacity = 2; double testdPreload = 0; double testdNominalLoad = 0; int testIntPreload = 0; int testIntNominalLoad = 0; double multiplierMv2D = 1000000; // 2 / 1000000; // 2mV/V correspond 1 million digits (d) _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _dseObj = new DSEJet(_jetTestConnection, 200, Update); _dseObj.Connect(this.OnConnect, 100); _dseObj.CalculateAdjustment(preload, capacity); testdPreload = preload * multiplierMv2D; testdNominalLoad = testdPreload + (capacity * multiplierMv2D); testIntPreload = Convert.ToInt32(testdPreload); testIntNominalLoad = Convert.ToInt32(testdNominalLoad); if ( _jetTestConnection.ReadIntegerFromBuffer(JetBusCommands.LDWZeroValue) == testIntPreload && _jetTestConnection.ReadIntegerFromBuffer(JetBusCommands.LWTNominalValue) == testIntNominalLoad ) { return(true); } else { return(false); } }