This commit is contained in:
@@ -850,7 +850,7 @@ namespace CMS_CORE_Library.Demo
|
||||
return MEM_RWByte(W, 0, MEMORY_TYPE.Demo, procAddress, 0, ref approxymatedVal);
|
||||
}
|
||||
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> value)
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> value, ref bool MTCCmd)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
@@ -867,7 +867,7 @@ namespace CMS_CORE_Library.Demo
|
||||
{
|
||||
if(memType == SCADA_MEM_TYPE.INT)
|
||||
{
|
||||
// READ INT
|
||||
// read INT
|
||||
int val = 0;
|
||||
CmsError cmsError = MEM_RWInteger(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), ref val);
|
||||
if (cmsError.IsError())
|
||||
@@ -876,7 +876,7 @@ namespace CMS_CORE_Library.Demo
|
||||
value = val;
|
||||
}
|
||||
else if(memType == SCADA_MEM_TYPE.WORD)
|
||||
{ // READ WORD
|
||||
{ // read WORD
|
||||
ushort val = 0;
|
||||
CmsError cmsError = MEM_RWWord(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), ref val);
|
||||
if (cmsError.IsError())
|
||||
@@ -885,7 +885,7 @@ namespace CMS_CORE_Library.Demo
|
||||
value = val;
|
||||
}
|
||||
else
|
||||
{ // READ byte
|
||||
{ // read byte
|
||||
byte val = 0;
|
||||
CmsError cmsError = MEM_RWByte(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), 0, ref val);
|
||||
if (cmsError.IsError())
|
||||
@@ -895,7 +895,7 @@ namespace CMS_CORE_Library.Demo
|
||||
}
|
||||
}
|
||||
else if(index.Count() == 2 && memType == SCADA_MEM_TYPE.BOOL)
|
||||
{ // READ BOOL
|
||||
{ // read BOOL
|
||||
bool val = false;
|
||||
CmsError cmsError = MEM_RWBoolean(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
if (cmsError.IsError())
|
||||
|
||||
@@ -871,10 +871,15 @@ namespace CMS_CORE_Library.Fanuc
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data)
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data, ref bool MTCOnOff)
|
||||
{
|
||||
MTCOnOff = false;
|
||||
CmsError cmsError = MEM_RWBoolean(R, 0, MTCONNECT_ONOFF.MemType, MTCONNECT_ONOFF.Address, MTCONNECT_ONOFF.SubAddress, ref MTCOnOff);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
byte val = 0;
|
||||
CmsError cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -898,7 +903,7 @@ namespace CMS_CORE_Library.Fanuc
|
||||
{
|
||||
Process = processId,
|
||||
IsNeeded = bits[processId - 1],
|
||||
ActualLine = parameters
|
||||
Parameters = parameters
|
||||
});
|
||||
|
||||
}
|
||||
@@ -4217,6 +4222,7 @@ namespace CMS_CORE_Library.Fanuc
|
||||
|
||||
internal static MEMORY_CELL M155_INPUT_NEEDED = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3004, 1);
|
||||
internal static MEMORY_CELL MTCONNECT_DATA_NEEDED = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3031, 1);
|
||||
internal static MEMORY_CELL MTCONNECT_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS, 2);
|
||||
internal static MEMORY_CELL AXES_BUTTON_VISIBLE = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3033, 16);
|
||||
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace CMS_CORE_Library.Models
|
||||
{
|
||||
public uint Process;
|
||||
public bool IsNeeded;
|
||||
public string[] ActualLine;
|
||||
public string[] Parameters;
|
||||
}
|
||||
|
||||
public struct MtConnectDataNeededModel
|
||||
|
||||
@@ -558,7 +558,7 @@ namespace CMS_CORE_Library
|
||||
|
||||
public abstract CmsError PLC_WOperatorInputResponse(int process, double responseVal);
|
||||
|
||||
public abstract CmsError PLC_RM154Data(ref List<M154DataModel> value);
|
||||
public abstract CmsError PLC_RM154Data(ref List<M154DataModel> value, ref bool MTCCmd);
|
||||
|
||||
public abstract CmsError PLC_RScadaValue(string memIndex, SCADA_MEM_TYPE memType, ref object value);
|
||||
|
||||
|
||||
@@ -824,10 +824,15 @@ namespace CMS_CORE_Library.Osai
|
||||
return PLC_WStrobe(M155_INPUT_ACK, M155_INPUT_STROBE, (uint)process);
|
||||
}
|
||||
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data)
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data, ref bool MTCOnOff)
|
||||
{
|
||||
MTCOnOff = false;
|
||||
CmsError cmsError = MEM_RWBoolean(R, 0, MTCONNECT_ONOFF.MemType, MTCONNECT_ONOFF.Address, MTCONNECT_ONOFF.SubAddress, ref MTCOnOff);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
byte val = 0;
|
||||
CmsError cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -849,9 +854,9 @@ namespace CMS_CORE_Library.Osai
|
||||
parameters = ExtractM154ParametersFromNcCodeLine(tmpStr);
|
||||
data.Add(new M154DataModel()
|
||||
{
|
||||
Process = (uint)processId,
|
||||
Process = processId,
|
||||
IsNeeded = bits[processId - 1],
|
||||
ActualLine = parameters
|
||||
Parameters = parameters
|
||||
});
|
||||
|
||||
}
|
||||
@@ -902,7 +907,7 @@ namespace CMS_CORE_Library.Osai
|
||||
else if (index.Count() == 2 && memType == SCADA_MEM_TYPE.BOOL)
|
||||
{ // read BOOL
|
||||
bool val = false;
|
||||
cmsError = MEM_RWBoolean(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
cmsError = MEM_RWBoolean(R, 0, MEMORY_TYPE.Osai_MW, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
|
||||
value = val;
|
||||
}
|
||||
@@ -946,7 +951,7 @@ namespace CMS_CORE_Library.Osai
|
||||
else if (index.Count() == 2 && memType == SCADA_MEM_TYPE.BOOL)
|
||||
{ // write BOOL
|
||||
bool val = false;
|
||||
cmsError = MEM_RWBoolean(W, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
cmsError = MEM_RWBoolean(W, 0, MEMORY_TYPE.Osai_MW, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
@@ -4064,6 +4069,7 @@ namespace CMS_CORE_Library.Osai
|
||||
internal static MEMORY_CELL M155_INPUT_STROBE = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4310, 1);
|
||||
|
||||
internal static MEMORY_CELL MTCONNECT_DATA_NEEDED = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4312, 1);
|
||||
internal static MEMORY_CELL MTCONNECT_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4000, 2);
|
||||
internal static MEMORY_CELL AXES_BUTTON_VISIBLE = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4320, 16);
|
||||
|
||||
// Tool manager areas
|
||||
|
||||
@@ -1112,10 +1112,15 @@ namespace CMS_CORE_Library.Siemens
|
||||
}
|
||||
}
|
||||
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data)
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data, ref bool MTCOnOff)
|
||||
{
|
||||
MTCOnOff = false;
|
||||
CmsError cmsError = MEM_RWBoolean(R, 0, MTCONNECT_ONOFF.MemType, MTCONNECT_ONOFF.Address, MTCONNECT_ONOFF.SubAddress, ref MTCOnOff);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
byte val = 0;
|
||||
CmsError cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
cmsError = MEM_RWByte(R, 0, MTCONNECT_DATA_NEEDED.MemType, MTCONNECT_DATA_NEEDED.Address, 0, ref val);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -1126,7 +1131,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
|
||||
for (uint processId = 1; processId <= MAX_PROCESS_NUMBER; processId++)
|
||||
{
|
||||
if(bits[processId - 1])
|
||||
if (bits[processId - 1])
|
||||
{
|
||||
// Read active program line
|
||||
cmsError = PROC_ReadActiveLine(processId, ref tmpStr);
|
||||
@@ -1139,7 +1144,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
{
|
||||
Process = processId,
|
||||
IsNeeded = bits[processId - 1],
|
||||
ActualLine = parameters
|
||||
Parameters = parameters
|
||||
});
|
||||
|
||||
}
|
||||
@@ -1182,7 +1187,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
else
|
||||
{ // read BYTE
|
||||
byte val = 0;
|
||||
cmsError = MEM_RWByte(R, 0, MEMORY_TYPE.Osai_MW, Convert.ToInt32(index[0]), 0, ref val);
|
||||
cmsError = MEM_RWByte(R, 0, MEMORY_TYPE.Siemens_DB, Convert.ToInt32(index[0]), 0, ref val);
|
||||
|
||||
value = val;
|
||||
}
|
||||
@@ -1190,7 +1195,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
else if (index.Count() == 2 && memType == SCADA_MEM_TYPE.BOOL)
|
||||
{ // read BOOL
|
||||
bool val = false;
|
||||
cmsError = MEM_RWBoolean(R, 0, MEMORY_TYPE.Demo, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
cmsError = MEM_RWBoolean(R, 0, MEMORY_TYPE.Siemens_DB, Convert.ToInt32(index[0]), Convert.ToInt32(index[1]), ref val);
|
||||
|
||||
value = val;
|
||||
}
|
||||
@@ -5692,6 +5697,7 @@ namespace CMS_CORE_Library.Siemens
|
||||
internal static MEMORY_CELL M155_INPUT_STROBE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 3016, 1);
|
||||
|
||||
internal static MEMORY_CELL MTCONNECT_DATA_NEEDED = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 3042, 1);
|
||||
internal static MEMORY_CELL MTCONNECT_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 0, 2);
|
||||
|
||||
internal static MEMORY_CELL AXES_BUTTON_VISIBLE = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, TABLE, 3044, 16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user