T
T
Teemon2014-10-18 13:00:08
Automation
Teemon, 2014-10-18 13:00:08

Are there software systems/libraries to back up the work of 2 PCs?

Good afternoon.
I am considering smart home systems "for myself".
Since the "machine operator" himself, he was convinced that "control" should be implemented in the PLC, and the interaction interface, etc. - at least on anything (on a PC).
Gradually I come to the conclusion that after all, you can get by with a PC as a "brain" and a signal processor.
Still, you can buy nettops for 10,000 rubles a piece, i.e. 2 nettops - 20,000 rubles, the approximate price of an approximate controller. By organizing redundancy, we can achieve acceptable reliability (for home use) with a bunch of additional functionality.
I plan to use Modbus boards as I/O boards. On Aliexpress I ordered the cheapest one for 1500 rubles - 8 inputs 4 outputs. The price of the channel is simply ridiculous.
For tests, I began to use the library in C # - slave devices seem to be interrogated normally, i.e. "access to the body" is.
Attention to the question: if I want to organize a control core on a PC, then how can I provide for redundancy of this PC, i.e. provide for hardware and software redundancy of the PC itself.
Those. in case of failure of the first PC (program crash, freeze, blue screen, etc.), make sure that the second PC starts up.
In the case of working with Modbus, several implementations can be made per channel, as it seems to me. For example:
1. Both PCs hang on RS485, 1st PC Master, 2nd PC Slave, all I/O boards are always Slaves. The master during operation sends a write command to the register of the PC-Slave. The PC slave monitors incoming write commands. If there is no record from the master for more than XX seconds, it means an accident, the PC-Slave becomes the master. Problem: As soon as PC#2 becomes a slave, if PC#1 suddenly recovers, then there will be 2 Masters on the network, which is unacceptable.
2. Programmatically, the 1st PC sends a command to the port, "lifebit", via Ethernet to the 2nd PC. The logic is the same as above. If there is no lifebeat, then the second one becomes the "Master".
3. Function "synchronization" between "servers".
Attention to the question: has anyone made similar solutions, maybe there are libraries for implementing such features?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BuddhaSugata, 2019-04-05
@BuddhaSugata

I don’t know such libraries, but someone has them anyway))
I would physically untie the 485th (Modbus RTU) through two relays - I did it at the setup, though I replaced the slaves with the master. In this case, both PCs will be masters, but one of them will not be visible on the network. Between themselves, I would synchronize the state of the masters via Ethernet, and to control the relay, two options arise: a separate controller with ethernet and DO, in which “livebit” is written, in fact, an AVR controller - this is how electricians do it; or, if possible, fix the absence of the master on the modbus board and issue DO to rearrange the relay.

A
Alexander Skusnov, 2019-10-17
@AlexSku

1) You can take one PC and a raid disk array.
2) Real controllers have redundancy (made on Allen-Bradley)
3) Distributed networks: KNX, LON, HDL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question