This commit is contained in:
@@ -120,9 +120,11 @@ namespace CMS_CORE_Application
|
||||
sw.Restart();
|
||||
|
||||
SelectedProcessData selected = new SelectedProcessData();
|
||||
|
||||
double d = 0;
|
||||
(N as Nc_Fanuc).ReadMacroValue(1, 955, true, ref d);
|
||||
//cmsError = N.PROC_RSelectedProcessData(1, ref selected);
|
||||
|
||||
List<M155InputIsNeededModel> m155 = new List<M155InputIsNeededModel>();
|
||||
N.PLC_ROperatorInputIsNeeded(ref m155);
|
||||
//cmsError = N.PLC_WAssistedToolingCmd(1, 1, 1, 1, 1, ASSISTED_TOOLING_ACTION.UNLOAD);
|
||||
//AssistedToolingModel ass = new AssistedToolingModel();
|
||||
//cmsError = N.PLC_RAssistedToolingData(ref ass);
|
||||
|
||||
@@ -941,7 +941,7 @@ namespace CMS_CORE_Library.Fanuc
|
||||
MEMORY_CELL currentStrobeCell = sign == HEAD_OVERRIDE_SIGN.PLUS ? HEADS_STROBE_INCREMENT : HEADS_STROBE_DECREMENT;
|
||||
|
||||
// Write strobe into memory
|
||||
CmsError cmsError = PLC_WStrobe(HEADS_ACK, currentStrobeCell, id);
|
||||
CmsError cmsError = PLC_WStrobe(HEADS_ACK, currentStrobeCell, id);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
@@ -1036,15 +1036,23 @@ namespace CMS_CORE_Library.Fanuc
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
private CmsError ReadMacroValue(int processId, int memIndex, bool isCustom, ref double val)
|
||||
public CmsError ReadMacroValue(int processId, int memIndex, bool isCustom, ref double val)
|
||||
{
|
||||
if (isCustom)
|
||||
if (isCustom)
|
||||
{
|
||||
// Read custom machine variable
|
||||
int num = 1;
|
||||
short nReturn = Focas1.cnc_rdmacror2(nLibHandle[processId - 1], memIndex, ref num, val);
|
||||
IODBMR readVal = new IODBMR()
|
||||
{
|
||||
datano_s = (short)memIndex,
|
||||
datano_e = (short)(memIndex)
|
||||
};
|
||||
// Fanuc standard length
|
||||
short length = 8 + 8;
|
||||
short nReturn = Focas1.cnc_rdmacror(nLibHandle[processId - 1], readVal.datano_s, readVal.datano_e, length, readVal);
|
||||
if (nReturn != 0)
|
||||
return GetNcError(nReturn);
|
||||
|
||||
val = readVal.data.data1.mcr_val * Math.Pow(10, (-1 * readVal.data.data1.dec_val));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3643,9 +3651,9 @@ namespace CMS_CORE_Library.Fanuc
|
||||
// return cmsError;
|
||||
|
||||
// Set reload command
|
||||
cmsError = PLC_WStrobe(TOOL_MANAGER_STATUS, TOOL_MANAGER_COMMAND, 1);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
//cmsError = PLC_WStrobe(TOOL_MANAGER_STATUS, TOOL_MANAGER_COMMAND, 1);
|
||||
//if (cmsError.IsError())
|
||||
// return cmsError;
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user