Added method for mode selection
This commit is contained in:
@@ -730,6 +730,12 @@ namespace CMS_CORE_Library
|
||||
/// <param name="currProdCycle"></param>
|
||||
/// <returns></returns>
|
||||
public abstract CmsError PLC_RProdCycle(ref ThermoModels.ProdCycleModel currProdCycle);
|
||||
/// <summary>
|
||||
/// Request for mode selection via strobe
|
||||
/// </summary>
|
||||
/// <param name="mode">1: MAN, 2: AUTO, 3: SETUP</param>
|
||||
/// <returns></returns>
|
||||
public abstract CmsError PLC_WModeSel(int mode);
|
||||
|
||||
#endregion THERMO high level data
|
||||
|
||||
|
||||
@@ -2931,7 +2931,40 @@ namespace CMS_CORE_Library.S7Net
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
/// <summary>
|
||||
/// Request for mode selection via strobe
|
||||
/// </summary>
|
||||
/// <param name="mode">1: MAN, 2: AUTO, 3: SETUP</param>
|
||||
/// <returns></returns>
|
||||
public override CmsError PLC_WModeSel(int mode)
|
||||
{
|
||||
// se update --> scrivo strobe comando update...
|
||||
if (mode == 1)
|
||||
{
|
||||
// Call confirm update
|
||||
CmsError cmsError = PLC_WStrobe(REQ_MODE_ACK, REQ_MODE_STROBE, 6);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
else
|
||||
if (mode == 2)
|
||||
{
|
||||
// Call confirm update
|
||||
CmsError cmsError = PLC_WStrobe(REQ_MODE_ACK, REQ_MODE_STROBE, 5);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
else
|
||||
if (mode == 3)
|
||||
{
|
||||
// Call confirm update
|
||||
CmsError cmsError = PLC_WStrobe(REQ_MODE_ACK, REQ_MODE_STROBE, 7);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -4928,6 +4961,10 @@ namespace CMS_CORE_Library.S7Net
|
||||
internal static MEMORY_CELL PARAMETER_EDIT_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 0, 2);
|
||||
internal static MEMORY_CELL PARAMETER_EDIT_STROBE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2, 2);
|
||||
|
||||
// Mode request strobe/ack
|
||||
internal static MEMORY_CELL REQ_MODE_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 0, 2);
|
||||
internal static MEMORY_CELL REQ_MODE_STROBE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2, 2);
|
||||
|
||||
// strobe received from PLC
|
||||
internal static MEMORY_CELL REQ_CONF_STROBE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 0, 2);
|
||||
internal static MEMORY_CELL REQ_CONF_ACK = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 2, 2);
|
||||
|
||||
Reference in New Issue
Block a user