Tanks Barrels in Wonderware

  • Thread starter Engelberth Rodriguez
  • Start date

Thread Starter

Engelberth Rodriguez

Hello List, I'll apreciate your help on this: I have a Wonderware Intouch application reading level data from several tanks. This data it's been received in meters (mts). My client wants that the HMI shows this data in Barrels. The conversion is not lineal and every tank have a Strepping Data Table and I have to base my calculations on this table. Is there some way of scripting inWonderware Intouch to do that? Knowing that Intouch doesn't have (as far as I know) a SELECT CASE programming sentence or something like that? Any help will be appreciated, Engelbert Rodriguez Projects Engineer REELVENSA Venezuela

Jean-Michel Blais

Hi, You can try to program the logic needed to do the conversion in a condition script (or application script if you need continuous monitoring). I don't think you have the "CASE" instruction available but you can probably do the same thing with a series of "IF" instructions. Hope you find a way to do it as you want.

Steve Monnet

Hi all, Maybe you can solve your problem not by using special function in InTouch application but by turning the problem in a more suitable one. In fact the volume of huge tank is not linear in function of the level of the liquid contained (that the reason of the STrepping Data Table). but for a normal use (mean not an official use) of the value you can found a function (in general like V=a+L*b+L^2*c) interpoling the table. As example you can use the regression function of Microsoft Excel to define parameters a,b and c. You can implement the function in a data change script (looking for a change of the value of the I/O tag) which calculate the volume in barrels and store this value in a memory analog tag. For what concern the SELECT CASE programming sentence, I confirm that it is not (yet ?) implemented into InTouch. Best regards S.Monnet

Engelberth Rodriguez

Thank you for your help. Yes, I did it with a series of "IF" instructions. It took me a lot of time but now it's done I hope it works well on plant. Regards, Engelbert Rodriguez

Bernard van der Nest

Not sure if this will help as you did not attach much technical detail. 1. Simple data conversion can be done in InTouch scripting, however you are limited to the data types you can use in InTouch scripts. 2. You can write an ActiveX control and place it onto a InTouch window not visable on your "Main" window. Then you have a choice of VC++ or VB to do the conversions, keeping in mind that the result have to be written back to an InTouch tag. 3. Have a look at the Wonerware InTouch IDEA - InTouch Extensibility Toolkit. This will allow you to extract and write to almost anything in the InTouch runtime database and Tag database. Regards, Bernard