private void fnMOVAndCompute(string[] pCOMMAND, cla_stPLCcs.stPLC_OBJ[] pPLC_OBJ, ref int piStackDepth) { if (pPLC_OBJ[piStackDepth - 1].status) { var getNumber = GetNumberKDTC(pCOMMAND[1]); var xmlD = new ClaXmlD(); xmlD.Modify(pCOMMAND[2], getNumber.ToString(CultureInfo.InvariantCulture)); } }
private void FnWriteM() { var xmlDm = new ClaXmlD(); for (int i = 0; i < MAX_NUM_AUX; i++) { if (pAUX[i].status) { TableM[i] = "1"; } else { TableM[i] = "0"; } } }
private int fnDADDAndCompute(string[] pCOMMAND, cla_stPLCcs.stPLC_OBJ[] pPLC_OBJ, ref int piStackDepth) { if (pPLC_OBJ[piStackDepth - 1].status) { var xmlD = new ClaXmlD(); double getNumbera = 0; if (pCOMMAND[1][0] == 'D') { string s = xmlD.ReadCell(pCOMMAND[1]); getNumbera = Convert.ToDouble(s); } else { getNumbera = GetNumberKDTC(pCOMMAND[1]); } double getNumberb = 0; if (pCOMMAND[2][0] == 'D') { getNumberb = Convert.ToDouble(xmlD.ReadCell(pCOMMAND[2])); } else { getNumberb = GetNumberKDTC(pCOMMAND[2]); } var numberC = getNumbera + getNumberb; xmlD.Modify(pCOMMAND[3], numberC.ToString(CultureInfo.InvariantCulture)); return(0); } return(0); }