change - 消除报警下发请求改到自动控制界面

dep
wangsr 12 months ago
parent 122c196b5f
commit 4672709df3

@ -14,6 +14,11 @@ using static Mesnac.Action.ChemicalWeighing.AutoControl.AutoLogHelper;
using static Mesnac.Action.ChemicalWeighing.AutoControl.PlcAutoWriteHelper;
using Mesnac.Controls.Default;
using Mesnac.Action.ChemicalWeighing.Report;
using System.Threading;
using DataBlockHelper;
using System.Diagnostics;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
@ -406,6 +411,72 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
#endregion
#region 清报警
if (ButtonE.EliAlarms == runtime.Sender)
{
PlcConnect.Instance.Write("DB2107.10.7", true);
Thread.Sleep(2000);
PlcConnect.Instance.Write("DB2107.10.7", false);
}
#endregion
#region 下传送料请求
if (ButtonE.DownloadRequest == runtime.Sender)
{
bool mixok1 = PlcConnect.Instance.ReadBool("DB3000.0.0").Content;
Time(1, mixok1 ? 1 : 0);
bool mixok2 = PlcConnect.Instance.ReadBool("DB3000.0.1").Content;
Time(2, mixok2 ? 1 : 0);
bool mixok3 = PlcConnect.Instance.ReadBool("DB3000.0.2").Content;
Time(3, mixok3 ? 1 : 0);
bool mixok4 = PlcConnect.Instance.ReadBool("DB3000.0.3").Content;
Time(4, mixok4 ? 1 : 0);
bool mixok5 = PlcConnect.Instance.ReadBool("DB3000.0.4").Content;
Time(5, mixok5 ? 1 : 0);
bool mixok6 = PlcConnect.Instance.ReadBool("DB3000.0.5").Content;
Time(6, mixok6 ? 1 : 0);
bool mixok7 = PlcConnect.Instance.ReadBool("DB3000.0.6").Content;
Trace.WriteLine("7号信号:" + mixok7);
Time(7, mixok7 ? 1 : 0);
bool mixok8 = PlcConnect.Instance.ReadBool("DB3000.0.7").Content;
Trace.WriteLine("8号信号:" + mixok8);
Time(8, mixok8 ? 1 : 0);
}
#endregion
}
#region 下发接料请求
/// <summary>
/// 下发接料请求
/// </summary>
/// <param name="deviceNo"></param>
/// <param name="statu"></param>
private void Time(int deviceNo, int statu)
{
TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
{
reqCode = System.Guid.NewGuid().ToString(),
reqTime = DateTime.Now,
deviceNo = deviceNo.ToString(),
state = statu.ToString(),
};
//即使网络不同 也不会影响上位机的使用
ThreadPool.QueueUserWorkItem(delegate
{
HttpResponse httpResponse = new HttpResponse();
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest);
});
}
#endregion
}
}

@ -85,6 +85,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public Button CAOnOff { get; set; }
public Button HBOnOff { get; set; }
public Button CBOnOff { get; set; }
public Button EliAlarms { get; set; }
public Button DownloadRequest { get; set; }
}
public class MCTextBoxEntity

@ -29,8 +29,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
MCButton ManualControl;
MCButton Refresh;
MCButton SelectByText;
MCButton EliAlarms;
MCButton DownloadRequest;
//HslSwitch HslSwitch1;
//HslSwitch HslSwitch2;
@ -62,8 +60,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
ManualControl = control.FirstOrDefault(x => x != null && x.Name == "ManualControl") as MCButton;
Refresh = control.FirstOrDefault(x => x != null && x.Name == "Refresh") as MCButton;
SelectByText = control.FirstOrDefault(x => x != null && x.Name == "SelectByText") as MCButton;
EliAlarms = control.FirstOrDefault(x => x != null && x.Name == "EliAlarms") as MCButton;
DownloadRequest = control.FirstOrDefault(x => x != null && x.Name == "DownloadRequest") as MCButton;
StartDate = control.FirstOrDefault(x => x != null && x.Name == "StartDate") as MCDateTimePicker;
EndDate = control.FirstOrDefault(x => x != null && x.Name == "EndDate") as MCDateTimePicker;
LogForm = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView1").FirstOrDefault();
@ -110,8 +106,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
ManualControl.Click += ManualControlSelect;
Refresh.Click += RefreshAction;
SelectByText.Click += SelectByTextAction;
EliAlarms.Click += EliAlarmsClick;
DownloadRequest.Click += RequestDownloadClick;
}
/// <summary>
@ -171,9 +165,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
/// <param name="e"></param>
private void EliAlarmsClick(object sender, EventArgs e)
{
PlcConnect.Instance.Write("DB2107.10.7", true);
Thread.Sleep(2000);
PlcConnect.Instance.Write("DB2107.10.7", false);
}
/// <summary>

@ -1,3 +1,3 @@
<DataSources>
<DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="192.168.0.100" UserName="sa" Password="123456" DataBase="CWSSHG" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
<DataSourceItem Name="DataSource1" Driver="MS SQL Server" Server="127.0.0.1" UserName="sa" Password="123456" DataBase="CWSSHG" ConnectionTimeout="5" DriverAssembly="ICSharpCode.Data.SQLServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DriverClass="ICSharpCode.Data.Core.DatabaseDrivers.SQLServer.SQLServerDatabaseDriver" DataSourceClass="ICSharpCode.Data.Core.DatabaseObjects.Database" />
</DataSources>

@ -1,5 +1,55 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="AutoControlC" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DownloadRequest" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAKAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2BgcAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property>
<Property name="MCKey">DownloadRequest</Property>
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">下发送料请求</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">1364, 509</Property>
<Property name="Name">DownloadRequest</Property>
<Property name="Size">168, 50</Property>
<Property name="TabIndex">70</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="EliAlarms" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAGAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIERCRTgxOTNENDE2MDRBRDVCOTRBRTNDMkQzNDc1MUQyBgYAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2BgcAAAAY6Ieq5Yqo5o6n5Yi25oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property>
<Property name="MCKey">EliAlarms</Property>
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">消除报警</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">1364, 453</Property>
<Property name="Name">EliAlarms</Property>
<Property name="Size">168, 50</Property>
<Property name="TabIndex">69</Property>
</Object>
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox18" children="Controls">
<Object type="System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="GroupBox15" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HAOnOff" children="Controls">
@ -2946,7 +2996,7 @@
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text"></Property>
<Property name="Location">1474, 612</Property>
<Property name="Location">1471, 624</Property>
<Property name="Name">RepairState</Property>
<Property name="Size">17, 12</Property>
</Object>
@ -2965,7 +3015,7 @@
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">维修状态:</Property>
<Property name="Location">1409, 612</Property>
<Property name="Location">1408, 624</Property>
<Property name="Name">MCLabel52</Property>
<Property name="Size">65, 12</Property>
</Object>
@ -2989,7 +3039,7 @@
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">维修模式</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">1364, 546</Property>
<Property name="Location">1364, 565</Property>
<Property name="Name">RepairMode</Property>
<Property name="Size">168, 49</Property>
<Property name="TabIndex">54</Property>
@ -3182,7 +3232,7 @@
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">湿混机糊化机下传</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">1364, 441</Property>
<Property name="Location">1364, 397</Property>
<Property name="Name">Download</Property>
<Property name="Size">168, 50</Property>
<Property name="TabIndex">8</Property>

@ -1,95 +1,5 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="LjLogForm" children="Controls">
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="DownloadRequest" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAIAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property>
<Property name="MCKey">DownloadRequest</Property>
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">下发送料请求</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">63, 409</Property>
<Property name="Name">DownloadRequest</Property>
<Property name="Size">148, 44</Property>
<Property name="TabIndex">49</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCButton, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="EliAlarms" children="Controls">
<Property name="ClickActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw==</Binary>
</Property>
<Property name="MCKey">EliAlarms</Property>
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">Query</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="MCPurview">False</Property>
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="Text">消除报警</Property>
<Property name="Font">宋体, 12pt</Property>
<Property name="Location">63, 350</Property>
<Property name="Name">EliAlarms</Property>
<Property name="Size">148, 44</Property>
<Property name="TabIndex">48</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch2" children="Controls">
<Property name="Location">142, 476</Property>
<Property name="Name">HslSwitch2</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch8" children="Controls">
<Property name="Location">142, 731</Property>
<Property name="Name">HslSwitch8</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch7" children="Controls">
<Property name="Location">51, 731</Property>
<Property name="Name">HslSwitch7</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch6" children="Controls">
<Property name="Location">141, 646</Property>
<Property name="Name">HslSwitch6</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch5" children="Controls">
<Property name="Location">51, 646</Property>
<Property name="Name">HslSwitch5</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch4" children="Controls">
<Property name="Location">141, 561</Property>
<Property name="Name">HslSwitch4</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch3" children="Controls">
<Property name="Location">51, 561</Property>
<Property name="Name">HslSwitch3</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.ChemicalWeighing.HslSwitch, Mesnac.Controls.ChemicalWeighing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="HslSwitch1" children="Controls">
<Property name="Location">51, 476</Property>
<Property name="Name">HslSwitch1</Property>
<Property name="Size">73, 79</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCDataGridView, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="LogForm" children="Controls">
<Property name="DisplayAllColumn">False</Property>
<Property name="DgvColumn">

Loading…
Cancel
Save