06-03-2009 04:09 AM
Hi, I have a system consisting of 4 computers. 2 acting as clients and 2 as servers. The system has 2 sets of shared variables. One for each server, shared variables server 1 and shared variables server2. The clients depoloy their shared variables and bind one set to server 1 and one set to server2. The server also deploy their variables. Server1 bind shared variables server 2 to server 2 and server2 bind shared variables 1 to server1. I'm using a while loop with event case to "listen" to value change of the shared variables. I also have a while loop with an event case for user interaction. And another while loop processing queued elements form the user event loop.
Problem 1. When I try to stop the program on the server, it crash/hang when i try to stop the loop with the event case handling the shared variables. This does not happen with the client programs. Can it have somthing to do with the server having other shared variables bound to its shared variables? To get around the problem I stop the program by using the quit LV function. This make the server program end with an error message, C++ runtime error.
Problem 2. If both server is up and running normally and I try to restart one of the server computers, the server program on the other server crash with C++ runtime error. To me this problems seems to have somthing to do with the shared variables having other variables bound to it form other computers, since the server and client program are programmed in the same way and only the server programs crash.
06-03-2009 09:40 AM
06-03-2009 09:58 AM
Hi, I'm building a redundant system.
The clients talks to both servers. To server1 with the shared variables set "shared variables server1.lvlib" and with server2 with the shared variable set "shared variables server2.lvlib".
The server is bound to the other server to update its shared variables with the data on the other servers shared variables at startup.
Both servers are collecting data on the serialport and data from the clients. One server is acting as the master, the other as slave. The idea is that if one computer goes down or the shared variable engine fails on one server computer, the other will still be OK, and system still operating as intended until computer is up and running again.If the master server is the one to fail, it is supposed to become master again at strtup, containing the up tod data in the other servers shared variables.