Added new function for saving messages to scada system