This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Integration object from ETS
#1
I am integrating some GDB181 Vavs from SIEMENS. To write the Vmin and Vmax the value is written in % and the object is 08.010 percentage difference.
Lets say for example value is 15% in Vmin of the Vnom. 

But when the value comes to the Lm5 its a 2 byte signed integer and the value is 1500. Whats the correct way to get this  corrected?
Reply
#2
You can make the conversion via a script. Create a virtual object via 4 byte floating point data type. Use this object for control/display.

In this example source 2 byte object is 1/1/1 and virtual object is 32/1/1. Change as needed.

Attach an event script to virtual object (32/1/1):
Code:
-- do nothing if triggered by another event script
if event.sender ~= 'se' then
  value = event.getvalue()
  grp.write('1/1/1', value * 100)
end

Then attach another event script to source object (1/1/1):
Code:
-- do nothing if triggered by another event script
if event.sender ~= 'se' then
  value = event.getvalue()
  grp.write('32/1/1', value / 100)
end
Reply


Forum Jump: