Fix osai / fanuc minor bug
This commit is contained in:
@@ -868,7 +868,11 @@ namespace CMS_CORE_Library.Fanuc
|
||||
|
||||
public override CmsError PLC_WOperatorInputResponse(int process, double responseVal)
|
||||
{
|
||||
return NO_ERROR;
|
||||
//CmsError cmsError = MEM_RWDouble(W, 0, MEMORY_TYPE.Osai_GD, 900 + (process - 1), ref responseVal);
|
||||
//if (cmsError.IsError())
|
||||
// return cmsError;
|
||||
|
||||
return PLC_WStrobe(M155_INPUT_ACK, M155_INPUT_STROBE, (uint)process);
|
||||
}
|
||||
|
||||
public override CmsError PLC_RM154Data(ref List<M154DataModel> data, ref bool MTCOnOff)
|
||||
@@ -1251,11 +1255,16 @@ namespace CMS_CORE_Library.Fanuc
|
||||
|
||||
private CmsError PROC_ReadActiveLine(uint processId, ref string line)
|
||||
{
|
||||
uint lineL = 1;
|
||||
uint txtL = 50;
|
||||
short nReturn = Focas1.cnc_rdprogline2(nLibHandle[(int)processId - 1], 0, 1, line, ref lineL, ref txtL);
|
||||
if (nReturn != 0)
|
||||
return GetNcError(nReturn);
|
||||
//uint lineL = 1;
|
||||
//uint txtL = 50;
|
||||
//short nReturn = Focas1.cnc_rdprogline2(nLibHandle[(int)processId - 1], 0, 1, line, ref lineL, ref txtL);
|
||||
|
||||
ActiveProgramDataModel activeProgData = new ActiveProgramDataModel();
|
||||
CmsError cmsError = FILES_RActiveProgramData((int)processId, ref activeProgData);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
line = activeProgData.IsoLines.FirstOrDefault();
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
@@ -4227,6 +4236,8 @@ namespace CMS_CORE_Library.Fanuc
|
||||
internal static MEMORY_CELL COUNTER_IS_RESETTABLE_STROBE = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3002, 0, 2);
|
||||
|
||||
internal static MEMORY_CELL M155_INPUT_NEEDED = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3004, 1);
|
||||
internal static MEMORY_CELL M155_INPUT_ACK = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3005, 1);
|
||||
internal static MEMORY_CELL M155_INPUT_STROBE = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3006, 1);
|
||||
|
||||
internal static MEMORY_CELL M154_SWITCH_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS, 2);
|
||||
internal static MEMORY_CELL M154_STROBE = new MEMORY_CELL(MEMORY_TYPE.Fanuc_R, STARTING_ADDRESS + 3031, 1);
|
||||
|
||||
@@ -3804,7 +3804,7 @@ namespace CMS_CORE_Library.Osai
|
||||
try
|
||||
{
|
||||
//Execute the method
|
||||
nReturn = OpenNC.GetActivePartProgramFullPath(procNumber, out Level, out mainPath, out SubPath, out errorClass, out errorNum);
|
||||
nReturn = OpenNC.GetActivePartProgram(procNumber, out Level, out mainPath, out SubPath, out errorClass, out errorNum);
|
||||
|
||||
//If there's an error launch exception\
|
||||
if (errorClass != 0 || errorNum != 0 || nReturn == 0)
|
||||
@@ -4102,7 +4102,7 @@ namespace CMS_CORE_Library.Osai
|
||||
internal static MEMORY_CELL M155_INPUT_ACK = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4308, 1);
|
||||
internal static MEMORY_CELL M155_INPUT_STROBE = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4310, 1);
|
||||
|
||||
internal static MEMORY_CELL M154_SWITCH_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4000, 2);
|
||||
internal static MEMORY_CELL M154_SWITCH_ONOFF = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4000, 1, 2);
|
||||
internal static MEMORY_CELL M154_STROBE = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4312, 1);
|
||||
internal static MEMORY_CELL M154_ACK = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 4314, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user