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.

Master Slave with LM5
#1
Hello,

In my project, I have an LM5 as the Master and another as the Slave.
The Slave is intended to switch on if the connection to the Master fails. Both should perform the same function.
I have KNX, DALI, BACnet, and Modbus communication.

Is there a way for the Slave to only activate when the connection to the Master has failed?
The Slave should, however, always listen in on all communications so that it is up-to-date in case of a Master failure.

Thank you very much for your help.
Reply
#2
Can you provide more info how the DALI, BACnet and modbus is done?
------------------------------
Ctrl+F5
Reply
#3
(Yesterday, 11:21)Daniel Wrote: Can you provide more info how the DALI, BACnet and modbus is done?

KNX sensors control the lighting via DALI. In the event of a failure, the second LM should take over the control and visualization.

The LM communicates with the Schneider Gateway via BACnet. Modbus is used for communication with field devices.

In case of a Master LM failure, everything should continue to operate via the Slave LM. Sensor values are visualized.
Reply
#4
the DALI - is it KNX DALI gateway?
LM communicates with the Schneider Gateway via BACnet - what do you mean here? Is LM bacnet server or client?
Modbus - is it RTU or IP?
Two LMs can't have same IP so in any case this will need to be manually switched to new url.
------------------------------
Ctrl+F5
Reply
#5
(Yesterday, 12:42)Daniel Wrote: the DALI - is it KNX DALI gateway?
LM communicates with the Schneider Gateway via BACnet - what do you mean here? Is LM bacnet server or client?
Modbus - is it RTU or IP?
Two LMs can't have same IP so in any case this will need to be manually switched to new url.

DALI is controlled via a KNX DALI gateway.
The LM communicates with the Schneider gateway via BACnet, where the LM acts as the BACnet server.
Modbus communication is over RTU.
The two LMs will be assigned different IP addresses.
In the event of a master LM failure, the slave LM must automatically take over control.
Reply
#6
OK so we don't care about DALI as for LM it is a KNX anyway

You can connect two LMs to the same TP but you must change multicast on one of them to avoid loops. You could disable KNX IP if it is not needed.
Bacnet IP can be enabled/disabled like this:
Code:
-- disable
os.execute('uci set bacnet.server.enabled=0 && uci commit bacnet &&
/etc/init.d/bacnet stop')

-- enable
os.execute('uci set bacnet.server.enabled=1 && uci commit bacnet &&
/etc/init.d/bacnet start')

The client most likely well cache the IP and it might not work straight on, it should expire after some time.

Modbus RTU, if you have both enabled at the same time nothing will work,
Use this event script to emulate a web request to enable/disable RTU. Attach it to a boolean object. 
Code:
value = event.getvalue()

require('uci')
require('json')

function getvar()
  return 'config-save'
end

function json.data()
  return { enabled = value }
end

dofile('/lib/genohm-scada/plugins/modbus/web.lua')

You need to create a script which will monitor if main LM is al live and if not apply the above. An example here but you need to be careful, If LM is still working and you enable both then modbus will not work and probably bacnet too.

https://openrb.com/master-slave-logicmachine/

See also this
https://forum.logicmachine.net/showthrea...8#pid10348
------------------------------
Ctrl+F5
Reply


Forum Jump: