Logic Machine Forum
Delta DVP - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Delta DVP (/showthread.php?tid=962)



Delta DVP - Demus - 24.08.2017

Hi! 
I don't have any experience with Lm. But there is a device on the Modbus to link LM. Please help in creating a profile for the survey of inputs, outputs, and data registers. Map Delta DVP registers and Protocol description for them I've attached.
Thanks in advance for your help in the study of Lm.
   
.doc   DVP_ communication Protocol.doc (Size: 388.5 KB / Downloads: 7)



RE: Delta DVP - admin - 24.08.2017

Does it support Modbus RTU? Have you tried communicating with it using RTU read test? From the supplied documentation it seems that PLC uses Modbus ASCII which is not supported by the Modbus mapper.


RE: Delta DVP - Erwin van der Zwart - 24.08.2017

Hi,

Delta has there own protocol to a IP gateway, this gateway uploads data to the Delta Cloud Service and there is no API.

What i have done before is reading the Delta gateway's HTTP pages to get the data from it.

It's written for our HVAC SmartStruxure Lite controller, also LUA but it should be easy to port to the LM controller format.

Code:
-- ******** Delta Solivia GW -> MPM module version 1.0 created by Erwin van der Zwart ******** 2015-12-10 ******** --
 
if not init then
 -- Import libraries
 require ("http")
 
 -- Set timout for max wait time on HTTP response
 http.TIMEOUT = 15
 
 -- Delta Solivia GW Settings
 IP_Address = '192.168.10.207'
 UserName = 'admin'
 PassWord = 'Schneider'
 
 -- MPM objects
 var("Absolute_Maximum_In_We_Object", "ME.AV44")
 var("Percentage_Of_Nominal_Power_Object", "ME.AV45")
 
 -- End init
 init = true
else

    -- Login before requesting data
    if not login then  
      response = http.request('http://' .. IP_Address .. '/LoginCgi?ed_user=' .. UserName .. '&pw1=' .. PassWord .. '&logIn=Log+in')
      -- Check if Response = successfully completed
      for i in string.gmatch(response, '<body><br><h2 align="left"><font color="#339900">.-</font>') do
        if i ~= nil then
          responsestring =  i:match([[color="#339900">(.-)</]])
          --print(responsestring)
        end
      end
      if responsestring == 'Operation successfully completed!' then
        print('Login procedure ready, getting values..')
        login = true
      end
    else
      -- Get data from webservice
      local data = http.request('http://' .. IP_Address .. '/Unbalanced.htm')
      
      --print(data)
      
      -- Check if data is received
      if not data then
        print('No data found.. , restarting procedure to try again..')
        login = nil
        return
      end
      
      -- Check if login is handled correct
      for i in string.gmatch(data, '<h2>.-</h2>') do
        if i ~= nil then
          login_asked = i:match([[<h2>(.-)</h2>]])
          if login_asked == 'Please log in' then
            print('Login not ready or logged out, system will try to login again..')
            login = nil
            return
          end
        end
      end
      
      -- Power Balancing
      for i in string.gmatch(data, '<input type="text".-</p>') do
        if i ~= nil then
          --print(i)
          
          absolute_maximum_in_We = i:match([[name="t1" value="(.-)"]])
          if absolute_maximum_in_We then
           Absolute_Maximum_In_We_Object = absolute_maximum_in_We
            print('Absolute maximum in We = ' .. absolute_maximum_in_We)
          end
          
          percentage_of_nominal_power = i:match([[name="t2" value="(.-)"]])
          if percentage_of_nominal_power then
           Percentage_Of_Nominal_Power_Object = percentage_of_nominal_power
            print('Percentage of nominal power = ' .. percentage_of_nominal_power)
          end
        end
      end

      -- Add extra data pagefields here...
 end --End Login
end -- End init

BR,

Erwin


RE: Delta DVP - Demus - 25.08.2017

(24.08.2017, 17:42)admin Wrote: Does it support Modbus RTU? Have you tried communicating with it using RTU read test? From the supplied documentation it seems that PLC uses Modbus ASCII which is not supported by the Modbus mapper.

Yes, Modbus rtu is supported. He included me in the PLC. Test to read from register LM is successful. I have difficulties to describe the profile line to read for example the register D0 at the address 4096.
With this option the register is not read. Don't understand what the problem is.

 { "name": "Input 1", "bus_datatype": "float16", "type": "inputregister", "address": 4096, "value_multiplier": 0.001, "units": "V" },

    { "name": "Input 2", "bus_datatype": "float16", "type": "inputregister", "address": 4096, "value_multiplier": 0.001, "units": "V" },

(24.08.2017, 21:43)Erwin van der Zwart Wrote: Hi,

Delta has there own protocol to a IP gateway, this gateway uploads data to the Delta Cloud Service and there is no API.

What i have done before is reading the Delta gateway's HTTP pages to get the data from it.

It's written for our HVAC SmartStruxure Lite controller, also LUA but it should be easy to port to the LM controller format.

Code:
-- ******** Delta Solivia GW -> MPM module version 1.0 created by Erwin van der Zwart ******** 2015-12-10 ******** --
 
if not init then
 -- Import libraries
 require ("http")
 
 -- Set timout for max wait time on HTTP response
 http.TIMEOUT = 15
 
 -- Delta Solivia GW Settings
 IP_Address = '192.168.10.207'
 UserName = 'admin'
 PassWord = 'Schneider'
 
 -- MPM objects
 var("Absolute_Maximum_In_We_Object", "ME.AV44")
 var("Percentage_Of_Nominal_Power_Object", "ME.AV45")
 
 -- End init
 init = true
else

    -- Login before requesting data
    if not login then  
      response = http.request('http://' .. IP_Address .. '/LoginCgi?ed_user=' .. UserName .. '&pw1=' .. PassWord .. '&logIn=Log+in')
      -- Check if Response = successfully completed
      for i in string.gmatch(response, '<body><br><h2 align="left"><font color="#339900">.-</font>') do
        if i ~= nil then
          responsestring =  i:match([[color="#339900">(.-)</]])
          --print(responsestring)
        end
      end
      if responsestring == 'Operation successfully completed!' then
        print('Login procedure ready, getting values..')
        login = true
      end
    else
      -- Get data from webservice
      local data = http.request('http://' .. IP_Address .. '/Unbalanced.htm')
      
      --print(data)
      
      -- Check if data is received
      if not data then
        print('No data found.. , restarting procedure to try again..')
        login = nil
        return
      end
      
      -- Check if login is handled correct
      for i in string.gmatch(data, '<h2>.-</h2>') do
        if i ~= nil then
          login_asked = i:match([[<h2>(.-)</h2>]])
          if login_asked == 'Please log in' then
            print('Login not ready or logged out, system will try to login again..')
            login = nil
            return
          end
        end
      end
      
      -- Power Balancing
      for i in string.gmatch(data, '<input type="text".-</p>') do
        if i ~= nil then
          --print(i)
          
          absolute_maximum_in_We = i:match([[name="t1" value="(.-)"]])
          if absolute_maximum_in_We then
           Absolute_Maximum_In_We_Object = absolute_maximum_in_We
            print('Absolute maximum in We = ' .. absolute_maximum_in_We)
          end
          
          percentage_of_nominal_power = i:match([[name="t2" value="(.-)"]])
          if percentage_of_nominal_power then
           Percentage_Of_Nominal_Power_Object = percentage_of_nominal_power
            print('Percentage of nominal power = ' .. percentage_of_nominal_power)
          end
        end
      end

      -- Add extra data pagefields here...
 end --End Login
end -- End init

BR,

Erwin

I think you are on the other controllers speak. I'm working with this on rs-485. 
http://www.deltaww.com/Products/CategoryListT1.aspx?CID=060301&PID=253&hl=en-US&Name=DVP-SS2%20Series


RE: Delta DVP - admin - 25.08.2017

Try changing type to "register"


RE: Delta DVP - Demus - 25.08.2017

(25.08.2017, 06:49)admin Wrote: Try changing type to "register"

Thank you very much! Works!

One more question. Can I one and the same port to use for the survey using a script and using the profile? Devices are polled different.


RE: Delta DVP - admin - 25.08.2017

Yes, but modbus proxy functions must be used, see this post for more info: https://forum.logicmachine.net/showthread.php?tid=387&pid=1953#pid1953