glaw54 Posted March 1, 2017 Share Posted March 1, 2017 Hi Guru We are trying to calculate the volume of a horizontal tank from the height of the liquid in Daqfactory. I started off with the following simple sequence; global x=0 global h=950 global R=950 While(1) x= 5700 * (R * R * ACos(((R - h)/ R)) - (R - h) * (2 * R * h - h * h)^.5) ?Floor(x/1000000) delay(5) endwhile The sequence initially runs fine (the dimensions are in millimeters, it is a 1600 ltr tank with a radius of 950mm and the fuel height is 950mm ie: its half full and the formula returns 8000 Ltrs. but after 3 or four loops it returns NotaNumber continuously. I am sure its is something simple but why should an identical loop run OK and then change its output. ? Thanks for your help. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.