public void SetNozzleState(int nozzleType, NozzleState nozzleState) { nozzleArr[(int)nozzleType - 1].nozzleState = nozzleState; if (eventUpdatNozzleData != null) { eventUpdatNozzleData(nozzleType, "SetNozzleState", nozzleState); } }
protected override void StationWork(int step) { if (ParamSetMgr.GetInstance().GetIntParam("右剥料屏蔽") == 1) { ParamSetMgr.GetInstance().SetBoolParam("右剥料完成", true); return; } WaranResult waranResult; bool bfind = ParamSetMgr.GetInstance().GetBoolParam("右搜寻蜂鸣器成功"); bool bgooripos = ParamSetMgr.GetInstance().GetBoolParam("右剥料归位"); PlaneState planeState = PlaneMgr.GetInstance().PlaneArr[(int)PlaneType.rightStripPlane].planeState; NozzleState nozzleState = NozzleMgr.GetInstance().nozzleArr[(int)NozzleType.RightStripNozzle].nozzleState; if (ParamSetMgr.GetInstance().GetBoolParam("右搜寻蜂鸣器成功") && ParamSetMgr.GetInstance().GetBoolParam("右剥料归位") && PlaneMgr.GetInstance().PlaneArr[(int)PlaneType.rightStripPlane].planeState == PlaneState.None && NozzleMgr.GetInstance().nozzleArr[(int)NozzleType.RightStripNozzle].nozzleState == NozzleState.Have && GlobalVariable.g_StationState == StationState.StationStateRun) { Info(string.Format("右装料平台有无感应器{0},右搜寻蜂鸣器成功{1},右拨料平台状态{2},右剥料吸嘴状态{3} 右剥料归位{4}", IOMgr.GetInstace().ReadIoInBit("右装料平台有无感应器"), ParamSetMgr.GetInstance().GetBoolParam("右搜寻蜂鸣器成功"), PlaneMgr.GetInstance().PlaneArr[(int)PlaneType.rightStripPlane].planeState, NozzleMgr.GetInstance().nozzleArr[(int)NozzleType.RightStripNozzle].nozzleState, ParamSetMgr.GetInstance().GetBoolParam("右剥料归位"))); ///loadState = LoadState.exceing; Carray(); // loadState = LoadState.None; } switch (step) { case (int)StationStep.step_init: Init(); retry_FindBuzzer: waranResult = FindBuzzer(); if (waranResult == WaranResult.Retry) { goto retry_FindBuzzer; } if (ParamSetMgr.GetInstance().GetBoolParam("右搜寻蜂鸣器成功")) { retry_go_蜂鸣器顶位: if (sys.g_AppMode == AppMode.AirRun) { ParamSetMgr.GetInstance().SetIntParam("右蜂鸣器顶位", (int)GetStationPointDic()["装料原始位"].pointZ); } WaranResult waranResult1 = MoveSigleAxisPosWaitInpos(AxisZ, ParamSetMgr.GetInstance().GetIntParam("右蜂鸣器顶位"), (int)MotionMgr.GetInstace().GetAxisMovePrm(AxisZ).VelH, 20, false, this, 60000); if (waranResult1 == WaranResult.Retry) { goto retry_go_蜂鸣器顶位; } } MoveSigleAxisPosWaitInpos(AxisY, GetStationPointDic()["剥料准备位"].pointY, (double)SpeedType.High, 20, false, this, 60000); PushMultStep((int)StationStep.step_Separate); ParamSetMgr.GetInstance().SetBoolParam("右剥料归位", true); ParamSetMgr.GetInstance().SetIntParam("右剥料次数", 0); DelCurrentStep(); break; case (int)StationStep.step_Separate: ParamSetMgr.GetInstance().SetBoolParam("右剥料完成", false); if (PlaneMgr.GetInstance().PlaneArr[(int)PlaneType.rightStripPlane].planeState == PlaneState.None) { break; } int Count = ParamSetMgr.GetInstance().GetIntParam("右剥料次数"); if (Count > 6) { PushMultStep((int)StationStep.step_Separate); DelCurrentStep(); break; } Separate(Count); Count = ParamSetMgr.GetInstance().GetIntParam("右剥料次数"); if (Count >= 2 && Count <= 6) { ParamSetMgr.GetInstance().SetBoolParam("右剥料完成", true); PushMultStep((int)StationStep.step_WaitGetFinish); DelCurrentStep(); } else if (Count > 6) { ParamSetMgr.GetInstance().SetBoolParam("右剥料完成", false); PushMultStep((int)StationStep.step_Separate); DelCurrentStep(); break; } else { PushMultStep((int)StationStep.step_Separate); DelCurrentStep(); } break; case (int)StationStep.step_WaitGetFinish: if (ParamSetMgr.GetInstance().GetBoolParam("右剥料取料完成")) { ParamSetMgr.GetInstance().SetBoolParam("右剥料取料完成", false); PushMultStep((int)StationStep.step_Separate); DelCurrentStep(); } break; } }