06-24-2011 07:33 AM
Hi,
i'm working on an acquisition system that need to be used permantly. Hardware is plug in emulated COM port received by ethernet.
Is there a way to use labview on two computers in case of crash of one of the computers?
What would be the way to synchronise them?
Thank you for your answers and ideas
06-24-2011 09:06 AM
The best way really depends on what you're trying to synchronize. Are you collecting data? Is the data saved onto the computer? Are you providing some sort of stimulus on a regular basis? How fast of a rollover do you need to deal with the crash? Can one computer basically come online at any point in time? Can it go offline, but not actually crash? Do you need a way to notify the other computer of online/offline status as opposed to a crash?
You can set up a communication system between the two computers via TCP/IP. Or, you could use network shared variables. Either way you need to distinguish between a computer recognizing the other computer as being "online", "offline", and "crashed". As for the synchronization, if you're collecting data, then the active computer can simply send the data to the other computer if it's "online". Otherwise you'd need to save the data. Do you save the data locally, or on a server? If the other computer comes online then does it need to see the data it missed?
It sounds like you need to architect this whole thing first before getting down to actual coding.
06-27-2011 05:49 AM
The system is collecting datas saved on a data basis stored locally.Actually, there is only one computer to control everything and when it crashes, a lot of datas are lost. And a part of it can be regenerated by the data basis.
I think first of all, i've got to separate the data storage from the acquisition systems under labview. Then the rollever shouldn't be longuer than around 10 seconds, i think. And yes the computers would need a way to be notified if they are online or offline or crashed.
So I will first try to see how to use two computers with TCP/IP and the way to control each others.
Thank you for your answer.
06-27-2011 08:50 AM
Separating data storage from the acquisition is typically done by using a producer-consumer architecture. You can read about it in the KB article: Application Design Patterns: Producer/Consumer
As for communication between the two computers there are 2 decent examples that ship with LabVIEW. Open the Example Finder (Help -> Find Examples) and search for TCP/IP.