From d5f47137aec1d126ac4ff766e711426185155768 Mon Sep 17 00:00:00 2001 From: wangxx1809 Date: Wed, 8 May 2024 10:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=B4=E8=BF=90=E5=8A=A8=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PrintC/Machine/HBD1000.cpp | 756 +++--- PrintC/Machine/HBD1000.h | 2 +- PrintC/Machine/HBD1200.cpp | 425 ++-- PrintC/Machine/HBD1200OLD.cpp | 3424 +++++++++++++------------- PrintC/Machine/HBD1200OLD.h | 2 +- PrintC/Machine/HBD1500.cpp | 3674 ++++++++++++++-------------- PrintC/Machine/HBD1500.h | 6 +- PrintC/Machine/HBDE1000.cpp | 3383 ++++++++++++------------- PrintC/Machine/HBDE1000.h | 2 +- PrintC/Machine/Machine.h | 14 +- PrintC/PLC/SysParam.h | 2 +- PrintC/UI/Controller.cpp | 2 + PrintC/UI/UIWin.cpp | 3 +- PrintC/config/bean/IOCfg.cpp | 18 +- PrintC/imgui.ini | 5 + PrintC/output/Release/log/2024.hbd | Bin 122880 -> 122880 bytes 16 files changed, 5882 insertions(+), 5836 deletions(-) diff --git a/PrintC/Machine/HBD1000.cpp b/PrintC/Machine/HBD1000.cpp index e4afd65..f4b33de 100644 --- a/PrintC/Machine/HBD1000.cpp +++ b/PrintC/Machine/HBD1000.cpp @@ -9223,7 +9223,9 @@ void HBD1000::DrawSignal(bool* isshow) // ImGui::EndChild(); //} -void HBD1000::DrawPowderCtrl(bool *winShow) + + +void HBD1000::DrawPowderCtrl(bool* winShow) { ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); @@ -9235,27 +9237,14 @@ void HBD1000::DrawPowderCtrl(bool *winShow) static int kb = GTS_AXIS_ID_ARM; static bool continue_move = false; - AxisStateValue mold; - MainAxisState* pMold = m_Axis->m_Mold->GetState(); - pMold->GetValue(mold); + //CoverCfg* coverCfg = m_CoverCfg; + MainAxisState* mold = m_Axis->m_Mold->GetState(); + MainAxisState* clean = m_Axis->m_Clean->GetState(); + AxisState* load = m_Axis->m_Load->GetState(); + AxisState* arm = m_Axis->m_Arm->GetState(); + AxisState* supply = m_Axis->m_Supply->GetState(); - AxisStateValue clean; - MainAxisState* pClean = m_Axis->m_Clean->GetState(); - pClean->GetValue(clean); - - AxisStateValue load; - AxisState* pLoad = m_Axis->m_Load->GetState(); - pLoad->GetValue(load); - - AxisStateValue arm; - AxisState* pArm = m_Axis->m_Arm->GetState(); - pArm->GetValue(arm); - - AxisStateValue supply; - AxisState* pSupply = m_Axis->m_Supply->GetState(); - pSupply->GetValue(supply); - - AxisConfig* armCfg =m_Axis->m_Arm->GetConfig(); + AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); AxisConfig::CfgValue armCfgVal; armCfg->GetValue(armCfgVal); AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); @@ -9271,13 +9260,15 @@ void HBD1000::DrawPowderCtrl(bool *winShow) AxisConfig::CfgValue supplyCfgVal; supplyCfg->GetValue(supplyCfgVal); + ParamLimitCfg paramLimitfg; + m_ParamLimitCfg->GetCfg(paramLimitfg); ChartletManager* chartletManager = ChartletManager::GetInstance(); ImVec2 wpos = ImGui::GetWindowPos(); SignalService::GetInstance().GetSignalState(m_SignalState); if (m_PowderAssist.isLeftExpand) { ImGui::BeginGroup(); - + vector tabs; tabs.push_back(_(u8"成型缸")); tabs.push_back(_(u8"移载轴")); @@ -9286,41 +9277,39 @@ void HBD1000::DrawPowderCtrl(bool *winShow) tabs.push_back(_(u8"铺粉")); tabs.push_back(_(u8"控制")); float tabwidth = 0; - for (size_t tindex = 0; tindexGetCfg(paramLimitfg); + if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { ImGui::PushItemWidth(100); - if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_MoldSpeedMin,¶mLimitfg.m_MoldSpeedMax)) + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldSpeedMin, ¶mLimitfg.m_MoldSpeedMax)) { moldCfg->m_Speed->SetValue(moldCfgVal.speed); g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); } - if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_MoldAccMin,¶mLimitfg.m_MoldAccMax)) + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldAccMin, ¶mLimitfg.m_MoldAccMax)) { moldCfg->m_Acc->SetValue(moldCfgVal.acc); g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); } - if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_MoldDecMin,¶mLimitfg.m_MoldDecMax)) + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldDecMin, ¶mLimitfg.m_MoldDecMax)) { moldCfg->m_Dec->SetValue(moldCfgVal.dec); g_log->TraceInfo(_(u8"更新成型缸减速度:%.3f").c_str(), moldCfgVal.dec); } - if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_MoldPointStepMin,¶mLimitfg.m_MoldPointStepMax)) { + if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldPointStepMin, ¶mLimitfg.m_MoldPointStepMax)) { moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); } ImGui::PopItemWidth(); ImGui::Dummy(ImVec2(0, 20)); - if (mold.MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) { @@ -9339,7 +9328,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_MoldMoveSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pMold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (mold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9351,7 +9340,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"执行打印升降轴移动到缸体分离位").c_str()); } ImGui::SameLine(); - if (mold.MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 1) { @@ -9370,7 +9359,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_MoldMove3RSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pMold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (mold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9383,7 +9372,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::SameLine(); - if (mold.MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 2) { @@ -9402,7 +9391,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygenEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pMold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (mold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9415,7 +9404,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::SameLine(); - if (mold.MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) { @@ -9434,7 +9423,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pMold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (mold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9447,7 +9436,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::SameLine(); - if (mold.MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) { @@ -9467,7 +9456,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pMold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (mold->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9483,22 +9472,22 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { ImGui::PushItemWidth(100); - if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_LoadSpeedMin,¶mLimitfg.m_LoadSpeedMax)) + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadSpeedMin, ¶mLimitfg.m_LoadSpeedMax)) { loadCfg->m_Speed->SetValue(loadCfgVal.speed); g_log->TraceInfo(_(u8"更新移载轴速度:%.3f").c_str(), loadCfgVal.speed); } - if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_LoadAccMin,¶mLimitfg.m_LoadAccMax)) + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadAccMin, ¶mLimitfg.m_LoadAccMax)) { loadCfg->m_Acc->SetValue(loadCfgVal.acc); g_log->TraceInfo(_(u8"更新移载轴加速度:%.3f").c_str(), loadCfgVal.acc); } - if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_LoadDecMin,¶mLimitfg.m_LoadDecMax)) + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadDecMin, ¶mLimitfg.m_LoadDecMax)) { loadCfg->m_Dec->SetValue(loadCfgVal.dec); g_log->TraceInfo(_(u8"更新移载轴减速度:%.3f").c_str(), loadCfgVal.dec); } - if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_LoadPointStepMin,¶mLimitfg.m_LoadPointStepMax)) { + if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadPointStepMin, ¶mLimitfg.m_LoadPointStepMax)) { loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); g_log->TraceInfo(_(u8"更新移载轴点动距离:%.3f").c_str(), loadCfgVal.rel); } @@ -9513,7 +9502,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) }*/ - if (load.MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) { @@ -9533,7 +9522,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pLoad->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (load->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9545,7 +9534,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"执行移载轴移动到轨道清粉位").c_str()); } ImGui::SameLine(); - if (load.MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 2) { @@ -9565,7 +9554,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_LoadWaitPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pLoad->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (load->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9578,7 +9567,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::SameLine(); - if (load.MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) { @@ -9598,7 +9587,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pLoad->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (load->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9704,7 +9693,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PopID(); if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"执行清粉升降移动到最低点").c_str()); } - + ImGui::EndTabItem(); } } @@ -9712,29 +9701,29 @@ void HBD1000::DrawPowderCtrl(bool *winShow) */ if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { ImGui::PushItemWidth(100); - if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_ArmSpeedMin,¶mLimitfg.m_ArmSpeedMax)) + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_ArmSpeedMin, ¶mLimitfg.m_ArmSpeedMax)) { armCfg->m_Speed->SetValue(armCfgVal.speed); g_log->TraceInfo(_(u8"更新铺粉轴速度:%.3f").c_str(), armCfgVal.speed); } - if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_ArmAccMin,¶mLimitfg.m_ArmAccMax)) + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_ArmAccMin, ¶mLimitfg.m_ArmAccMax)) { armCfg->m_Acc->SetValue(armCfgVal.acc); g_log->TraceInfo(_(u8"更新铺粉轴加速度:%.3f").c_str(), armCfgVal.acc); } - if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_ArmDecMin,¶mLimitfg.m_ArmDecMax)) + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_ArmDecMin, ¶mLimitfg.m_ArmDecMax)) { armCfg->m_Dec->SetValue(armCfgVal.dec); g_log->TraceInfo(_(u8"更新铺粉轴减速度:%.3f").c_str(), armCfgVal.dec); } - if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_ArmPointStepMin,¶mLimitfg.m_ArmPointStepMax)) { + if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_ArmPointStepMin, ¶mLimitfg.m_ArmPointStepMax)) { armCfg->m_RefDistance->SetValue(armCfgVal.rel); g_log->TraceInfo(_(u8"更新铺粉轴点动距离:%.3f").c_str(), armCfgVal.rel); } ImGui::Dummy(ImVec2(0, 20)); - if (arm.MoveAbsPos) + if (arm->m_MoveAbsPos) { if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) { @@ -9754,7 +9743,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pArm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (arm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9766,7 +9755,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"执行铺粉轴移动到接粉位").c_str()); } ImGui::SameLine(); - if (arm.MoveAbsPos) + if (arm->m_MoveAbsPos) { if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) { @@ -9786,7 +9775,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) else { if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pArm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (arm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -9804,22 +9793,22 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { ImGui::PushItemWidth(100); - if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplySpeedMin,¶mLimitfg.m_SupplySpeedMax)) + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplySpeedMin, ¶mLimitfg.m_SupplySpeedMax)) { supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); g_log->TraceInfo(_(u8"更新下粉轴速度:%.3f").c_str(), supplyCfgVal.speed); } - if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplyAccMin,¶mLimitfg.m_SupplyAccMax)) + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyAccMin, ¶mLimitfg.m_SupplyAccMax)) { supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); g_log->TraceInfo(_(u8"更新下粉轴加速度:%.3f").c_str(), supplyCfgVal.acc); } - if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplyDecMin,¶mLimitfg.m_SupplyAccMax)) + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyDecMin, ¶mLimitfg.m_SupplyAccMax)) { supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); g_log->TraceInfo(_(u8"更新下粉轴减速度:%.3f").c_str(), supplyCfgVal.dec); } - if (ImGui::InputFloatEx(_(u8"相对位移").c_str(), &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplyPointStepMin,¶mLimitfg.m_SupplyPointStepMax)) { + if (ImGui::InputFloatEx(_(u8"相对位移").c_str(), &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyPointStepMin, ¶mLimitfg.m_SupplyPointStepMax)) { supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); g_log->TraceInfo(_(u8"更新下粉轴相对移动距离:%.3f").c_str(), supplyCfgVal.rel); } @@ -9829,7 +9818,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::BeginTabItem(_(u8"铺粉").c_str())) { AxisData ad; - vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3")}; + vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; m_SysParamWrapper->GetAxisData(ad); ImGui::PushItemWidth(120); if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { @@ -9837,7 +9826,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) g_log->TraceInfo(_(u8"更新铺粉方式:%d").c_str(), ad.CoverType); } - if (ImGui::InputFloatEx(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_ArmSpeedMin,¶mLimitfg.m_ArmSpeedMax)) { + if (ImGui::InputFloatEx(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_ArmSpeedMin, ¶mLimitfg.m_ArmSpeedMax)) { m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); g_log->TraceInfo(_(u8"更新铺粉速度:%.3f").c_str(), ad.CoverSpeed); } @@ -9846,37 +9835,37 @@ void HBD1000::DrawPowderCtrl(bool *winShow) m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); g_log->TraceInfo(_(u8"更新打印单向返回速度:%.3f").c_str(), ad.CoverReturnSpeed); } - paramLimitfg.m_CoverDistanceMax = abs(ad.ArmPowderDropFrontPos - ad.ArmPowderAcceptPos)/1000.0f+1.0f; + paramLimitfg.m_CoverDistanceMax = abs(ad.ArmPowderDropFrontPos - ad.ArmPowderAcceptPos) / 1000.0f + 1.0f; - if (ImGui::InputFloatEx(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_CoverDistanceMin,¶mLimitfg.m_CoverDistanceMax)) { + if (ImGui::InputFloatEx(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_CoverDistanceMin, ¶mLimitfg.m_CoverDistanceMax)) { m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); g_log->TraceInfo(_(u8"更新打印单向铺粉距离:%.3f").c_str(), ad.CoverDistance); } - if (ImGui::InputFloatEx(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_CtrlLayerThicknessMin,¶mLimitfg.m_CtrlLayerThicknessMax)) { + if (ImGui::InputFloatEx(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_CtrlLayerThicknessMin, ¶mLimitfg.m_CtrlLayerThicknessMax)) { m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); g_log->TraceInfo(_(u8"更新打印铺粉层厚:%.3f").c_str(), ad.LayerThick); } - if (ImGui::InputFloatEx(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_FixGapMin,¶mLimitfg.m_FixGapMax)) { + if (ImGui::InputFloatEx(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_FixGapMin, ¶mLimitfg.m_FixGapMax)) { m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); g_log->TraceInfo(_(u8"更新打印间隙补偿:%.3f").c_str(), ad.FixGap); } - if (ImGui::InputScalarEx(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplyCountMin,¶mLimitfg.m_SupplyCountMax)) { + if (ImGui::InputScalarEx(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyCountMin, ¶mLimitfg.m_SupplyCountMax)) { m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); g_log->TraceInfo(_(u8"更新打印铺粉格数:%d").c_str(), ad.SupplyCount); } - if (ImGui::InputIntEx(_(u8"打印下粉时间(ms)").c_str(), &ad.SupplyTime, 0, 0,ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_SupplyWaitTimeMin,¶mLimitfg.m_SupplyWaitTimeMax)) { + if (ImGui::InputIntEx(_(u8"打印下粉时间(ms)").c_str(), &ad.SupplyTime, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyWaitTimeMin, ¶mLimitfg.m_SupplyWaitTimeMax)) { m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); g_log->TraceInfo(_(u8"更新打印下粉时间:%d").c_str(), ad.SupplyTime); } - if (ImGui::InputFloatEx(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_CtrlLayerThicknessMin,¶mLimitfg.m_CtrlLayerThicknessMax)) { + if (ImGui::InputFloatEx(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_CtrlLayerThicknessMin, ¶mLimitfg.m_CtrlLayerThicknessMax)) { m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); g_log->TraceInfo(_(u8"更新铺粉调试层厚:%.3f").c_str(), ad.DebugLayerThick); } - if (ImGui::InputFloatEx(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue,¶mLimitfg.m_FixGapMin,¶mLimitfg.m_FixGapMax)) { + if (ImGui::InputFloatEx(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, 3, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_FixGapMin, ¶mLimitfg.m_FixGapMax)) { m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); g_log->TraceInfo(_(u8"更新铺粉调试间隙补偿:%.3f").c_str(), ad.DebugFixGap); } - if (ImGui::InputIntEx(_(u8"铺粉调试下粉时间(ms)").c_str(), &ad.DebugSupplyTime, 0, 0,ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyWaitTimeMin, ¶mLimitfg.m_SupplyWaitTimeMax)) { + if (ImGui::InputIntEx(_(u8"铺粉调试下粉时间(ms)").c_str(), &ad.DebugSupplyTime, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_SupplyWaitTimeMin, ¶mLimitfg.m_SupplyWaitTimeMax)) { m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); g_log->TraceInfo(_(u8"更新铺粉调试下粉时间:%d").c_str(), ad.DebugSupplyTime); } @@ -9930,7 +9919,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) g_Toast->AddToast(new ToastBean(_(u8"铺粉调试条件不成立").c_str(), 3000)); } } - + } } ImGui::EndTabItem(); @@ -10017,7 +10006,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::PopItemFlag(); } - + if (m_SignalState.m_CylinderConnectCleanBoxRun) { ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); if (ImGui::Button(_(u8"停止").c_str())) { @@ -10070,7 +10059,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::PopItemFlag(); } - + if (m_SignalState.m_CylinderDisconnectCleanBoxRun) { ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); if (ImGui::Button(_(u8"停止").c_str())) { @@ -10119,7 +10108,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::PopItemFlag(); } - + if (m_SignalState.m_MoldDisconnectCylinderRun) { ImGui::PushID("MoldDisconnectCylinderTrigerStop"); if (ImGui::Button(_(u8"停止").c_str())) { @@ -10186,7 +10175,11 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::Text(_(u8"连续运动").c_str()); ImGui::Dummy(ImVec2(0, 250)); + /* + */ + MACHINEPARAM mp; + GetMachineParam(mp); if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { if (m_LoadAxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); @@ -10221,8 +10214,6 @@ void HBD1000::DrawPowderCtrl(bool *winShow) // ImGui::OpenPopup(u8"移载载入"); //} - MACHINEPARAM mp; - GetMachineParam(mp); if (ImGui::BeginPopupModal(_(u8"移载载入").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { if (GetLoadInProcStep() == In_Start) { ImGui::Text(_(u8"移载开始载入").c_str()); @@ -10242,7 +10233,6 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (GetLoadInProcStep() == In_CylinderPrintLoad) { ImGui::Text(_(u8"缸体打印位装载运行中").c_str()); } - if (mp.m_LoadInResut == In_Intercept) { ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); @@ -10302,6 +10292,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) { ImGui::Text(_(u8"缸体与清粉箱连接中").c_str()); } + if (mp.m_WaitConnectBoxCommit) { if (ImGui::Button(_(u8"执行缸体与清粉箱连接").c_str())) @@ -10335,24 +10326,24 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (IsLoadOut()) { if (ImGui::Button(_(u8"中断载出").c_str(), ImVec2(-1, 0))) { - DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); //InterceptLoad(); + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); } } - + ImGui::EndPopup(); } ImGui::Dummy(ImVec2(0, 80)); ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); - + if (IsLoadAxisCanMoveLeft()) { ImGui::PushID("LoadMovePointLeft"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), m_Axis->m_Load->GetState()->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -10361,7 +10352,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (kb == GTS_AXIS_ID_LOAD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), m_Axis->m_Load->GetState()->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } } } @@ -10371,36 +10362,36 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); } } - - + + ImGui::SameLine(); - if (IsLoadAxisCanMoveRight()) + //if (IsLoadAxisCanMoveRight()) + //{ + ImGui::PushID("LoadMovePointRight"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - ImGui::PushID("LoadMovePointRight"); - if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), m_Axis->m_Load->GetState()->GetShowPos(), loadCfgVal.rel); - } - ImGui::PopID(); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); - } - if (kb == GTS_AXIS_ID_LOAD && !continue_move) { - if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { - m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), m_Axis->m_Load->GetState()->GetShowPos(), loadCfgVal.rel); - } + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } } - else { - ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); - } - } - + //} + //else { + // ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + // if (ImGui::IsItemHovered()) { + // ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + // } + //} + if (IsLoadAxisCanMoveLeft()) { ImGui::PushID("LoadMoveLimitLeft"); @@ -10408,7 +10399,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (!m_PowderAssist.isLoadLeftRepeat) { m_PowderAssist.isLoadLeftRepeat = true; m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), m_Axis->m_Load->GetState()->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); } } else { @@ -10422,7 +10413,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); } - + } else { ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); @@ -10434,12 +10425,12 @@ void HBD1000::DrawPowderCtrl(bool *winShow) m_PowderAssist.isLoadLeftRepeat = false; } } - + if (kb == GTS_AXIS_ID_LOAD && continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { if (IsLoadAxisCanMoveLeft()) { m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), m_Axis->m_Load->GetState()->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); @@ -10448,7 +10439,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); } - + ImGui::SameLine(); if (IsLoadAxisCanMoveRight()) { @@ -10459,7 +10450,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (!m_PowderAssist.isLoadRightRepeat) { m_PowderAssist.isLoadRightRepeat = true; m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); } } else { @@ -10473,7 +10464,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); } - + } else { ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); @@ -10490,7 +10481,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) { if (IsLoadAxisCanMoveRight()) { m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); @@ -10503,7 +10494,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::PushID("load_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pLoad->SetZeroPos(); + load->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); @@ -10518,10 +10509,10 @@ void HBD1000::DrawPowderCtrl(bool *winShow) //ImGui::Dummy(ImVec2(500,1)); ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); ImGui::BeginGroup(); - ImGui::Text(_(u8"移栽轴:%.3f").c_str(), pLoad->GetShowPos() / 1000.0f); - ImGui::Text(_(u8"成型缸:%.3f").c_str(), pMold->GetShowPos() / 1000.0f); - ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), pArm->GetShowPos() / 1000.0f); - ImGui::Text(_(u8"清粉位:%.3f").c_str(), pClean->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"清粉位:%.3f").c_str(), clean->GetShowPos() / 1000.0f); ImGui::EndGroup(); ImGui::SameLine(350); ImGui::BeginGroup(); @@ -10533,7 +10524,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PushID("SupplyMovePointBack"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10546,7 +10537,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10560,7 +10551,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PushID("SupplyMoveLimitBack"); if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10585,7 +10576,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10601,7 +10592,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PushID("SupplyMovePointFront"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10614,7 +10605,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10625,7 +10616,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::SameLine(); ImGui::PushID("SupplyMoveLimitFront"); if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (m_Axis->m_Supply->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10650,7 +10641,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { - if (pSupply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (supply->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10665,16 +10656,21 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::EndGroup(); ImGui::EndChild(); + AxisStateValue moldValue; + mold->GetValue(moldValue); + AxisStateValue armValue; + arm->GetValue(armValue); + MotionDrawAssist assit; - //AxisStateValue loadvalue; - //load->GetValue(loadvalue); + AxisStateValue loadvalue; + load->GetValue(loadvalue); AxisData axisData; m_SysParamWrapper->GetAxisData(axisData); float loadposdif = axisData.LoadAxisTrackCleanPos - axisData.LoadAxisTrackPrintPos; - if (loadposdif != 0.0f)assit.loadRPos = (load.Pos - axisData.LoadAxisTrackPrintPos) / loadposdif; + if (loadposdif != 0.0f)assit.loadRPos = (loadvalue.Pos - axisData.LoadAxisTrackPrintPos) / loadposdif; else assit.loadRPos = 0.0f; - assit.loadRPos = assit.loadRPos >1.0f ? 1.0f : assit.loadRPos; + assit.loadRPos = assit.loadRPos > 1.0f ? 1.0f : assit.loadRPos; assit.loadRPos = assit.loadRPos < 0.0f ? 0.0f : assit.loadRPos; /*int cylinderState = m_SignalState.m_CylinderState; if (cylinderState == CylinderInCleanOutsidePlatformUnConnectBox || @@ -10684,8 +10680,8 @@ void HBD1000::DrawPowderCtrl(bool *winShow) assit.loadRPos = 1.0f; }*/ - assit.moldRpos = mold.RPos>1.0f ? 1.0f : mold.RPos; - assit.armRPos = arm.RPos; + assit.moldRpos = moldValue.RPos > 1.0f ? 1.0f : moldValue.RPos; + assit.armRPos = armValue.RPos; assit.isCleanPressure = m_IOCfgWrapper->m_CleannerPressOn->IsActive(); assit.isPrintPressure = m_IOCfgWrapper->m_PrintPressOn->IsActive(); if (!m_IOCfgWrapper->m_PrintSupportCylinderOn) { @@ -10710,7 +10706,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PushID("ArmMovPointBack"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (arm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10740,7 +10736,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::PushID("ArmMoveLimitBack"); if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - + if (!m_PowderAssist.isArmBackRepeat) { m_PowderAssist.isArmBackRepeat = true; m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); @@ -10806,12 +10802,12 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } } - + ImGui::SameLine(); if (IsArmCanMoveFront()) { ImGui::PushID("ArmMoveLimitFront"); if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { - if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { + if (arm->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) { g_Toast->AddToast(new ToastBean(_(u8"舱门打开时运动受限").c_str(), 5000, Toast::COLOR_RED)); } else { @@ -10855,10 +10851,10 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); } - + ImGui::PushID("arm_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pArm->SetZeroPos(); + arm->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); @@ -10879,13 +10875,13 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::Dummy(ImVec2(0, 35)); - + ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); if (IsMoldCanMoveUp()) { ImGui::PushID("MoldMovePointUp"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -10894,7 +10890,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (kb == GTS_AXIS_ID_MOLD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } } } @@ -10904,7 +10900,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); } } - + ImGui::SameLine(); if (IsMoldCanMoveUp()) { ImGui::PushID("MoldMoveLimitUp"); @@ -10912,13 +10908,13 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (!m_PowderAssist.isMoldUpRepeat) { m_PowderAssist.isMoldUpRepeat = true; m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); } } else { if (m_PowderAssist.isMoldUpRepeat) { - + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); m_PowderAssist.isMoldUpRepeat = false; } @@ -10943,7 +10939,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { if (IsMoldCanMoveUp()) { m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); @@ -10952,13 +10948,13 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); } - + if (IsMoldCanMoveDown()) { ImGui::PushID("MoldMovePointDown"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -10967,7 +10963,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (kb == GTS_AXIS_ID_MOLD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } } } @@ -10978,7 +10974,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } } ImGui::SameLine(); - + if (IsMoldCanMoveDown()) { ImGui::PushID("MoldMoveLimitDown"); @@ -10987,7 +10983,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) if (!m_PowderAssist.isMoldDownRepeat) { m_PowderAssist.isMoldDownRepeat = true; m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); } } else { @@ -11018,13 +11014,13 @@ void HBD1000::DrawPowderCtrl(bool *winShow) { if (IsMoldCanMoveDown()) { m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); } - + } if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) { @@ -11033,7 +11029,7 @@ void HBD1000::DrawPowderCtrl(bool *winShow) } ImGui::PushID("mold_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pMold->SetZeroPos(); + mold->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); @@ -11043,230 +11039,230 @@ void HBD1000::DrawPowderCtrl(bool *winShow) ImGui::EndChild(); ImGui::End(); - + } -//void HBD1000::DrawServoState(bool* winShow) -//{ -// -// ImGui::Begin(_(u8"伺服状态").c_str(), winShow,ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize| ImGuiWindowFlags_AlwaysAutoResize); -// ImGui::BeginTabBar("servo_state"); -// if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { -// AxisStateValue mold; -// m_Axis->m_Mold->GetState()->GetValue(mold); -// AxisStateValue mold_slave; -// m_Axis->m_MoldSlave->GetState()->GetValue(mold_slave); -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"打印主轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), mold.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), mold.BindSlaveFinish ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); -// ImGui::EndGroup(); -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"打印从轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold_slave.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold_slave.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), mold_slave.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), mold_slave.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), mold_slave.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), mold_slave.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), mold_slave.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold_slave.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), mold_slave.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold_slave.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold_slave.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold_slave.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold_slave.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), mold_slave.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), mold_slave.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold_slave.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"从轴伺服刹车: %s").c_str(), mold_slave.SlaveServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"从轴伺服解除绑定: %s").c_str(), mold_slave.SlaveUnbind ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold_slave.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold_slave.Torque); -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"清粉轴").c_str())) { -// AxisStateValue clean; -// m_Axis->m_Clean->GetState()->GetValue(clean); -// AxisStateValue clean_slave; -// m_Axis->m_CleanSlave->GetState()->GetValue(clean_slave); -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"清粉主轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), clean.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), clean.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), clean.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), clean.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), clean.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), clean.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), clean.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), clean.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), clean.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), clean.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), clean.BindSlaveFinish ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean.Torque); -// ImGui::EndGroup(); -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"清粉从轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean_slave.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean_slave.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), clean_slave.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), clean_slave.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), clean_slave.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), clean_slave.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), clean_slave.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean_slave.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), clean_slave.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean_slave.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean_slave.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean_slave.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean_slave.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), clean_slave.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), clean_slave.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean_slave.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"从轴伺服刹车: %s").c_str(), clean_slave.SlaveServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"从轴伺服解除绑定: %s").c_str(), clean_slave.SlaveUnbind ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean_slave.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean_slave.Torque); -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// AxisStateValue arm; -// m_Axis->m_Arm->GetState()->GetValue(arm); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// AxisStateValue load; -// m_Axis->m_Load->GetState()->GetValue(load); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// AxisStateValue supply; -// m_Axis->m_Supply->GetState()->GetValue(supply); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"光栅尺").c_str())) -// { -// g_SystemInfo->LockInfo(); -// float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; -// float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; -// float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; -// float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; -// g_SystemInfo->UnlockInfo(); -// ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); -// ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); -// ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); -// ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); -// ImGui::EndTabItem(); -// } -// ImGui::EndTabBar(); -// ImGui::End(); -//} +void HBD1000::DrawServoState(bool* winShow) +{ + + ImGui::Begin(_(u8"伺服状态").c_str(), winShow,ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize| ImGuiWindowFlags_AlwaysAutoResize); + ImGui::BeginTabBar("servo_state"); + if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { + AxisStateValue mold; + m_Axis->m_Mold->GetState()->GetValue(mold); + AxisStateValue mold_slave; + m_Axis->m_MoldSlave->GetState()->GetValue(mold_slave); + ImGui::BeginGroup(); + ImGui::Button(_(u8"打印主轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), mold.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), mold.BindSlaveFinish ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); + ImGui::EndGroup(); + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + ImGui::Button(_(u8"打印从轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold_slave.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold_slave.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), mold_slave.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), mold_slave.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), mold_slave.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), mold_slave.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), mold_slave.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold_slave.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), mold_slave.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold_slave.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold_slave.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold_slave.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold_slave.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), mold_slave.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), mold_slave.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold_slave.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"从轴伺服刹车: %s").c_str(), mold_slave.SlaveServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"从轴伺服解除绑定: %s").c_str(), mold_slave.SlaveUnbind ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold_slave.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold_slave.Torque); + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"清粉轴").c_str())) { + AxisStateValue clean; + m_Axis->m_Clean->GetState()->GetValue(clean); + AxisStateValue clean_slave; + m_Axis->m_CleanSlave->GetState()->GetValue(clean_slave); + ImGui::BeginGroup(); + ImGui::Button(_(u8"清粉主轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), clean.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), clean.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), clean.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), clean.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), clean.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), clean.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), clean.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), clean.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), clean.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), clean.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), clean.BindSlaveFinish ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean.Torque); + ImGui::EndGroup(); + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + ImGui::Button(_(u8"清粉从轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean_slave.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean_slave.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), clean_slave.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), clean_slave.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), clean_slave.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), clean_slave.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), clean_slave.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean_slave.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), clean_slave.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean_slave.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean_slave.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean_slave.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean_slave.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), clean_slave.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), clean_slave.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean_slave.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"从轴伺服刹车: %s").c_str(), clean_slave.SlaveServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"从轴伺服解除绑定: %s").c_str(), clean_slave.SlaveUnbind ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean_slave.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean_slave.Torque); + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + AxisStateValue arm; + m_Axis->m_Arm->GetState()->GetValue(arm); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + AxisStateValue load; + m_Axis->m_Load->GetState()->GetValue(load); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + AxisStateValue supply; + m_Axis->m_Supply->GetState()->GetValue(supply); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"光栅尺").c_str())) + { + g_SystemInfo->LockInfo(); + float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; + float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; + float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; + float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; + g_SystemInfo->UnlockInfo(); + ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); + ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); + ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); + ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); + ImGui::EndTabItem(); + } + ImGui::EndTabBar(); + ImGui::End(); +} void HBD1000::InitSignal(SignalStateWrapper* ssw, void* cc) diff --git a/PrintC/Machine/HBD1000.h b/PrintC/Machine/HBD1000.h index 54d7378..70bb4ad 100644 --- a/PrintC/Machine/HBD1000.h +++ b/PrintC/Machine/HBD1000.h @@ -59,7 +59,7 @@ public: void DrawAxisCfg(); void DrawPowderCtrl(bool* winShow); - //void DrawServoState(bool* winShow); + void DrawServoState(bool* winShow); virtual void CheckIO(); diff --git a/PrintC/Machine/HBD1200.cpp b/PrintC/Machine/HBD1200.cpp index 125a992..226c01c 100644 --- a/PrintC/Machine/HBD1200.cpp +++ b/PrintC/Machine/HBD1200.cpp @@ -1748,193 +1748,194 @@ void HBD1200::DrawSignal(bool* isshow) ImGui::End(); } + void HBD1200::DrawServoState(bool* winShow) { - ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize| ImGuiWindowFlags_AlwaysAutoResize); + ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize); ImGui::BeginTabBar("servo_state"); - //if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { - // AxisStateValue mold; - // m_Axis->m_Mold->GetState()->GetValue(mold); - // ImGui::BeginGroup(); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); - // //ImGui::Text(u8"主轴伺服绑定从轴: %s", mold.BindSlaveOn ? "YES" : "NO"); - // //ImGui::Text(u8"主从轴已经绑定: %s", mold.BindSlaveFinish ? "YES" : "NO"); - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); - // ImGui::EndGroup(); + if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { + AxisStateValue mold; + m_Axis->m_Mold->GetState()->GetValue(mold); + ImGui::BeginGroup(); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); + //ImGui::Text(u8"主轴伺服绑定从轴: %s", mold.BindSlaveOn ? "YES" : "NO"); + //ImGui::Text(u8"主从轴已经绑定: %s", mold.BindSlaveFinish ? "YES" : "NO"); + ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); + ImGui::EndGroup(); - // ImGui::SameLine(); - // ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); - // ImGui::SameLine(); + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); - // ImGui::BeginGroup(); - // g_SystemInfo->LockInfo(); - // float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; - // float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; - // float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; - // float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; - // g_SystemInfo->UnlockInfo(); - // ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); - // ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); - // ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); - // ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); + ImGui::BeginGroup(); + g_SystemInfo->LockInfo(); + float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; + float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; + float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; + float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; + g_SystemInfo->UnlockInfo(); + ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); + ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); + ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); + ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); - // ImGui::EndGroup(); - // ImGui::EndTabItem(); - //} + ImGui::EndGroup(); + ImGui::EndTabItem(); + } - //if (ImGui::BeginTabItem(_(u8"电缸").c_str())) { - // AxisStateValue ele_main; - // m_Axis->m_Ele->GetState()->GetValue(ele_main); - // AxisStateValue ele_slave; - // m_Axis->m_EleSlave->GetState()->GetValue(ele_slave); - // ImGui::BeginGroup(); - // ImGui::Button(_(u8"电缸主轴").c_str(), ImVec2(200, 0)); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_main.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_main.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_main.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_main.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_main.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"上JOG: %s").c_str(), ele_main.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"下JOG: %s").c_str(), ele_main.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_main.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), ele_main.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_main.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_main.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_main.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_main.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_main.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_main.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_main.ExceptionCode); //轴伺服异常字_R + if (ImGui::BeginTabItem(_(u8"电缸").c_str())) { + AxisStateValue ele_main; + m_Axis->m_Ele->GetState()->GetValue(ele_main); + AxisStateValue ele_slave; + m_Axis->m_EleSlave->GetState()->GetValue(ele_slave); + ImGui::BeginGroup(); + ImGui::Button(_(u8"电缸主轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_main.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_main.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_main.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_main.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_main.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), ele_main.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), ele_main.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_main.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), ele_main.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_main.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_main.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_main.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_main.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_main.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_main.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_main.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_main.ServoBreakOn ? "YES" : "NO"); - // ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_main.BindSlaveOn ? "YES" : "NO"); - // ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_main.BindSlaveFinish ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_main.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_main.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_main.BindSlaveFinish ? "YES" : "NO"); - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_main.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_main.Torque); - // ImGui::EndGroup(); - // ImGui::SameLine(); - // ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); - // ImGui::SameLine(); + ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_main.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_main.Torque); + ImGui::EndGroup(); + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); - // ImGui::BeginGroup(); - // ImGui::Button(_(u8"电缸从轴").c_str(), ImVec2(200, 0)); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_slave.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_slave.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_slave.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_slave.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_slave.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"上JOG: %s").c_str(), ele_slave.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"下JOG: %s").c_str(), ele_slave.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_slave.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), ele_slave.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_slave.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_slave.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_slave.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_slave.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_slave.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_slave.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_slave.ExceptionCode); //轴伺服异常字_R + ImGui::BeginGroup(); + ImGui::Button(_(u8"电缸从轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_slave.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_slave.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_slave.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_slave.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_slave.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), ele_slave.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), ele_slave.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_slave.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), ele_slave.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_slave.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_slave.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_slave.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_slave.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_slave.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_slave.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_slave.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_slave.ServoBreakOn ? "YES" : "NO"); - // ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_slave.BindSlaveOn ? "YES" : "NO"); - // ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_slave.BindSlaveFinish ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_slave.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_slave.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_slave.BindSlaveFinish ? "YES" : "NO"); - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_slave.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_slave.Torque); - // ImGui::EndGroup(); - // ImGui::EndTabItem(); - //} + ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_slave.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_slave.Torque); + ImGui::EndGroup(); + ImGui::EndTabItem(); + } - //if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { - // AxisStateValue arm; - // m_Axis->m_Arm->GetState()->GetValue(arm); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); - // ImGui::EndTabItem(); - //} + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + AxisStateValue arm; + m_Axis->m_Arm->GetState()->GetValue(arm); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); + ImGui::EndTabItem(); + } - //if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { - // AxisStateValue load; - // m_Axis->m_Load->GetState()->GetValue(load); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); - // ImGui::EndTabItem(); - //} + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + AxisStateValue load; + m_Axis->m_Load->GetState()->GetValue(load); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); + ImGui::EndTabItem(); + } - //if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { - // AxisStateValue supply; - // m_Axis->m_Supply->GetState()->GetValue(supply); - // //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); - // ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); - // ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); - // ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); - // ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); - // ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); - // ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); - // ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); - // ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R - // ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); - // ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); - // ImGui::EndTabItem(); - //} + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + AxisStateValue supply; + m_Axis->m_Supply->GetState()->GetValue(supply); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); + ImGui::EndTabItem(); + } ImGui::EndTabBar(); ImGui::End(); @@ -2835,11 +2836,9 @@ void HBD1200::DrawPowderCtrl(bool* winShow) static bool continue_move = false; //CoverCfg* coverCfg = m_CoverCfg; - MainAxisState* pMold = m_Axis->m_Mold->GetState(); - //MainAxisState* ele = m_Axis->m_Clean->GetState(); - AxisState* pLoad = m_Axis->m_Load->GetState(); - AxisState* pArm = m_Axis->m_Arm->GetState(); - AxisState* pSupply = m_Axis->m_Supply->GetState(); + MainAxisState* mold = m_Axis->m_Mold->GetState(); + AxisState* load = m_Axis->m_Load->GetState(); + AxisState* arm = m_Axis->m_Arm->GetState(); AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); AxisConfig::CfgValue armCfgVal; @@ -2903,7 +2902,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if ((g_Admin > USER_ADMIN)) { ImGui::Dummy(ImVec2(0, 20)); - if (pMold->m_MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) { @@ -2931,7 +2930,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) ImGui::SameLine(); - if (pMold->m_MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) { @@ -2957,7 +2956,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到底座缸平面位").c_str()); } ImGui::SameLine(); - if (pMold->m_MoveAbsPos) + if (mold->m_MoveAbsPos) { if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) { @@ -3012,7 +3011,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (g_Admin > USER_ADMIN) { ImGui::Dummy(ImVec2(0, 20)); - if (pLoad->m_MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) { @@ -3040,7 +3039,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) } ImGui::SameLine(); - if (pLoad->m_MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) { @@ -3067,7 +3066,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道清粉位").c_str()); } ImGui::SameLine(); - if (pLoad->m_MoveAbsPos) + if (load->m_MoveAbsPos) { if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) { @@ -3123,7 +3122,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (g_Admin > USER_ADMIN) { ImGui::Dummy(ImVec2(0, 20)); - if (pArm->m_MoveAbsPos) + if (arm->m_MoveAbsPos) { if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) { @@ -3150,7 +3149,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到接粉位").c_str()); } ImGui::SameLine(); - if (pArm->m_MoveAbsPos) + if (arm->m_MoveAbsPos) { if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) { @@ -3625,7 +3624,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) ImGui::PushID("LoadMovePointLeft"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), pLoad->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -3634,7 +3633,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (kb == GTS_AXIS_ID_LOAD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), pLoad->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } } } @@ -3653,7 +3652,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), pLoad->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -3662,7 +3661,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (kb == GTS_AXIS_ID_LOAD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), pLoad->GetShowPos(), loadCfgVal.rel); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); } } } @@ -3679,7 +3678,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (!m_PowderAssist.isLoadLeftRepeat) { m_PowderAssist.isLoadLeftRepeat = true; m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); } } else { @@ -3709,7 +3708,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { if (IsLoadAxisCanMoveLeft()) { m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); - g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); @@ -3727,7 +3726,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (!m_PowderAssist.isLoadRightRepeat) { m_PowderAssist.isLoadRightRepeat = true; m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); } } @@ -3758,7 +3757,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) { if (IsLoadAxisCanMoveRight()) { m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); - g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), pLoad->GetShowPos()); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); @@ -3771,7 +3770,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) } ImGui::PushID("load_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pLoad->SetZeroPos(); + load->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); @@ -3785,9 +3784,9 @@ void HBD1200::DrawPowderCtrl(bool* winShow) //ImGui::Dummy(ImVec2(500,1)); ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); ImGui::BeginGroup(); - ImGui::Text(_(u8"移栽轴:%.3f").c_str(), pLoad->GetShowPos() / 1000.0f); - ImGui::Text(_(u8"成型缸:%.3f").c_str(), pMold->GetShowPos() / 1000.0f); - ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), pArm->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); ImGui::EndGroup(); ImGui::SameLine(350); ImGui::BeginGroup(); @@ -3843,11 +3842,11 @@ void HBD1200::DrawPowderCtrl(bool* winShow) MotionDrawAssist assit; AxisStateValue loadvalue; - pLoad->GetValue(loadvalue); - AxisStateValue mold; - pMold->GetValue(mold); - AxisStateValue arm; - pArm->GetValue(arm); + load->GetValue(loadvalue); + AxisStateValue moldValue; + mold->GetValue(moldValue); + AxisStateValue armValue; + arm->GetValue(armValue); AxisData axisData; m_SysParamWrapper->GetAxisData(axisData); float loadposdif = axisData.LoadAxisTrackCleanPos - axisData.LoadAxisTrackPrintPos; @@ -3866,8 +3865,8 @@ void HBD1200::DrawPowderCtrl(bool* winShow) }*/ - assit.moldRpos = mold.RPos>1.0f ? 1.0f : mold.RPos; - assit.armRPos = arm.RPos; + assit.moldRpos = moldValue.RPos>1.0f ? 1.0f : moldValue.RPos; + assit.armRPos = armValue.RPos; assit.isCleanPressure = true; assit.isPrintPressure = true; assit.isPrintMoldSupprt = false; @@ -4024,7 +4023,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) ImGui::PushID("arm_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pArm->SetZeroPos(); + arm->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); @@ -4048,7 +4047,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) ImGui::PushID("MoldMovePointUp"); if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -4057,7 +4056,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (kb == GTS_AXIS_ID_MOLD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } } } @@ -4075,7 +4074,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (!m_PowderAssist.isMoldUpRepeat) { m_PowderAssist.isMoldUpRepeat = true; m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); } } else { @@ -4104,7 +4103,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { if (IsMoldCanMoveUp()) { m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); - g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); } else { g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); @@ -4119,7 +4118,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } ImGui::PopID(); if (ImGui::IsItemHovered()) { @@ -4128,7 +4127,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (kb == GTS_AXIS_ID_MOLD && !continue_move) { if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), pMold->GetShowPos(), moldCfgVal.rel); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); } } } @@ -4148,7 +4147,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) if (!m_PowderAssist.isMoldDownRepeat) { m_PowderAssist.isMoldDownRepeat = true; m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); } } else { @@ -4179,7 +4178,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) { if (IsMoldCanMoveDown()) { m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); - g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), pMold->GetShowPos()); + g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); } else { @@ -4194,7 +4193,7 @@ void HBD1200::DrawPowderCtrl(bool* winShow) } ImGui::PushID("mold_to_zero"); if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) - pMold->SetZeroPos(); + mold->SetZeroPos(); ImGui::PopID(); if (ImGui::IsItemHovered()) { ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); diff --git a/PrintC/Machine/HBD1200OLD.cpp b/PrintC/Machine/HBD1200OLD.cpp index 298c160..75cc103 100644 --- a/PrintC/Machine/HBD1200OLD.cpp +++ b/PrintC/Machine/HBD1200OLD.cpp @@ -8,6 +8,7 @@ #include "../Toast.h" #include "../SystemInfo.h" #include "../Logger.h" +#include "../DataManage/DataHandle.h" const int HBD1200OLD::IO_V0 = 0; HBD1200OLD::HBD1200OLD(MachineTypeCfg::MachineTypeId type) :Machine(type) @@ -1726,196 +1727,196 @@ void HBD1200OLD::DrawSignal(bool* isshow) ImGui::End(); } -//void HBD1200OLD::DrawServoState(bool* winShow) -//{ -// -// ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize); -// ImGui::BeginTabBar("servo_state"); -// if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { -// AxisStateValue mold; -// m_Axis->m_Mold->GetState()->GetValue(mold); -// ImGui::BeginGroup(); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// g_SystemInfo->LockInfo(); -// float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; -// float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; -// float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; -// float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; -// g_SystemInfo->UnlockInfo(); -// ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); -// ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); -// ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); -// ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); -// -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"电缸").c_str())) { -// AxisStateValue ele_main; -// m_Axis->m_Ele->GetState()->GetValue(ele_main); -// AxisStateValue ele_slave; -// m_Axis->m_EleSlave->GetState()->GetValue(ele_slave); -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"电缸主轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_main.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_main.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_main.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_main.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_main.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), ele_main.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), ele_main.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_main.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), ele_main.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_main.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_main.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_main.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_main.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_main.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_main.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_main.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_main.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_main.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_main.BindSlaveFinish ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_main.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_main.Torque); -// ImGui::EndGroup(); -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// ImGui::Button(_(u8"电缸从轴").c_str(), ImVec2(200, 0)); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_slave.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_slave.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_slave.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_slave.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_slave.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), ele_slave.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), ele_slave.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_slave.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), ele_slave.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_slave.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_slave.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_slave.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_slave.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_slave.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_slave.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_slave.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_slave.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_slave.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_slave.BindSlaveFinish ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_slave.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_slave.Torque); -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// AxisStateValue arm; -// m_Axis->m_Arm->GetState()->GetValue(arm); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// AxisStateValue load; -// m_Axis->m_Load->GetState()->GetValue(load); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// AxisStateValue supply; -// m_Axis->m_Supply->GetState()->GetValue(supply); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); -// ImGui::EndTabItem(); -// } -// -// ImGui::EndTabBar(); -// ImGui::End(); -//} +void HBD1200OLD::DrawServoState(bool* winShow) +{ + + ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize); + ImGui::BeginTabBar("servo_state"); + if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { + AxisStateValue mold; + m_Axis->m_Mold->GetState()->GetValue(mold); + ImGui::BeginGroup(); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + g_SystemInfo->LockInfo(); + float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; + float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; + float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; + float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; + g_SystemInfo->UnlockInfo(); + ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); + ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); + ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); + ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); + + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"电缸").c_str())) { + AxisStateValue ele_main; + m_Axis->m_Ele->GetState()->GetValue(ele_main); + AxisStateValue ele_slave; + m_Axis->m_EleSlave->GetState()->GetValue(ele_slave); + ImGui::BeginGroup(); + ImGui::Button(_(u8"电缸主轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_main.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_main.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_main.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_main.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_main.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), ele_main.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), ele_main.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_main.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), ele_main.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_main.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_main.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_main.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_main.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_main.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_main.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_main.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_main.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_main.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_main.BindSlaveFinish ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_main.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_main.Torque); + ImGui::EndGroup(); + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + ImGui::Button(_(u8"电缸从轴").c_str(), ImVec2(200, 0)); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), ele_slave.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), ele_slave.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), ele_slave.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), ele_slave.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), ele_slave.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), ele_slave.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), ele_slave.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), ele_slave.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), ele_slave.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), ele_slave.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), ele_slave.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), ele_slave.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), ele_slave.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), ele_slave.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), ele_slave.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), ele_slave.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), ele_slave.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), ele_slave.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), ele_slave.BindSlaveFinish ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), ele_slave.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), ele_slave.Torque); + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + AxisStateValue arm; + m_Axis->m_Arm->GetState()->GetValue(arm); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + AxisStateValue load; + m_Axis->m_Load->GetState()->GetValue(load); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + AxisStateValue supply; + m_Axis->m_Supply->GetState()->GetValue(supply); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + ImGui::End(); +} //void HBD1200OLD::DrawAxisCfg() //{ @@ -2795,1365 +2796,1378 @@ void HBD1200OLD::DrawSignal(bool* isshow) // ImGui::EndChild(); //} -void HBD1200OLD::DrawPowderCtrl(bool* winShow) -{} -//void HBD1200OLD::DrawPowderCtrl(bool* winShow) -//{ -// ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); -// ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); -// ImGui::PopStyleVar(); -// -// int dstepflag = 1; -// double fstepflag = 1.0; -// long lstepflag = 1; -// static int kb = GTS_AXIS_ID_ARM; -// static bool continue_move = false; -// -// //CoverCfg* coverCfg = m_CoverCfg; -// MainAxisState* mold = m_Axis->m_Mold->GetState(); -// //MainAxisState* ele = m_Axis->m_Clean->GetState(); -// AxisState* load = m_Axis->m_Load->GetState(); -// AxisState* arm = m_Axis->m_Arm->GetState(); -// AxisState* supply = m_Axis->m_Supply->GetState(); -// -// AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); -// AxisConfig::CfgValue armCfgVal; -// armCfg->GetValue(armCfgVal); -// AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); -// AxisConfig::CfgValue moldCfgVal; -// moldCfg->GetValue(moldCfgVal); -// //AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); -// //AxisConfig::CfgValue cleanCfgVal; -// //cleanCfg->GetValue(cleanCfgVal); -// AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); -// AxisConfig::CfgValue loadCfgVal; -// loadCfg->GetValue(loadCfgVal); -// AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); -// AxisConfig::CfgValue supplyCfgVal; -// supplyCfg->GetValue(supplyCfgVal); -// -// ChartletManager* chartletManager = ChartletManager::GetInstance(); -// ImVec2 wpos = ImGui::GetWindowPos(); -// SignalService::GetInstance().GetSignalState(m_SignalState); -// if (m_PowderAssist.isLeftExpand) -// { -// ImGui::BeginGroup(); -// vector tabs; -// tabs.push_back(_(u8"成型缸")); -// tabs.push_back(_(u8"移载轴")); -// tabs.push_back(_(u8"铺粉轴")); -// tabs.push_back(_(u8"供粉轴")); -// tabs.push_back(_(u8"铺粉")); -// tabs.push_back(_(u8"控制")); -// int tabwidth = 0; -// for (size_t tindex = 0; tindex < tabs.size(); tindex++) { -// tabwidth = tabwidth + ImGui::CalcTextSize(tabs[tindex].c_str(), 0).x + 15; -// } -// ImVec2 showSize = ImVec2(tabwidth, 600); -// -// ImGui::BeginChild("AxisSettingChild", showSize, false, ImGuiWindowFlags_NoNav); -// ImGui::BeginTabBar("AxisSetting"); -// if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Speed->SetValue(moldCfgVal.speed); -// g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Acc->SetValue(moldCfgVal.acc); -// g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Dec->SetValue(moldCfgVal.dec); -// g_log->TraceInfo(_(u8"更新成型缸减速度:%.3f").c_str(), moldCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); -// g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// -// if ((g_Admin > USER_ADMIN)) { -// ImGui::Dummy(ImVec2(0, 20)); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印升降轴移动到安全位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到安全位").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到安全位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印升降轴移动到安全位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到安全位").c_str()); -// } -// -// ImGui::SameLine(); -// -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottoming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印轴移动到底座缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到底座缸平面位").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到底座缸平面位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印轴移动到底座缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到底座缸平面位").c_str()); -// } -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印轴移动到基板缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到基板缸平面位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到基板缸平面位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印轴移动到基板缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到基板缸平面位").c_str()); -// } -// } -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Speed->SetValue(loadCfgVal.speed); -// g_log->TraceInfo(_(u8"更新移载轴速度:%.3f").c_str(), loadCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Acc->SetValue(loadCfgVal.acc); -// g_log->TraceInfo(_(u8"更新移载轴加速度:%.3f").c_str(), loadCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Dec->SetValue(loadCfgVal.dec); -// g_log->TraceInfo(_(u8"更新移载轴减速度:%.3f").c_str(), loadCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); -// g_log->TraceInfo(_(u8"更新移载轴点动距离:%.3f").c_str(), loadCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道吊装位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道吊装位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道吊装位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道吊装位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道吊装位").c_str()); -// } -// -// ImGui::SameLine(); -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道清粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道清粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道清粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道清粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道清粉位").c_str()); -// } -// ImGui::SameLine(); -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道打印位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道打印位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道打印位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道打印位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道打印位").c_str()); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Speed->SetValue(armCfgVal.speed); -// g_log->TraceInfo(_(u8"更新铺粉轴速度:%.3f").c_str(), armCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Acc->SetValue(armCfgVal.acc); -// g_log->TraceInfo(_(u8"更新铺粉轴加速度:%.3f").c_str(), armCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Dec->SetValue(armCfgVal.dec); -// g_log->TraceInfo(_(u8"更新铺粉轴减速度:%.3f").c_str(), armCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// armCfg->m_RefDistance->SetValue(armCfgVal.rel); -// g_log->TraceInfo(_(u8"更新铺粉轴点动距离:%.3f").c_str(), armCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断铺粉轴移动到接粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到接粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到接粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行铺粉轴移动到接粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到接粉位").c_str()); -// } -// ImGui::SameLine(); -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断铺粉轴移动到前下粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到前下粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到前下粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行铺粉轴移动到前下粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到前下粉位").c_str()); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); -// g_log->TraceInfo(_(u8"更新下粉轴速度:%.3f").c_str(), supplyCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); -// g_log->TraceInfo(_(u8"更新下粉轴加速度:%.3f").c_str(), supplyCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); -// g_log->TraceInfo(_(u8"更新下粉轴减速度:%.3f").c_str(), supplyCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"粉格").c_str(), ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); -// g_log->TraceInfo(_(u8"更新下粉轴相对移动距离:%.3f").c_str(), supplyCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉").c_str())) { -// AxisData ad; -// m_SysParamWrapper->GetAxisData(ad); -// vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; -// ImGui::PushItemWidth(120); -// if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { -// m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); -// g_log->TraceInfo(_(u8"更新铺粉方式:%d").c_str(), ad.CoverType); -// } -// -// if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); -// g_log->TraceInfo(_(u8"更新铺粉速度:%.3f").c_str(), ad.CoverSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); -// g_log->TraceInfo(_(u8"更新打印单向返回速度:%.3f").c_str(), ad.CoverReturnSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); -// g_log->TraceInfo(_(u8"更新打印单向铺粉距离:%.3f").c_str(), ad.CoverDistance); -// } -// if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); -// g_log->TraceInfo(_(u8"更新打印铺粉层厚:%.3f").c_str(), ad.LayerThick); -// } -// if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); -// g_log->TraceInfo(_(u8"更新打印间隙补偿:%.3f").c_str(), ad.FixGap); -// } -// if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); -// g_log->TraceInfo(_(u8"更新打印铺粉格数:%d").c_str(), ad.SupplyCount); -// } -// if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); -// g_log->TraceInfo(_(u8"更新打印下粉时间:%d").c_str(), ad.SupplyTime); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); -// g_log->TraceInfo(_(u8"更新铺粉调试层厚:%.3f").c_str(), ad.DebugLayerThick); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); -// g_log->TraceInfo(_(u8"更新铺粉调试间隙补偿:%.3f").c_str(), ad.DebugFixGap); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); -// g_log->TraceInfo(_(u8"更新铺粉调试下粉时间:%d").c_str(), ad.DebugSupplyTime); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); -// g_log->TraceInfo(_(u8"更新铺粉调试格数:%d").c_str(), ad.DebugSupplyCount); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); -// g_log->TraceInfo(_(u8"更新铺粉调试距离:%.3f").c_str(), ad.DebugCoverDistance); -// } -// ImGui::PopItemWidth(); -// -// ImGui::Dummy(ImVec2(0, 20)); -// if (m_SignalStateWrapper->m_IsCovering->GetValue()) { -// ImGui::PushID("CoverTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str(), ImVec2(-1, 0))) { -// m_SignalStateWrapper->m_CoverTriger->SetValue(false); -// g_log->TraceInfo(_(u8"停止铺粉调试").c_str()); -// } -// ImGui::PopID(); -// } -// else { -// // if (m_Purifier->IsCoverWindSet()) -// // { -// // m_Purifier->ResetSlowWind(); -// // } -// if (ImGui::Button(_(u8"铺粉调试").c_str(), ImVec2(-1, 0))) { -// if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { -// // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { -// // m_Purifier->SetCoverWind(true); -// // } -// m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); -// Sleep(50); -// m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); -// Sleep(50); -// g_log->TraceInfo(_(u8"执行铺粉调试").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"铺粉调试条件不成立").c_str(), 3000)); -// } -// } -// } -// ImGui::EndTabItem(); -// } -// if (g_Admin > USER_ADMIN) { -// if (ImGui::BeginTabItem(_(u8"控制").c_str())) { -// if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { -// ImGui::PushID("CylinderReachPrintTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); -// if (ImGui::Button(_(u8"移动缸体到打印位").c_str())) { -// if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行移动缸体到打印位").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"移动缸体到打印位条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { -// ImGui::PushID("CylinderReachCleanTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); -// if (ImGui::Button(_(u8"移动缸体到清粉位").c_str())) { -// if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行移动缸体到清粉位").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"移动缸体到清粉位条件不成立").c_str(), 3000)); -// } -// -// } -// ImGui::PopItemFlag(); -// } -// -// -// if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { -// ImGui::PushID("CylinderPrintLoadTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体打印位装载").c_str())) { -// if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体打印位装载").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体打印位装载条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体连接清粉箱").c_str())) { -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体连接清粉箱").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体连接清粉箱条件不成立").c_str(), 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { -// ImGui::PushID("CylinderPrintUnloadTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体打印位卸载").c_str())) { -// if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体打印位卸载").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体打印位卸载条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体脱离清粉箱").c_str())) { -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体脱离清粉箱").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体脱离清粉箱条件不成立").c_str(), 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// ImGui::EndTabItem(); -// } -// } -// ImGui::EndTabBar(); -// ImGui::EndChild(); -// -// -// if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(tabwidth, 0))) { -// m_Axis->StopAll(); -// g_log->TraceInfo(_(u8"运动急停").c_str()); -// } -// -// ImGui::EndGroup(); -// ImGui::SameLine(); -// } -// -// ImGui::BeginChild("AxisCtrl", ImVec2(840, 670)); -// if (m_PowderAssist.isLeftExpand) { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) -// continue_move = !continue_move; -// ImGui::SameLine(); -// ImGui::Text(_(u8"连续运动").c_str()); -// -// ImGui::Dummy(ImVec2(0, 250)); -// /* -// */ -// -// if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadOut(); -// ImGui::OpenPopup(_(u8"移载载出").c_str()); -// g_log->TraceInfo(_(u8"执行移出").c_str()); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"载出").c_str()); -// } -// ImGui::SameLine(); -// if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadIn(); -// ImGui::OpenPopup(_(u8"移载载入").c_str()); -// g_log->TraceInfo(_(u8"执行移入").c_str()); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"载入").c_str()); -// } -// -// if (ImGui::BeginPopupModal(_(u8"移载载入").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadInProcStep() == In_Start) { -// ImGui::Text(_(u8"移载开始载入").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { -// ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderReachPrint) { -// ImGui::Text(_(u8"缸体到打印位运行中").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderPrintLoad) { -// ImGui::Text(_(u8"缸体打印位装载运行中").c_str()); -// } -// if (GetLoadInResult() == In_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() == In_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() > In_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadIn()) { -// if (ImGui::Button(_(u8"中断载入").c_str(), ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// ImGui::EndPopup(); -// } -// -// if (ImGui::BeginPopupModal(_(u8"移载载出").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadOutProcSetp() == Out_Start) -// { -// ImGui::Text(_(u8"移载开始载出").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) -// { -// ImGui::Text(_(u8"缸体打印位卸载运行中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachClean) -// { -// ImGui::Text(_(u8"缸体到清粉位运行中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) -// { -// ImGui::Text(_(u8"缸体与清粉箱连接中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachHand) -// { -// ImGui::Text(_(u8"缸体与吊装位运行中").c_str()); -// } -// -// if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) -// { -// ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); -// } -// -// -// if (m_NeedWaitSelectOutPos) { -// vector combtemp = { _(u8"清粉位"),_(u8"吊装位") }; -// ImGui::SemicolonCombo(_(u8"选择载出位置").c_str(), &m_SelectOutPos, combtemp); -// if (ImGui::Button(_(u8"下一步").c_str())) -// { -// m_WaitSelectOutPosCommit = true; -// } -// } -// -// if (IsWaitConnectBoxCommit()) { -// if (ImGui::Button(_(u8"执行缸体与清粉箱连接").c_str())) -// { -// SetWaitConnectBoxCommit(false); -// } -// } -// -// if (GetLoadOutResult() == Out_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() == Out_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() > Out_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadOut()) { -// if (ImGui::Button(_(u8"中断载出").c_str(), ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// ImGui::EndPopup(); -// } -// -// -// ImGui::Dummy(ImVec2(0, 80)); -// ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); -// if (IsLoadAxisCanMoveLeft()) -// { -// ImGui::PushID("LoadMovePointLeft"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsLoadAxisCanMoveRight()) -// { -// ImGui::PushID("LoadMovePointRight"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// } -// -// if (IsLoadAxisCanMoveLeft()) { -// ImGui::PushID("LoadMoveLimitLeft"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isLoadLeftRepeat) { -// m_PowderAssist.isLoadLeftRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isLoadLeftRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// if (m_PowderAssist.isLoadLeftRepeat) { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// if (IsLoadAxisCanMoveLeft()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// } -// -// ImGui::SameLine(); -// if (IsLoadAxisCanMoveRight()) { -// ImGui::PushID("LoadMoveLimitRight"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isLoadRightRepeat) { -// m_PowderAssist.isLoadRightRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); -// } -// -// } -// else { -// if (m_PowderAssist.isLoadRightRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// if (m_PowderAssist.isLoadRightRepeat) { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) -// { -// if (IsLoadAxisCanMoveRight()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// } -// } -// ImGui::PushID("load_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// load->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); -// } -// -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// -// //ImGui::Dummy(ImVec2(500,1)); -// ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); -// ImGui::BeginGroup(); -// ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); -// ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); -// ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); -// ImGui::EndGroup(); -// ImGui::SameLine(350); -// ImGui::BeginGroup(); -// ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); -// -// -// ImGui::PushID("SupplyMovePointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"下粉轴前转%.2f格").c_str(), supplyCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// ImGui::SameLine(); -// ImGui::PushID("SupplyMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isSupplyNegativeRepeat) { -// m_PowderAssist.isSupplyNegativeRepeat = true; -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// //OutputDebugString("left\n"); -// } -// } -// else { -// if (m_PowderAssist.isSupplyNegativeRepeat) -// { -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isSupplyNegativeRepeat = false; -// //OutputDebugString("stop\n"); -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// ImGui::EndGroup(); -// ImGui::EndChild(); -// -// MotionDrawAssist assit; -// assit.loadRPos = load->m_RPos>1.0f ? 1.0f : load->m_RPos; -// int cylinderState = m_SignalState.m_CylinderState; -// if (cylinderState == CylinderInCleanUnConnectBox || -// cylinderState == CylinderInCleanConnectedBox || -// cylinderState == CylinderInHand) { -// assit.loadRPos = 1.0f; -// } -// -// assit.moldRpos = mold->m_RPos>1.0f ? 1.0f : mold->m_RPos; -// assit.armRPos = arm->m_RPos; -// assit.isCleanPressure = true; -// assit.isPrintPressure = true; -// assit.isPrintMoldSupprt = false; -// assit.isPrintJackup = false; -// assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); -// assit.isCleanClose = true; -// if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); -// ImGui::Powder1500V1(assit); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// ImGui::Dummy(ImVec2(0, 170)); -// ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMovPointBack"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMoveLimitBack"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isArmBackRepeat) { -// m_PowderAssist.isArmBackRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// } -// else { -// if (m_PowderAssist.isArmBackRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmBackRepeat) { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) -// { -// if (IsArmCanMoveBack()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// } -// } -// -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMovPointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isArmFrontRepeat) { -// m_PowderAssist.isArmFrontRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// } -// else { -// if (m_PowderAssist.isArmFrontRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmFrontRepeat) { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// if (IsArmCanMoveFront()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// ImGui::PushID("arm_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// arm->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); -// } -// if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) -// { -// ImGui::SameLine(); -// ImGui::PushID("arm_alarm_remove"); -// if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴越限解除").c_str()); -// } -// } -// ImGui::Dummy(ImVec2(0, 35)); -// ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMovePointUp"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMoveLimitUp"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isMoldUpRepeat) { -// m_PowderAssist.isMoldUpRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldUpRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// if (m_PowderAssist.isMoldUpRepeat) { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// if (IsMoldCanMoveUp()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// } -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMovePointDown"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMoveLimitDown"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isMoldDownRepeat) { -// m_PowderAssist.isMoldDownRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldDownRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); -// } -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// if (m_PowderAssist.isMoldDownRepeat) { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) -// { -// if (IsMoldCanMoveDown()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); -// } -// else -// { -// g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// } -// } -// ImGui::PushID("mold_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// mold->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); -// } -// ImGui::EndGroup(); -// -// ImGui::EndChild(); -// -// ImGui::End(); -// -//} +void HBD1200OLD::DrawPowderCtrl(bool* winShow) +{ + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); + ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); + ImGui::PopStyleVar(); + + int dstepflag = 1; + double fstepflag = 1.0; + long lstepflag = 1; + static int kb = GTS_AXIS_ID_ARM; + static bool continue_move = false; + + //CoverCfg* coverCfg = m_CoverCfg; + MainAxisState* mold = m_Axis->m_Mold->GetState(); + //MainAxisState* ele = m_Axis->m_Clean->GetState(); + AxisState* load = m_Axis->m_Load->GetState(); + AxisState* arm = m_Axis->m_Arm->GetState(); + AxisState* supply = m_Axis->m_Supply->GetState(); + + AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); + AxisConfig::CfgValue armCfgVal; + armCfg->GetValue(armCfgVal); + AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); + AxisConfig::CfgValue moldCfgVal; + moldCfg->GetValue(moldCfgVal); + //AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); + //AxisConfig::CfgValue cleanCfgVal; + //cleanCfg->GetValue(cleanCfgVal); + AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); + AxisConfig::CfgValue loadCfgVal; + loadCfg->GetValue(loadCfgVal); + AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); + AxisConfig::CfgValue supplyCfgVal; + supplyCfg->GetValue(supplyCfgVal); + + ChartletManager* chartletManager = ChartletManager::GetInstance(); + ImVec2 wpos = ImGui::GetWindowPos(); + SignalService::GetInstance().GetSignalState(m_SignalState); + if (m_PowderAssist.isLeftExpand) + { + ImGui::BeginGroup(); + vector tabs; + tabs.push_back(_(u8"成型缸")); + tabs.push_back(_(u8"移载轴")); + tabs.push_back(_(u8"铺粉轴")); + tabs.push_back(_(u8"供粉轴")); + tabs.push_back(_(u8"铺粉")); + tabs.push_back(_(u8"控制")); + float tabwidth = 0; + for (size_t tindex = 0; tindex < tabs.size(); tindex++) { + tabwidth = tabwidth + ImGui::CalcTextSize(tabs[tindex].c_str(), 0).x + 15; + } + ImVec2 showSize = ImVec2(tabwidth, 600); + + ImGui::BeginChild("AxisSettingChild", showSize, false, ImGuiWindowFlags_NoNav); + ImGui::BeginTabBar("AxisSetting"); + if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Speed->SetValue(moldCfgVal.speed); + g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Acc->SetValue(moldCfgVal.acc); + g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Dec->SetValue(moldCfgVal.dec); + g_log->TraceInfo(_(u8"更新成型缸减速度:%.3f").c_str(), moldCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); + g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); + } + ImGui::PopItemWidth(); + + if ((g_Admin > USER_ADMIN)) { + ImGui::Dummy(ImVec2(0, 20)); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印升降轴移动到安全位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到安全位").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到安全位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印升降轴移动到安全位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到安全位").c_str()); + } + + ImGui::SameLine(); + + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottoming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印轴移动到底座缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到底座缸平面位").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到底座缸平面位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印轴移动到底座缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到底座缸平面位").c_str()); + } + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) + { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印轴移动到基板缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到基板缸平面位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到基板缸平面位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印轴移动到基板缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到基板缸平面位").c_str()); + } + } + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Speed->SetValue(loadCfgVal.speed); + g_log->TraceInfo(_(u8"更新移载轴速度:%.3f").c_str(), loadCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Acc->SetValue(loadCfgVal.acc); + g_log->TraceInfo(_(u8"更新移载轴加速度:%.3f").c_str(), loadCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Dec->SetValue(loadCfgVal.dec); + g_log->TraceInfo(_(u8"更新移载轴减速度:%.3f").c_str(), loadCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); + g_log->TraceInfo(_(u8"更新移载轴点动距离:%.3f").c_str(), loadCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道吊装位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道吊装位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道吊装位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道吊装位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道吊装位").c_str()); + } + + ImGui::SameLine(); + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道清粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道清粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道清粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道清粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道清粉位").c_str()); + } + ImGui::SameLine(); + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道打印位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道打印位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道打印位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道打印位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道打印位").c_str()); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Speed->SetValue(armCfgVal.speed); + g_log->TraceInfo(_(u8"更新铺粉轴速度:%.3f").c_str(), armCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Acc->SetValue(armCfgVal.acc); + g_log->TraceInfo(_(u8"更新铺粉轴加速度:%.3f").c_str(), armCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Dec->SetValue(armCfgVal.dec); + g_log->TraceInfo(_(u8"更新铺粉轴减速度:%.3f").c_str(), armCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + armCfg->m_RefDistance->SetValue(armCfgVal.rel); + g_log->TraceInfo(_(u8"更新铺粉轴点动距离:%.3f").c_str(), armCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断铺粉轴移动到接粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到接粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到接粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行铺粉轴移动到接粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到接粉位").c_str()); + } + ImGui::SameLine(); + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断铺粉轴移动到前下粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到前下粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到前下粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行铺粉轴移动到前下粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到前下粉位").c_str()); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); + g_log->TraceInfo(_(u8"更新下粉轴速度:%.3f").c_str(), supplyCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); + g_log->TraceInfo(_(u8"更新下粉轴加速度:%.3f").c_str(), supplyCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); + g_log->TraceInfo(_(u8"更新下粉轴减速度:%.3f").c_str(), supplyCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"粉格").c_str(), ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); + g_log->TraceInfo(_(u8"更新下粉轴相对移动距离:%.3f").c_str(), supplyCfgVal.rel); + } + ImGui::PopItemWidth(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉").c_str())) { + AxisData ad; + m_SysParamWrapper->GetAxisData(ad); + vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; + ImGui::PushItemWidth(120); + if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { + m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); + g_log->TraceInfo(_(u8"更新铺粉方式:%d").c_str(), ad.CoverType); + } + + if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); + g_log->TraceInfo(_(u8"更新铺粉速度:%.3f").c_str(), ad.CoverSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); + g_log->TraceInfo(_(u8"更新打印单向返回速度:%.3f").c_str(), ad.CoverReturnSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); + g_log->TraceInfo(_(u8"更新打印单向铺粉距离:%.3f").c_str(), ad.CoverDistance); + } + if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); + g_log->TraceInfo(_(u8"更新打印铺粉层厚:%.3f").c_str(), ad.LayerThick); + } + if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); + g_log->TraceInfo(_(u8"更新打印间隙补偿:%.3f").c_str(), ad.FixGap); + } + if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); + g_log->TraceInfo(_(u8"更新打印铺粉格数:%d").c_str(), ad.SupplyCount); + } + if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); + g_log->TraceInfo(_(u8"更新打印下粉时间:%d").c_str(), ad.SupplyTime); + } + if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); + g_log->TraceInfo(_(u8"更新铺粉调试层厚:%.3f").c_str(), ad.DebugLayerThick); + } + if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); + g_log->TraceInfo(_(u8"更新铺粉调试间隙补偿:%.3f").c_str(), ad.DebugFixGap); + } + if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); + g_log->TraceInfo(_(u8"更新铺粉调试下粉时间:%d").c_str(), ad.DebugSupplyTime); + } + if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); + g_log->TraceInfo(_(u8"更新铺粉调试格数:%d").c_str(), ad.DebugSupplyCount); + } + if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); + g_log->TraceInfo(_(u8"更新铺粉调试距离:%.3f").c_str(), ad.DebugCoverDistance); + } + ImGui::PopItemWidth(); + + ImGui::Dummy(ImVec2(0, 20)); + if (m_SignalStateWrapper->m_IsCovering->GetValue()) { + ImGui::PushID("CoverTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str(), ImVec2(-1, 0))) { + m_SignalStateWrapper->m_CoverTriger->SetValue(false); + g_log->TraceInfo(_(u8"停止铺粉调试").c_str()); + } + ImGui::PopID(); + } + else { + // if (m_Purifier->IsCoverWindSet()) + // { + // m_Purifier->ResetSlowWind(); + // } + if (ImGui::Button(_(u8"铺粉调试").c_str(), ImVec2(-1, 0))) { + if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { + // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { + // m_Purifier->SetCoverWind(true); + // } + m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); + Sleep(50); + m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); + Sleep(50); + g_log->TraceInfo(_(u8"执行铺粉调试").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"铺粉调试条件不成立").c_str(), 3000)); + } + } + } + ImGui::EndTabItem(); + } + if (g_Admin > USER_ADMIN) { + if (ImGui::BeginTabItem(_(u8"控制").c_str())) { + if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { + ImGui::PushID("CylinderReachPrintTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); + if (ImGui::Button(_(u8"移动缸体到打印位").c_str())) { + if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行移动缸体到打印位").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"移动缸体到打印位条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { + ImGui::PushID("CylinderReachCleanTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); + if (ImGui::Button(_(u8"移动缸体到清粉位").c_str())) { + if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行移动缸体到清粉位").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"移动缸体到清粉位条件不成立").c_str(), 3000)); + } + + } + ImGui::PopItemFlag(); + } + + + if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { + ImGui::PushID("CylinderPrintLoadTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); + if (ImGui::Button(_(u8"缸体打印位装载").c_str())) { + if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体打印位装载").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体打印位装载条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); + if (ImGui::Button(_(u8"缸体连接清粉箱").c_str())) { + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体连接清粉箱").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体连接清粉箱条件不成立").c_str(), 3000)); + } + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { + ImGui::PushID("CylinderPrintUnloadTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); + if (ImGui::Button(_(u8"缸体打印位卸载").c_str())) { + if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体打印位卸载").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体打印位卸载条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); + if (ImGui::Button(_(u8"缸体脱离清粉箱").c_str())) { + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体脱离清粉箱").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体脱离清粉箱条件不成立").c_str(), 3000)); + } + } + ImGui::PopItemFlag(); + } + + ImGui::EndTabItem(); + } + } + ImGui::EndTabBar(); + ImGui::EndChild(); + + + if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(tabwidth, 0))) { + //m_Axis->StopAll(); + DataHandle::Instance()->SetPushMsg(AXISSTOPALL); + g_log->TraceInfo(_(u8"运动急停").c_str()); + } + + ImGui::EndGroup(); + ImGui::SameLine(); + } + + ImGui::BeginChild("AxisCtrl", ImVec2(840, 670)); + if (m_PowderAssist.isLeftExpand) { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + else { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + + ImGui::SameLine(); + ImGui::BeginGroup(); + if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) + continue_move = !continue_move; + ImGui::SameLine(); + ImGui::Text(_(u8"连续运动").c_str()); + + ImGui::Dummy(ImVec2(0, 250)); + /* + */ + + MACHINEPARAM mp; + GetMachineParam(mp); + if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadOut(); + DataHandle::Instance()->SetPushMsg(LOADOUT); + ImGui::OpenPopup(_(u8"移载载出").c_str()); + g_log->TraceInfo(_(u8"执行移出").c_str()); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"载出").c_str()); + } + ImGui::SameLine(); + if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadIn(); + DataHandle::Instance()->SetPushMsg(LOADIN); + ImGui::OpenPopup(_(u8"移载载入").c_str()); + g_log->TraceInfo(_(u8"执行移入").c_str()); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"载入").c_str()); + } + + if (ImGui::BeginPopupModal(_(u8"移载载入").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadInProcStep() == In_Start) { + ImGui::Text(_(u8"移载开始载入").c_str()); + } + if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { + ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); + } + if (GetLoadInProcStep() == In_CylinderReachPrint) { + ImGui::Text(_(u8"缸体到打印位运行中").c_str()); + } + if (GetLoadInProcStep() == In_CylinderPrintLoad) { + ImGui::Text(_(u8"缸体打印位装载运行中").c_str()); + } + if (mp.m_LoadInResut == In_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut == In_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut > In_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadIn()) { + if (ImGui::Button(_(u8"中断载入").c_str(), ImVec2(-1, 0))) + { + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + //InterceptLoad(); + } + } + ImGui::EndPopup(); + } + + if (ImGui::BeginPopupModal(_(u8"移载载出").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadOutProcSetp() == Out_Start) + { + ImGui::Text(_(u8"移载开始载出").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) + { + ImGui::Text(_(u8"缸体打印位卸载运行中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderReachClean) + { + ImGui::Text(_(u8"缸体到清粉位运行中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) + { + ImGui::Text(_(u8"缸体与清粉箱连接中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderReachHand) + { + ImGui::Text(_(u8"缸体与吊装位运行中").c_str()); + } + + if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) + { + ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); + } + + + if (m_NeedWaitSelectOutPos) { + vector combtemp = { _(u8"清粉位"),_(u8"吊装位") }; + ImGui::SemicolonCombo(_(u8"选择载出位置").c_str(), &m_SelectOutPos, combtemp); + if (ImGui::Button(_(u8"下一步").c_str())) + { + m_WaitSelectOutPosCommit = true; + } + } + + + if (mp.m_WaitConnectBoxCommit) { + if (ImGui::Button(_(u8"执行缸体与清粉箱连接").c_str())) + { + SetWaitConnectBoxCommit(false); + } + } + + if (mp.m_LoadOutResut == Out_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut == Out_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut > Out_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadOut()) { + if (ImGui::Button(_(u8"中断载出").c_str(), ImVec2(-1, 0))) + { + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + //InterceptLoad(); + } + } + ImGui::EndPopup(); + } + + + ImGui::Dummy(ImVec2(0, 80)); + ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); + if (IsLoadAxisCanMoveLeft()) + { + ImGui::PushID("LoadMovePointLeft"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsLoadAxisCanMoveRight()) + { + ImGui::PushID("LoadMovePointRight"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + } + + if (IsLoadAxisCanMoveLeft()) { + ImGui::PushID("LoadMoveLimitLeft"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isLoadLeftRepeat) { + m_PowderAssist.isLoadLeftRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); + } + } + else { + if (m_PowderAssist.isLoadLeftRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + m_PowderAssist.isLoadLeftRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + if (m_PowderAssist.isLoadLeftRepeat) { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + m_PowderAssist.isLoadLeftRepeat = false; + } + } + + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + if (IsLoadAxisCanMoveLeft()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + } + + ImGui::SameLine(); + if (IsLoadAxisCanMoveRight()) { + ImGui::PushID("LoadMoveLimitRight"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isLoadRightRepeat) { + m_PowderAssist.isLoadRightRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); + } + + } + else { + if (m_PowderAssist.isLoadRightRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + m_PowderAssist.isLoadRightRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + if (m_PowderAssist.isLoadRightRepeat) { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + m_PowderAssist.isLoadRightRepeat = false; + } + } + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) + { + if (IsLoadAxisCanMoveRight()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + } + } + ImGui::PushID("load_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + load->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); + } + + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::BeginGroup(); + + //ImGui::Dummy(ImVec2(500,1)); + ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); + ImGui::BeginGroup(); + ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); + ImGui::EndGroup(); + ImGui::SameLine(350); + ImGui::BeginGroup(); + ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); + + + ImGui::PushID("SupplyMovePointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"下粉轴前转%.2f格").c_str(), supplyCfgVal.rel); + } + if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + ImGui::SameLine(); + ImGui::PushID("SupplyMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isSupplyNegativeRepeat) { + m_PowderAssist.isSupplyNegativeRepeat = true; + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + //OutputDebugString("left\n"); + } + } + else { + if (m_PowderAssist.isSupplyNegativeRepeat) + { + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isSupplyNegativeRepeat = false; + //OutputDebugString("stop\n"); + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); + } + if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + ImGui::EndGroup(); + ImGui::EndChild(); + + AxisStateValue moldValue; + mold->GetValue(moldValue); + AxisStateValue armValue; + arm->GetValue(armValue); + AxisStateValue loadValue; + load->GetValue(loadValue); + + MotionDrawAssist assit; + assit.loadRPos = loadValue.RPos>1.0f ? 1.0f : loadValue.RPos; + int cylinderState = m_SignalState.m_CylinderState; + if (cylinderState == CylinderInCleanUnConnectBox || + cylinderState == CylinderInCleanConnectedBox || + cylinderState == CylinderInHand) { + assit.loadRPos = 1.0f; + } + + assit.moldRpos = moldValue.RPos>1.0f ? 1.0f : moldValue.RPos; + assit.armRPos = armValue.RPos; + assit.isCleanPressure = true; + assit.isPrintPressure = true; + assit.isPrintMoldSupprt = false; + assit.isPrintJackup = false; + assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); + assit.isCleanClose = true; + if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); + ImGui::Powder1500V1(assit); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::BeginGroup(); + ImGui::Dummy(ImVec2(0, 170)); + ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMovPointBack"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMoveLimitBack"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isArmBackRepeat) { + m_PowderAssist.isArmBackRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + } + else { + if (m_PowderAssist.isArmBackRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + m_PowderAssist.isArmBackRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmBackRepeat) { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + m_PowderAssist.isArmBackRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) + { + if (IsArmCanMoveBack()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + } + } + + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMovPointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isArmFrontRepeat) { + m_PowderAssist.isArmFrontRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + } + else { + if (m_PowderAssist.isArmFrontRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isArmFrontRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmFrontRepeat) { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isArmFrontRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + if (IsArmCanMoveFront()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + ImGui::PushID("arm_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + arm->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); + } + if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) + { + ImGui::SameLine(); + ImGui::PushID("arm_alarm_remove"); + if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴越限解除").c_str()); + } + } + ImGui::Dummy(ImVec2(0, 35)); + ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMovePointUp"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMoveLimitUp"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isMoldUpRepeat) { + m_PowderAssist.isMoldUpRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldUpRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + m_PowderAssist.isMoldUpRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + if (m_PowderAssist.isMoldUpRepeat) { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + m_PowderAssist.isMoldUpRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + if (IsMoldCanMoveUp()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + } + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMovePointDown"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMoveLimitDown"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isMoldDownRepeat) { + m_PowderAssist.isMoldDownRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldDownRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + m_PowderAssist.isMoldDownRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); + } + + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + if (m_PowderAssist.isMoldDownRepeat) { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + m_PowderAssist.isMoldDownRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) + { + if (IsMoldCanMoveDown()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); + } + else + { + g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); + } + + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + } + } + ImGui::PushID("mold_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + mold->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); + } + ImGui::EndGroup(); + + ImGui::EndChild(); + + ImGui::End(); + +} void HBD1200OLD::DrawAnalogExt() { @@ -6532,160 +6546,160 @@ void HBD1200OLD::InitSysParam(SysParamWrapper* spw, void* cc) // } // //} -// -//bool HBD1200OLD::CheckPrintMoldReady() -//{ -// if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) -// { -// return false; -// } -// else return true; -//} -// -//bool HBD1200OLD::IsLoadAxisCanMoveLeft() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; -// if (!m_SignalState.m_CylinderFixInReleasePos)return false; -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if (!m_SignalState.m_EleServoInBottomPos)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetLoadAxisCanotMoveLeftInfo() { -// if (!m_SignalState.m_PrintJackupInSafePos)return _(u8"打印顶升轴不在安全位").c_str(); -// if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return _(u8"移载轴越软左限").c_str(); -// if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return _(u8"移载轴已到左限位").c_str(); -// if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); -// if (!m_SignalState.m_EleServoInBottomPos)return _(u8"电缸不在底座位").c_str(); -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1200OLD::IsLoadAxisCanMoveRight() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; -// if (!m_SignalState.m_CylinderFixInReleasePos)return false; -// if (!m_SignalState.m_LoadRightNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if (!m_SignalState.m_EleServoInBottomPos)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetLoadAxisCanotMoveRightInfo() { -// if (!m_SignalState.m_PrintJackupInSafePos)return _(u8"打印顶升轴不在安全位").c_str(); -// if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return _(u8"移载轴越软右限").c_str(); -// if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); -// if (!m_SignalState.m_LoadRightNotInsideLimit)return _(u8"移载轴已到右限位").c_str(); -// if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); -// if (!m_SignalState.m_EleServoInBottomPos)return _(u8"电缸不在底座位").c_str(); -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1200OLD::IsArmCanMoveBack() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; -// if (!m_SignalState.m_ArmPosInsideBackLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetArmCanotMoveBackInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); -// if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return _(u8"铺粉轴位置超过软后限").c_str(); -// if (!m_SignalState.m_ArmPosInsideBackLimit)return _(u8"铺粉轴已到后限位").c_str(); -// if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1200OLD::IsArmCanMoveFront() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetArmCanotMoveFrontInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); -// if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return _(u8"铺粉轴位置超过软前限").c_str(); -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return _(u8"铺粉轴已到前限位").c_str(); -// if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1200OLD::IsMoldCanMoveUp() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideUpLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetMoldCanotUpInfo() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return _(u8"升降轴上升扭力越限").c_str(); -// if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return _(u8"升降轴越软上限").c_str(); -// if (!m_SignalState.m_PrintInsideUpLimit)return _(u8"升降轴越上限").c_str(); -// if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) -// { -// return _(u8"缸体不在打印位、清粉位、吊装位").c_str(); -// } -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1200OLD::IsMoldCanMoveDown() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideDownLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1200OLD::GetMoldCanotDownInfo() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return _(u8"升降轴下降扭力越限").c_str(); -// if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return _(u8"升降轴越软下限").c_str(); -// if (!m_SignalState.m_PrintInsideDownLimit)return _(u8"升降轴越下限").c_str(); -// if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) -// { -// return _(u8"缸体不在打印位、清粉位、吊装位").c_str(); -// } -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} \ No newline at end of file + +bool HBD1200OLD::CheckPrintMoldReady() +{ + if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) + { + return false; + } + else return true; +} + +bool HBD1200OLD::IsLoadAxisCanMoveLeft() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; + if (!m_SignalState.m_CylinderFixInReleasePos)return false; + if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if (!m_SignalState.m_EleServoInBottomPos)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetLoadAxisCanotMoveLeftInfo() { + if (!m_SignalState.m_PrintJackupInSafePos)return _(u8"打印顶升轴不在安全位").c_str(); + if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return _(u8"移载轴越软左限").c_str(); + if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); + if (!m_SignalState.m_LoadLeftNotInsideLimit)return _(u8"移载轴已到左限位").c_str(); + if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); + if (!m_SignalState.m_EleServoInBottomPos)return _(u8"电缸不在底座位").c_str(); + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1200OLD::IsLoadAxisCanMoveRight() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; + if (!m_SignalState.m_CylinderFixInReleasePos)return false; + if (!m_SignalState.m_LoadRightNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if (!m_SignalState.m_EleServoInBottomPos)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetLoadAxisCanotMoveRightInfo() { + if (!m_SignalState.m_PrintJackupInSafePos)return _(u8"打印顶升轴不在安全位").c_str(); + if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return _(u8"移载轴越软右限").c_str(); + if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); + if (!m_SignalState.m_LoadRightNotInsideLimit)return _(u8"移载轴已到右限位").c_str(); + if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); + if (!m_SignalState.m_EleServoInBottomPos)return _(u8"电缸不在底座位").c_str(); + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1200OLD::IsArmCanMoveBack() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; + if (!m_SignalState.m_ArmPosInsideBackLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetArmCanotMoveBackInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); + if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return _(u8"铺粉轴位置超过软后限").c_str(); + if (!m_SignalState.m_ArmPosInsideBackLimit)return _(u8"铺粉轴已到后限位").c_str(); + if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1200OLD::IsArmCanMoveFront() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; + if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetArmCanotMoveFrontInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); + if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return _(u8"铺粉轴位置超过软前限").c_str(); + if (!m_SignalState.m_ArmPosInsideFrontLimit)return _(u8"铺粉轴已到前限位").c_str(); + if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1200OLD::IsMoldCanMoveUp() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; + if (!m_SignalState.m_PrintInsideUpLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetMoldCanotUpInfo() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return _(u8"升降轴上升扭力越限").c_str(); + if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return _(u8"升降轴越软上限").c_str(); + if (!m_SignalState.m_PrintInsideUpLimit)return _(u8"升降轴越上限").c_str(); + if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) + { + return _(u8"缸体不在打印位、清粉位、吊装位").c_str(); + } + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1200OLD::IsMoldCanMoveDown() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; + if (!m_SignalState.m_PrintInsideDownLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1200OLD::GetMoldCanotDownInfo() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return _(u8"升降轴下降扭力越限").c_str(); + if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return _(u8"升降轴越软下限").c_str(); + if (!m_SignalState.m_PrintInsideDownLimit)return _(u8"升降轴越下限").c_str(); + if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) + { + return _(u8"缸体不在打印位、清粉位、吊装位").c_str(); + } + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} \ No newline at end of file diff --git a/PrintC/Machine/HBD1200OLD.h b/PrintC/Machine/HBD1200OLD.h index bb03c59..f099145 100644 --- a/PrintC/Machine/HBD1200OLD.h +++ b/PrintC/Machine/HBD1200OLD.h @@ -85,7 +85,7 @@ public: void InitSysParam(SysParamWrapper* spw, void* cc); //void InitPLCCommand(vector& vecs); //void GetAlarmState(SignalState& signalState); - //bool CheckPrintMoldReady(); + bool CheckPrintMoldReady(); virtual void CheckIO(); private: /*static*/ void CheckIO_V0(/*vector&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/); diff --git a/PrintC/Machine/HBD1500.cpp b/PrintC/Machine/HBD1500.cpp index 1f8e97a..35dcea2 100644 --- a/PrintC/Machine/HBD1500.cpp +++ b/PrintC/Machine/HBD1500.cpp @@ -8,6 +8,7 @@ #include "../Toast.h" #include "../SystemInfo.h" #include "../Logger.h" +#include "../DataManage/DataHandle.h" const int HBD1500::IO_V0 = 0; HBD1500::HBD1500(MachineTypeCfg::MachineTypeId type) :Machine(type) @@ -2835,1497 +2836,1512 @@ void HBD1500::DrawSignal(bool* isshow) // ImGui::EndChild(); //} -void HBD1500::DrawPowderCtrl(bool* winShow) -{} -//void HBD1500::DrawPowderCtrl(bool* winShow) -//{ -// ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); -// ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); -// ImGui::PopStyleVar(); -// -// int dstepflag = 1; -// double fstepflag = 1.0; -// long lstepflag = 1; -// static int kb = GTS_AXIS_ID_ARM; -// static bool continue_move = false; -// -// //CoverCfg* coverCfg = m_CoverCfg; -// MainAxisState* mold = m_Axis->m_Mold->GetState(); -// MainAxisState* clean = m_Axis->m_Clean->GetState(); -// AxisState* load = m_Axis->m_Load->GetState(); -// AxisState* arm = m_Axis->m_Arm->GetState(); -// AxisState* supply = m_Axis->m_Supply->GetState(); -// -// AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); -// AxisConfig::CfgValue armCfgVal; -// armCfg->GetValue(armCfgVal); -// AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); -// AxisConfig::CfgValue moldCfgVal; -// moldCfg->GetValue(moldCfgVal); -// AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); -// AxisConfig::CfgValue cleanCfgVal; -// cleanCfg->GetValue(cleanCfgVal); -// AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); -// AxisConfig::CfgValue loadCfgVal; -// loadCfg->GetValue(loadCfgVal); -// AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); -// AxisConfig::CfgValue supplyCfgVal; -// supplyCfg->GetValue(supplyCfgVal); -// -// ChartletManager* chartletManager = ChartletManager::GetInstance(); -// ImVec2 wpos = ImGui::GetWindowPos(); -// SignalService::GetInstance().GetSignalState(m_SignalState); -// if (m_PowderAssist.isLeftExpand) -// { -// ImGui::BeginGroup(); -// vector tabs; -// tabs.push_back(_(u8"成型缸")); -// tabs.push_back(_(u8"移载轴")); -// tabs.push_back(_(u8"铺粉轴")); -// tabs.push_back(_(u8"供粉轴")); -// tabs.push_back(_(u8"铺粉")); -// tabs.push_back(_(u8"控制")); -// int tabwidth = 0; -// for (size_t tindex = 0; tindex < tabs.size(); tindex++) { -// tabwidth = tabwidth + ImGui::CalcTextSize(tabs[tindex].c_str(), 0).x + 15; -// } -// ImVec2 showSize = ImVec2(tabwidth, 600); -// -// ImGui::BeginChild("AxisSettingChild", showSize, false, ImGuiWindowFlags_NoNav); -// ImGui::BeginTabBar("AxisSetting"); -// if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_MoldSpeedMin, &m_ParamLimitCfg->m_MoldSpeedMax)) -// { -// moldCfg->m_Speed->SetValue(moldCfgVal.speed); -// g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); -// } -// if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_MoldAccMin, &m_ParamLimitCfg->m_MoldAccMax)) -// { -// moldCfg->m_Acc->SetValue(moldCfgVal.acc); -// g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); -// } -// if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_MoldDecMin, &m_ParamLimitCfg->m_MoldDecMax)) -// { -// moldCfg->m_Dec->SetValue(moldCfgVal.dec); -// g_log->TraceInfo(_(u8"更新成型缸减速度:%.3f").c_str(), moldCfgVal.dec); -// } -// if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_MoldPointStepMin, &m_ParamLimitCfg->m_MoldPointStepMax)) { -// moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); -// g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// -// if ((g_Admin > USER_ADMIN)) { -// ImGui::Dummy(ImVec2(0, 20)); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveSeping->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印升降轴移动到缸体分离位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到缸体分离位").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMoveSepDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到缸体分离位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印升降轴移动到缸体分离位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到缸体分离位").c_str()); -// } -// -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMove3RSeping->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印升降轴移动到3R脱离位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印升降轴移动到3R脱离位").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMove3RSepDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到3R脱离位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMove3RSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(1); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印升降轴移动到3R脱离位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到3R脱离位").c_str()); -// } -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 2) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygening->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印升降轴移动到除氧最低点").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印升降轴移动到除氧最低点").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygenDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到除氧最低点").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygenEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(2); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印升降轴移动到除氧最低点").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到除氧最低点").c_str()); -// } -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印轴移动到底座缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到底座缸平面位").c_str()); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到底座缸平面位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印轴移动到底座缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到底座缸平面位").c_str()); -// } -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断打印轴移动到基板缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到基板缸平面位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到基板缸平面位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印轴移动到基板缸平面位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到基板缸平面位").c_str()); -// } -// } -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_LoadSpeedMin, &m_ParamLimitCfg->m_LoadSpeedMax)) -// { -// loadCfg->m_Speed->SetValue(loadCfgVal.speed); -// g_log->TraceInfo(_(u8"更新移载轴速度:%.3f").c_str(), loadCfgVal.speed); -// } -// if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_LoadAccMin, &m_ParamLimitCfg->m_LoadAccMax)) -// { -// loadCfg->m_Acc->SetValue(loadCfgVal.acc); -// g_log->TraceInfo(_(u8"更新移载轴加速度:%.3f").c_str(), loadCfgVal.acc); -// } -// if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_LoadDecMin, &m_ParamLimitCfg->m_LoadDecMax)) -// { -// loadCfg->m_Dec->SetValue(loadCfgVal.dec); -// g_log->TraceInfo(_(u8"更新移载轴减速度:%.3f").c_str(), loadCfgVal.dec); -// } -// if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, &m_ParamLimitCfg->m_LoadPointStepMin, &m_ParamLimitCfg->m_LoadPointStepMax)) { -// loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); -// g_log->TraceInfo(_(u8"更新移载轴点动距离:%.3f").c_str(), loadCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// -// /* -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道吊装位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道吊装位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道吊装位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道吊装位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道吊装位").c_str()); -// } -// -// ImGui::SameLine(); -// -// */ -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道清粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道清粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道清粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道清粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道清粉位").c_str()); -// } -// ImGui::SameLine(); -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断移载轴移动到轨道打印位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道打印位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道打印位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行移载轴移动到轨道打印位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道打印位").c_str()); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Speed->SetValue(armCfgVal.speed); -// g_log->TraceInfo(_(u8"更新铺粉轴速度:%.3f").c_str(), armCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Acc->SetValue(armCfgVal.acc); -// g_log->TraceInfo(_(u8"更新铺粉轴加速度:%.3f").c_str(), armCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Dec->SetValue(armCfgVal.dec); -// g_log->TraceInfo(_(u8"更新铺粉轴减速度:%.3f").c_str(), armCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// armCfg->m_RefDistance->SetValue(armCfgVal.rel); -// g_log->TraceInfo(_(u8"更新铺粉轴点动距离:%.3f").c_str(), armCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断铺粉轴移动到接粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到接粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到接粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行铺粉轴移动到接粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到接粉位").c_str()); -// } -// ImGui::SameLine(); -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(_(u8"中断铺粉轴移动到前下粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到前下粉位").c_str()); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到前下粉位").c_str()); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(_(u8"执行铺粉轴移动到前下粉位").c_str()); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到前下粉位").c_str()); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); -// g_log->TraceInfo(_(u8"更新下粉轴速度:%.3f").c_str(), supplyCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); -// g_log->TraceInfo(_(u8"更新下粉轴加速度:%.3f").c_str(), supplyCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); -// g_log->TraceInfo(_(u8"更新下粉轴减速度:%.3f").c_str(), supplyCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"粉格").c_str(), ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); -// g_log->TraceInfo(_(u8"更新下粉轴相对移动距离:%.3f").c_str(), supplyCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉").c_str())) { -// AxisData ad; -// vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; -// m_SysParamWrapper->GetAxisData(ad); -// ImGui::PushItemWidth(120); -// if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { -// m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); -// g_log->TraceInfo(_(u8"更新铺粉方式:%d").c_str(), ad.CoverType); -// } -// -// if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); -// g_log->TraceInfo(_(u8"更新铺粉速度:%.3f").c_str(), ad.CoverSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); -// g_log->TraceInfo(_(u8"更新打印单向返回速度:%.3f").c_str(), ad.CoverReturnSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); -// g_log->TraceInfo(_(u8"更新打印单向铺粉距离:%.3f").c_str(), ad.CoverDistance); -// } -// if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); -// g_log->TraceInfo(_(u8"更新打印铺粉层厚:%.3f").c_str(), ad.LayerThick); -// } -// if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); -// g_log->TraceInfo(_(u8"更新打印间隙补偿:%.3f").c_str(), ad.FixGap); -// } -// if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); -// g_log->TraceInfo(_(u8"更新打印铺粉格数:%d").c_str(), ad.SupplyCount); -// } -// if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); -// g_log->TraceInfo(_(u8"更新打印下粉时间:%d").c_str(), ad.SupplyTime); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); -// g_log->TraceInfo(_(u8"更新铺粉调试层厚:%.3f").c_str(), ad.DebugLayerThick); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); -// g_log->TraceInfo(_(u8"更新铺粉调试间隙补偿:%.3f").c_str(), ad.DebugFixGap); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); -// g_log->TraceInfo(_(u8"更新铺粉调试下粉时间:%d").c_str(), ad.DebugSupplyTime); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); -// g_log->TraceInfo(_(u8"更新铺粉调试格数:%d").c_str(), ad.DebugSupplyCount); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); -// g_log->TraceInfo(_(u8"更新铺粉调试距离:%.3f").c_str(), ad.DebugCoverDistance); -// } -// ImGui::PopItemWidth(); -// -// ImGui::Dummy(ImVec2(0, 20)); -// if (m_SignalStateWrapper->m_IsCovering->GetValue()) { -// ImGui::PushID("CoverTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str(), ImVec2(-1, 0))) { -// m_SignalStateWrapper->m_CoverTriger->SetValue(false); -// g_log->TraceInfo(_(u8"停止铺粉调试").c_str()); -// } -// ImGui::PopID(); -// } -// else { -// // if (m_Purifier->IsCoverWindSet()) -// // { -// // m_Purifier->ResetSlowWind(); -// // } -// if (ImGui::Button(_(u8"铺粉调试").c_str(), ImVec2(-1, 0))) { -// if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { -// // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { -// // m_Purifier->SetCoverWind(true); -// // } -// m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); -// Sleep(50); -// m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); -// Sleep(50); -// g_log->TraceInfo(_(u8"执行铺粉调试").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"铺粉调试条件不成立").c_str(), 3000)); -// } -// } -// } -// ImGui::EndTabItem(); -// } -// if (g_Admin > USER_ADMIN) { -// if (ImGui::BeginTabItem(_(u8"控制").c_str())) { -// /*if (ImGui::Button(_(u8"基板缸平面位置确定").c_str(), ImVec2(-1, 0))) { -// m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(true); -// Sleep(100); -// m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(false); -// m_RunCfg->m_HadSetBasePlatformPoint = true; -// }*/ -// /* if (ImGui::Button(_(u8"基板底座缸平面位置确定").c_str(), ImVec2(-1, 0))) { -// m_AxisRecordWrapper->m_PrintJackupPlatformBottomPosRecord->SetValue(true); -// m_AxisRecordWrapper->m_PrintJackupPlatformBottomPosRecord->SetValue(false); -// } -// */ -// -// if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { -// ImGui::PushID("CylinderReachPrintTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); -// if (ImGui::Button(_(u8"移动缸体到打印位").c_str())) { -// if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行移动缸体到打印位").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"移动缸体到打印位条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { -// ImGui::PushID("CylinderReachCleanTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); -// -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); -// if (ImGui::Button(_(u8"移动缸体到清粉位").c_str())) { -// if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行移动缸体到清粉位").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"移动缸体到清粉位条件不成立").c_str(), 3000)); -// } -// -// } -// ImGui::PopItemFlag(); -// } -// -// -// if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { -// ImGui::PushID("CylinderPrintLoadTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体打印位装载").c_str())) { -// if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体打印位装载").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体打印位装载条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体连接清粉箱").c_str())) { -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体连接清粉箱").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体连接清粉箱条件不成立").c_str(), 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { -// ImGui::PushID("CylinderPrintUnloadTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体打印位卸载").c_str())) { -// if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体打印位卸载").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体打印位卸载条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(_(u8"缸体脱离清粉箱").c_str())) { -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行缸体脱离清粉箱").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"缸体脱离清粉箱条件不成立").c_str(), 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// -// if (m_SignalStateWrapper->m_MoldConnectCylinderRun->GetValue()) { -// ImGui::PushID("MoldConnectCylinderTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_MoldConnectCylinderTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_MoldConnectCylinderEnable->GetValue()); -// if (ImGui::Button(_(u8"打印升降轴连接缸体").c_str())) { -// if (m_SignalStateWrapper->m_MoldConnectCylinderEnable->GetValue()) { -// m_SignalStateWrapper->m_MoldConnectCylinderTriger->SetValue(true); -// g_log->TraceInfo(_(u8"执行打印升降轴连接缸体").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"打印升降轴连接缸体条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_MoldDisconnectCylinderRun->GetValue()) { -// ImGui::PushID("MoldDisconnectCylinderTrigerStop"); -// if (ImGui::Button(_(u8"停止").c_str())) { -// m_SignalStateWrapper->m_MoldDisconnectCylinderTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_MoldDisconnectCylinderEnable->GetValue()); -// if (ImGui::Button(_(u8"打印升降轴脱离缸体").c_str())) { -// if (m_SignalStateWrapper->m_MoldDisconnectCylinderEnable->GetValue()) { -// m_SignalStateWrapper->m_MoldDisconnectCylinderTriger->SetValue(true); -// m_SignalStateWrapper->m_MoldDeoxygenFinished->SetValue(false); -// g_log->TraceInfo(_(u8"执行打印升降轴脱离缸体").c_str()); -// } -// else { -// g_Toast->AddToast(new ToastBean(_(u8"打印升降轴脱离缸体条件不成立").c_str(), 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// -// -// ImGui::EndTabItem(); -// } -// } -// ImGui::EndTabBar(); -// ImGui::EndChild(); -// -// -// if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(tabwidth, 0))) { -// m_Axis->StopAll(); -// g_log->TraceInfo(_(u8"运动急停").c_str()); -// } -// -// ImGui::EndGroup(); -// ImGui::SameLine(); -// } -// -// ImGui::BeginChild("AxisCtrl", ImVec2(840, 670)); -// if (m_PowderAssist.isLeftExpand) { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) -// continue_move = !continue_move; -// ImGui::SameLine(); -// ImGui::Text(_(u8"连续运动").c_str()); -// -// ImGui::Dummy(ImVec2(0, 250)); -// /* -// */ -// -// if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadOut(); -// ImGui::OpenPopup(_(u8"移载载出").c_str()); -// g_log->TraceInfo(_(u8"执行移出").c_str()); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"载出").c_str()); -// } -// ImGui::SameLine(); -// if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadIn(); -// ImGui::OpenPopup(_(u8"移载载入").c_str()); -// g_log->TraceInfo(_(u8"执行移入").c_str()); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"载入").c_str()); -// } -// -// if (ImGui::BeginPopupModal(_(u8"移载载入").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadInProcStep() == In_Start) { -// ImGui::Text(_(u8"移载开始载入").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { -// ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderReachPrint) { -// ImGui::Text(_(u8"缸体到打印位运行中").c_str()); -// } -// if (GetLoadInProcStep() == In_CylinderPrintLoad) { -// ImGui::Text(_(u8"缸体打印位装载运行中").c_str()); -// } -// if (GetLoadInProcStep() == In_MoldConnectCylinder) { -// ImGui::Text(_(u8"打印升降轴连接缸体运行中").c_str()); -// } -// -// if (GetLoadInResult() == In_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() == In_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() > In_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadIn()) { -// if (ImGui::Button(_(u8"中断载入").c_str(), ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// ImGui::EndPopup(); -// } -// -// if (ImGui::BeginPopupModal(_(u8"移载载出").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadOutProcSetp() == Out_Start) -// { -// ImGui::Text(_(u8"移载开始载出").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_MoldDisconnectCylinder) -// { -// ImGui::Text(_(u8"打印升降轴脱离缸体运行中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) -// { -// ImGui::Text(_(u8"缸体打印位卸载运行中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachClean) -// { -// ImGui::Text(_(u8"缸体到清粉位运行中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) -// { -// ImGui::Text(_(u8"缸体与清粉箱连接中").c_str()); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachHand) -// { -// ImGui::Text(_(u8"缸体与吊装位运行中").c_str()); -// } -// -// if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) -// { -// ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); -// } -// -// -// if (IsWaitConnectBoxCommit()) { -// if (ImGui::Button(_(u8"执行缸体与清粉箱连接").c_str())) -// { -// SetWaitConnectBoxCommit(false); -// } -// } -// -// -// if (GetLoadOutResult() == Out_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() == Out_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() > Out_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadOut()) { -// if (ImGui::Button(_(u8"中断载出").c_str(), ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// -// ImGui::EndPopup(); -// } -// -// -// ImGui::Dummy(ImVec2(0, 80)); -// ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); -// if (IsLoadAxisCanMoveLeft()) -// { -// ImGui::PushID("LoadMovePointLeft"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsLoadAxisCanMoveRight()) -// { -// ImGui::PushID("LoadMovePointRight"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// } -// -// if (IsLoadAxisCanMoveLeft()) { -// ImGui::PushID("LoadMoveLimitLeft"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isLoadLeftRepeat) { -// m_PowderAssist.isLoadLeftRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isLoadLeftRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// if (m_PowderAssist.isLoadLeftRepeat) { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// if (IsLoadAxisCanMoveLeft()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// } -// -// ImGui::SameLine(); -// if (IsLoadAxisCanMoveRight()) { -// ImGui::PushID("LoadMoveLimitRight"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isLoadRightRepeat) { -// m_PowderAssist.isLoadRightRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); -// } -// -// } -// else { -// if (m_PowderAssist.isLoadRightRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// if (m_PowderAssist.isLoadRightRepeat) { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) -// { -// if (IsLoadAxisCanMoveRight()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// } -// } -// ImGui::PushID("load_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// load->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); -// } -// -// ImGui::EndGroup(); -// -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// -// //ImGui::Dummy(ImVec2(500,1)); -// ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); -// ImGui::BeginGroup(); -// ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); -// ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); -// ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); -// ImGui::Text(_(u8"清粉位:%.3f").c_str(), clean->GetShowPos() / 1000.0f); -// ImGui::EndGroup(); -// ImGui::SameLine(350); -// ImGui::BeginGroup(); -// ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); -// -// -// ImGui::PushID("SupplyMovePointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"下粉轴前转%.2f格").c_str(), supplyCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// ImGui::SameLine(); -// -// ImGui::PushID("SupplyMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isSupplyNegativeRepeat) { -// m_PowderAssist.isSupplyNegativeRepeat = true; -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// //OutputDebugString("left\n"); -// } -// } -// else { -// if (m_PowderAssist.isSupplyNegativeRepeat) -// { -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isSupplyNegativeRepeat = false; -// //OutputDebugString("stop\n"); -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// ImGui::EndGroup(); -// ImGui::EndChild(); -// -// MotionDrawAssist assit; -// AxisStateValue loadvalue; -// load->GetValue(loadvalue); -// AxisData axisData; -// m_SysParamWrapper->GetAxisData(axisData); -// float loadposdif = axisData.LoadAxisTrackCleanPos - axisData.LoadAxisTrackPrintPos; -// if (loadposdif != 0.0f)assit.loadRPos = (loadvalue.Pos - axisData.LoadAxisTrackPrintPos) / loadposdif; -// else assit.loadRPos = 0.0f; -// -// assit.loadRPos = assit.loadRPos > 1.0f ? 1.0f : assit.loadRPos; -// assit.loadRPos = assit.loadRPos < 0.0f ? 0.0f : assit.loadRPos; -// -// /*assit.loadRPos = load->m_RPos>1.0f ? 1.0f : load->m_RPos; -// int cylinderState = m_SignalStateWrapper->m_CylinderState->GetValue(); -// if (cylinderState == CylinderInCleanUnConnectBox || -// cylinderState == CylinderInCleanConnectedBox || -// cylinderState == CylinderInHandHasCylinder || -// cylinderState == CylinderInHandNoCylinder) { -// assit.loadRPos = 1.0f; -// }*/ -// -// assit.moldRpos = mold->m_RPos>1.0f ? 1.0f : mold->m_RPos; -// assit.armRPos = arm->m_RPos; -// assit.isCleanPressure = m_IOCfgWrapper->m_CleannerPressOn->IsActive(); -// assit.isPrintPressure = m_IOCfgWrapper->m_PrintPressOn->IsActive(); -// assit.isPrintMoldSupprt = m_IOCfgWrapper->m_PrintSupportCylinderOn->IsActive(); -// assit.isPrintJackup = m_IOCfgWrapper->m_PrintJackUpOn->IsActive(); -// assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); -// assit.isCleanClose = true; -// //if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); -// ImGui::Powder(assit); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// ImGui::Dummy(ImVec2(0, 170)); -// ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); -// -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMovPointBack"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMoveLimitBack"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isArmBackRepeat) { -// m_PowderAssist.isArmBackRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// } -// else { -// if (m_PowderAssist.isArmBackRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmBackRepeat) { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) -// { -// if (IsArmCanMoveBack()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// } -// } -// -// -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMovPointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isArmFrontRepeat) { -// m_PowderAssist.isArmFrontRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// } -// else { -// if (m_PowderAssist.isArmFrontRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmFrontRepeat) { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// if (IsArmCanMoveFront()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// ImGui::PushID("arm_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// arm->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); -// } -// -// if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) -// { -// ImGui::SameLine(); -// ImGui::PushID("arm_alarm_remove"); -// if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴越限解除").c_str()); -// } -// } -// -// -// ImGui::Dummy(ImVec2(0, 35)); -// ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMovePointUp"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMoveLimitUp"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isMoldUpRepeat) { -// m_PowderAssist.isMoldUpRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldUpRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// if (m_PowderAssist.isMoldUpRepeat) { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// if (IsMoldCanMoveUp()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// } -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMovePointDown"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// } -// ImGui::SameLine(); -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMoveLimitDown"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isMoldDownRepeat) { -// m_PowderAssist.isMoldDownRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldDownRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// if (m_PowderAssist.isMoldDownRepeat) { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) -// { -// if (IsMoldCanMoveDown()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); -// } -// else -// { -// g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// } -// } -// ImGui::PushID("mold_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// mold->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); -// } -// ImGui::EndGroup(); -// -// ImGui::EndChild(); -// -// ImGui::End(); -// -//} +void HBD1500::DrawPowderCtrl(bool* winShow) +{ + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); + ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); + ImGui::PopStyleVar(); + + int dstepflag = 1; + double fstepflag = 1.0; + long lstepflag = 1; + static int kb = GTS_AXIS_ID_ARM; + static bool continue_move = false; + + //CoverCfg* coverCfg = m_CoverCfg; + MainAxisState* mold = m_Axis->m_Mold->GetState(); + MainAxisState* clean = m_Axis->m_Clean->GetState(); + AxisState* load = m_Axis->m_Load->GetState(); + AxisState* arm = m_Axis->m_Arm->GetState(); + AxisState* supply = m_Axis->m_Supply->GetState(); + + AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); + AxisConfig::CfgValue armCfgVal; + armCfg->GetValue(armCfgVal); + AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); + AxisConfig::CfgValue moldCfgVal; + moldCfg->GetValue(moldCfgVal); + AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); + AxisConfig::CfgValue cleanCfgVal; + cleanCfg->GetValue(cleanCfgVal); + AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); + AxisConfig::CfgValue loadCfgVal; + loadCfg->GetValue(loadCfgVal); + AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); + AxisConfig::CfgValue supplyCfgVal; + supplyCfg->GetValue(supplyCfgVal); + + ParamLimitCfg paramLimitfg; + m_ParamLimitCfg->GetCfg(paramLimitfg); + + ChartletManager* chartletManager = ChartletManager::GetInstance(); + ImVec2 wpos = ImGui::GetWindowPos(); + SignalService::GetInstance().GetSignalState(m_SignalState); + if (m_PowderAssist.isLeftExpand) + { + ImGui::BeginGroup(); + vector tabs; + tabs.push_back(_(u8"成型缸")); + tabs.push_back(_(u8"移载轴")); + tabs.push_back(_(u8"铺粉轴")); + tabs.push_back(_(u8"供粉轴")); + tabs.push_back(_(u8"铺粉")); + tabs.push_back(_(u8"控制")); + float tabwidth = 0; + for (size_t tindex = 0; tindex < tabs.size(); tindex++) { + tabwidth = tabwidth + ImGui::CalcTextSize(tabs[tindex].c_str(), 0).x + 15; + } + ImVec2 showSize = ImVec2(tabwidth, 600); + + ImGui::BeginChild("AxisSettingChild", showSize, false, ImGuiWindowFlags_NoNav); + ImGui::BeginTabBar("AxisSetting"); + if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldSpeedMin, ¶mLimitfg.m_MoldSpeedMax)) + { + moldCfg->m_Speed->SetValue(moldCfgVal.speed); + g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); + } + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldAccMin, ¶mLimitfg.m_MoldAccMax)) + { + moldCfg->m_Acc->SetValue(moldCfgVal.acc); + g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); + } + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldDecMin, ¶mLimitfg.m_MoldDecMax)) + { + moldCfg->m_Dec->SetValue(moldCfgVal.dec); + g_log->TraceInfo(_(u8"更新成型缸减速度:%.3f").c_str(), moldCfgVal.dec); + } + if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_MoldPointStepMin, ¶mLimitfg.m_MoldPointStepMax)) { + moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); + g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); + } + ImGui::PopItemWidth(); + + if ((g_Admin > USER_ADMIN)) { + ImGui::Dummy(ImVec2(0, 20)); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_MoldMoveSeping->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印升降轴移动到缸体分离位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到缸体分离位").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMoveSepDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到缸体分离位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMoveSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印升降轴移动到缸体分离位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到缸体分离位").c_str()); + } + + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_MoldMove3RSeping->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印升降轴移动到3R脱离位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印升降轴移动到3R脱离位").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMove3RSepDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到3R脱离位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMove3RSepEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(1); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印升降轴移动到3R脱离位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到3R脱离位").c_str()); + } + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 2) + { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygening->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印升降轴移动到除氧最低点").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印升降轴移动到除氧最低点").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygenDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印升降轴移动到除氧最低点").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDeoxygenEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(2); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印升降轴移动到除氧最低点").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印升降轴移动到除氧最低点").c_str()); + } + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印轴移动到底座缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到底座缸平面位").c_str()); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到底座缸平面位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印轴移动到底座缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到底座缸平面位").c_str()); + } + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) + { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断打印轴移动到基板缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断打印轴移动到基板缸平面位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行打印轴移动到基板缸平面位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行打印轴移动到基板缸平面位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"打印轴移动到基板缸平面位").c_str()); + } + } + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputFloatEx(_(u8"速度(mm/s)").c_str(), &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadSpeedMin, ¶mLimitfg.m_LoadSpeedMax)) + { + loadCfg->m_Speed->SetValue(loadCfgVal.speed); + g_log->TraceInfo(_(u8"更新移载轴速度:%.3f").c_str(), loadCfgVal.speed); + } + if (ImGui::InputFloatEx(_(u8"加速度(m/s²)").c_str(), &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadAccMin, ¶mLimitfg.m_LoadAccMax)) + { + loadCfg->m_Acc->SetValue(loadCfgVal.acc); + g_log->TraceInfo(_(u8"更新移载轴加速度:%.3f").c_str(), loadCfgVal.acc); + } + if (ImGui::InputFloatEx(_(u8"减速度(m/s2)").c_str(), &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadDecMin, ¶mLimitfg.m_LoadDecMax)) + { + loadCfg->m_Dec->SetValue(loadCfgVal.dec); + g_log->TraceInfo(_(u8"更新移载轴减速度:%.3f").c_str(), loadCfgVal.dec); + } + if (ImGui::InputFloatEx(_(u8"点动行程(μm)").c_str(), &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue, ¶mLimitfg.m_LoadPointStepMin, ¶mLimitfg.m_LoadPointStepMax)) { + loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); + g_log->TraceInfo(_(u8"更新移载轴点动距离:%.3f").c_str(), loadCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + + /* + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道吊装位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道吊装位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道吊装位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道吊装位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道吊装位").c_str()); + } + + ImGui::SameLine(); + + */ + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道清粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道清粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道清粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道清粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道清粉位").c_str()); + } + ImGui::SameLine(); + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断移载轴移动到轨道打印位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断移载轴移动到轨道打印位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行移载轴移动到轨道打印位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行移载轴移动到轨道打印位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"移载轴移动到轨道打印位").c_str()); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Speed->SetValue(armCfgVal.speed); + g_log->TraceInfo(_(u8"更新铺粉轴速度:%.3f").c_str(), armCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Acc->SetValue(armCfgVal.acc); + g_log->TraceInfo(_(u8"更新铺粉轴加速度:%.3f").c_str(), armCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Dec->SetValue(armCfgVal.dec); + g_log->TraceInfo(_(u8"更新铺粉轴减速度:%.3f").c_str(), armCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + armCfg->m_RefDistance->SetValue(armCfgVal.rel); + g_log->TraceInfo(_(u8"更新铺粉轴点动距离:%.3f").c_str(), armCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断铺粉轴移动到接粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到接粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到接粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行铺粉轴移动到接粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到接粉位").c_str()); + } + ImGui::SameLine(); + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(_(u8"中断铺粉轴移动到前下粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"中断铺粉轴移动到前下粉位").c_str()); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"不能执行铺粉轴移动到前下粉位").c_str()); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(_(u8"执行铺粉轴移动到前下粉位").c_str()); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(_(u8"铺粉轴移动到前下粉位").c_str()); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); + g_log->TraceInfo(_(u8"更新下粉轴速度:%.3f").c_str(), supplyCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); + g_log->TraceInfo(_(u8"更新下粉轴加速度:%.3f").c_str(), supplyCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); + g_log->TraceInfo(_(u8"更新下粉轴减速度:%.3f").c_str(), supplyCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"粉格").c_str(), ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); + g_log->TraceInfo(_(u8"更新下粉轴相对移动距离:%.3f").c_str(), supplyCfgVal.rel); + } + ImGui::PopItemWidth(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉").c_str())) { + AxisData ad; + vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; + m_SysParamWrapper->GetAxisData(ad); + ImGui::PushItemWidth(120); + if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { + m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); + g_log->TraceInfo(_(u8"更新铺粉方式:%d").c_str(), ad.CoverType); + } + + if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); + g_log->TraceInfo(_(u8"更新铺粉速度:%.3f").c_str(), ad.CoverSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); + g_log->TraceInfo(_(u8"更新打印单向返回速度:%.3f").c_str(), ad.CoverReturnSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); + g_log->TraceInfo(_(u8"更新打印单向铺粉距离:%.3f").c_str(), ad.CoverDistance); + } + if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); + g_log->TraceInfo(_(u8"更新打印铺粉层厚:%.3f").c_str(), ad.LayerThick); + } + if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); + g_log->TraceInfo(_(u8"更新打印间隙补偿:%.3f").c_str(), ad.FixGap); + } + if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); + g_log->TraceInfo(_(u8"更新打印铺粉格数:%d").c_str(), ad.SupplyCount); + } + if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); + g_log->TraceInfo(_(u8"更新打印下粉时间:%d").c_str(), ad.SupplyTime); + } + if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); + g_log->TraceInfo(_(u8"更新铺粉调试层厚:%.3f").c_str(), ad.DebugLayerThick); + } + if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); + g_log->TraceInfo(_(u8"更新铺粉调试间隙补偿:%.3f").c_str(), ad.DebugFixGap); + } + if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); + g_log->TraceInfo(_(u8"更新铺粉调试下粉时间:%d").c_str(), ad.DebugSupplyTime); + } + if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); + g_log->TraceInfo(_(u8"更新铺粉调试格数:%d").c_str(), ad.DebugSupplyCount); + } + if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance,0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); + g_log->TraceInfo(_(u8"更新铺粉调试距离:%.3f").c_str(), ad.DebugCoverDistance); + } + ImGui::PopItemWidth(); + + ImGui::Dummy(ImVec2(0, 20)); + if (m_SignalStateWrapper->m_IsCovering->GetValue()) { + ImGui::PushID("CoverTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str(), ImVec2(-1, 0))) { + m_SignalStateWrapper->m_CoverTriger->SetValue(false); + g_log->TraceInfo(_(u8"停止铺粉调试").c_str()); + } + ImGui::PopID(); + } + else { + // if (m_Purifier->IsCoverWindSet()) + // { + // m_Purifier->ResetSlowWind(); + // } + if (ImGui::Button(_(u8"铺粉调试").c_str(), ImVec2(-1, 0))) { + if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { + // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { + // m_Purifier->SetCoverWind(true); + // } + m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); + Sleep(50); + m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); + Sleep(50); + g_log->TraceInfo(_(u8"执行铺粉调试").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"铺粉调试条件不成立").c_str(), 3000)); + } + } + } + ImGui::EndTabItem(); + } + if (g_Admin > USER_ADMIN) { + if (ImGui::BeginTabItem(_(u8"控制").c_str())) { + /*if (ImGui::Button(_(u8"基板缸平面位置确定").c_str(), ImVec2(-1, 0))) { + m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(true); + Sleep(100); + m_AxisRecordWrapper->m_PrintJackupPlatformPlanePosRecord->SetValue(false); + m_RunCfg->m_HadSetBasePlatformPoint = true; + }*/ + /* if (ImGui::Button(_(u8"基板底座缸平面位置确定").c_str(), ImVec2(-1, 0))) { + m_AxisRecordWrapper->m_PrintJackupPlatformBottomPosRecord->SetValue(true); + m_AxisRecordWrapper->m_PrintJackupPlatformBottomPosRecord->SetValue(false); + } + */ + + if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { + ImGui::PushID("CylinderReachPrintTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); + if (ImGui::Button(_(u8"移动缸体到打印位").c_str())) { + if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行移动缸体到打印位").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"移动缸体到打印位条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { + ImGui::PushID("CylinderReachCleanTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); + + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); + if (ImGui::Button(_(u8"移动缸体到清粉位").c_str())) { + if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行移动缸体到清粉位").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"移动缸体到清粉位条件不成立").c_str(), 3000)); + } + + } + ImGui::PopItemFlag(); + } + + + if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { + ImGui::PushID("CylinderPrintLoadTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); + if (ImGui::Button(_(u8"缸体打印位装载").c_str())) { + if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体打印位装载").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体打印位装载条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); + if (ImGui::Button(_(u8"缸体连接清粉箱").c_str())) { + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体连接清粉箱").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体连接清粉箱条件不成立").c_str(), 3000)); + } + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { + ImGui::PushID("CylinderPrintUnloadTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); + if (ImGui::Button(_(u8"缸体打印位卸载").c_str())) { + if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体打印位卸载").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体打印位卸载条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); + if (ImGui::Button(_(u8"缸体脱离清粉箱").c_str())) { + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行缸体脱离清粉箱").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"缸体脱离清粉箱条件不成立").c_str(), 3000)); + } + } + ImGui::PopItemFlag(); + } + + + if (m_SignalStateWrapper->m_MoldConnectCylinderRun->GetValue()) { + ImGui::PushID("MoldConnectCylinderTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_MoldConnectCylinderTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_MoldConnectCylinderEnable->GetValue()); + if (ImGui::Button(_(u8"打印升降轴连接缸体").c_str())) { + if (m_SignalStateWrapper->m_MoldConnectCylinderEnable->GetValue()) { + m_SignalStateWrapper->m_MoldConnectCylinderTriger->SetValue(true); + g_log->TraceInfo(_(u8"执行打印升降轴连接缸体").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"打印升降轴连接缸体条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_MoldDisconnectCylinderRun->GetValue()) { + ImGui::PushID("MoldDisconnectCylinderTrigerStop"); + if (ImGui::Button(_(u8"停止").c_str())) { + m_SignalStateWrapper->m_MoldDisconnectCylinderTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_MoldDisconnectCylinderEnable->GetValue()); + if (ImGui::Button(_(u8"打印升降轴脱离缸体").c_str())) { + if (m_SignalStateWrapper->m_MoldDisconnectCylinderEnable->GetValue()) { + m_SignalStateWrapper->m_MoldDisconnectCylinderTriger->SetValue(true); + m_SignalStateWrapper->m_MoldDeoxygenFinished->SetValue(false); + g_log->TraceInfo(_(u8"执行打印升降轴脱离缸体").c_str()); + } + else { + g_Toast->AddToast(new ToastBean(_(u8"打印升降轴脱离缸体条件不成立").c_str(), 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + + + ImGui::EndTabItem(); + } + } + ImGui::EndTabBar(); + ImGui::EndChild(); + + + if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(tabwidth, 0))) { + //m_Axis->StopAll(); + DataHandle::Instance()->SetPushMsg(AXISSTOPALL); + g_log->TraceInfo(_(u8"运动急停").c_str()); + } + + ImGui::EndGroup(); + ImGui::SameLine(); + } + + ImGui::BeginChild("AxisCtrl", ImVec2(840, 670)); + if (m_PowderAssist.isLeftExpand) { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + else { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + + ImGui::SameLine(); + ImGui::BeginGroup(); + if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) + continue_move = !continue_move; + ImGui::SameLine(); + ImGui::Text(_(u8"连续运动").c_str()); + + ImGui::Dummy(ImVec2(0, 250)); + /* + */ + + MACHINEPARAM mp; + GetMachineParam(mp); + if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadOut(); + DataHandle::Instance()->SetPushMsg(LOADOUT); + ImGui::OpenPopup(_(u8"移载载出").c_str()); + g_log->TraceInfo(_(u8"执行移出").c_str()); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"载出").c_str()); + } + ImGui::SameLine(); + if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadIn(); + DataHandle::Instance()->SetPushMsg(LOADIN); + ImGui::OpenPopup(_(u8"移载载入").c_str()); + g_log->TraceInfo(_(u8"执行移入").c_str()); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"载入").c_str()); + } + + if (ImGui::BeginPopupModal(_(u8"移载载入").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadInProcStep() == In_Start) { + ImGui::Text(_(u8"移载开始载入").c_str()); + } + if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { + ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); + } + if (GetLoadInProcStep() == In_CylinderReachPrint) { + ImGui::Text(_(u8"缸体到打印位运行中").c_str()); + } + if (GetLoadInProcStep() == In_CylinderPrintLoad) { + ImGui::Text(_(u8"缸体打印位装载运行中").c_str()); + } + if (GetLoadInProcStep() == In_MoldConnectCylinder) { + ImGui::Text(_(u8"打印升降轴连接缸体运行中").c_str()); + } + + if (mp.m_LoadInResut == In_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut == In_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut > In_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadIn()) { + if (ImGui::Button(_(u8"中断载入").c_str(), ImVec2(-1, 0))) + { + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + //InterceptLoad(); + } + } + ImGui::EndPopup(); + } + + if (ImGui::BeginPopupModal(_(u8"移载载出").c_str(), NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadOutProcSetp() == Out_Start) + { + ImGui::Text(_(u8"移载开始载出").c_str()); + } + if (GetLoadOutProcSetp() == Out_MoldDisconnectCylinder) + { + ImGui::Text(_(u8"打印升降轴脱离缸体运行中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) + { + ImGui::Text(_(u8"缸体打印位卸载运行中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderReachClean) + { + ImGui::Text(_(u8"缸体到清粉位运行中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) + { + ImGui::Text(_(u8"缸体与清粉箱连接中").c_str()); + } + if (GetLoadOutProcSetp() == Out_CylinderReachHand) + { + ImGui::Text(_(u8"缸体与吊装位运行中").c_str()); + } + + if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) + { + ImGui::Text(_(u8"缸体与清粉箱分离中").c_str()); + } + + + if (mp.m_WaitConnectBoxCommit) { + if (ImGui::Button(_(u8"执行缸体与清粉箱连接").c_str())) + { + SetWaitConnectBoxCommit(false); + } + } + + + if (mp.m_LoadOutResut == Out_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut == Out_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut > Out_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(_(u8"确定").c_str(), ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadOut()) { + if (ImGui::Button(_(u8"中断载出").c_str(), ImVec2(-1, 0))) + { + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + //InterceptLoad(); + } + } + + ImGui::EndPopup(); + } + + + ImGui::Dummy(ImVec2(0, 80)); + ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); + if (IsLoadAxisCanMoveLeft()) + { + ImGui::PushID("LoadMovePointLeft"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsLoadAxisCanMoveRight()) + { + ImGui::PushID("LoadMovePointRight"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右移动%.3f").c_str(), load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + } + + if (IsLoadAxisCanMoveLeft()) { + ImGui::PushID("LoadMoveLimitLeft"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isLoadLeftRepeat) { + m_PowderAssist.isLoadLeftRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); + } + } + else { + if (m_PowderAssist.isLoadLeftRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + m_PowderAssist.isLoadLeftRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + if (m_PowderAssist.isLoadLeftRepeat) { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + m_PowderAssist.isLoadLeftRepeat = false; + } + } + + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + if (IsLoadAxisCanMoveLeft()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(_(u8"移载[%.3f]往左连续移动").c_str(), load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + } + + ImGui::SameLine(); + if (IsLoadAxisCanMoveRight()) { + ImGui::PushID("LoadMoveLimitRight"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isLoadRightRepeat) { + m_PowderAssist.isLoadRightRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); + } + + } + else { + if (m_PowderAssist.isLoadRightRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + m_PowderAssist.isLoadRightRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + if (m_PowderAssist.isLoadRightRepeat) { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + m_PowderAssist.isLoadRightRepeat = false; + } + } + + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) + { + if (IsLoadAxisCanMoveRight()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(_(u8"移载[%.3f]往右连续移动").c_str(), load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + } + } + ImGui::PushID("load_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + load->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); + } + + ImGui::EndGroup(); + + + ImGui::SameLine(); + ImGui::BeginGroup(); + + //ImGui::Dummy(ImVec2(500,1)); + ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); + ImGui::BeginGroup(); + ImGui::Text(_(u8"移栽轴:%.3f").c_str(), load->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"成型缸:%.3f").c_str(), mold->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"铺粉臂:%.3f").c_str(), arm->GetShowPos() / 1000.0f); + ImGui::Text(_(u8"清粉位:%.3f").c_str(), clean->GetShowPos() / 1000.0f); + ImGui::EndGroup(); + ImGui::SameLine(350); + ImGui::BeginGroup(); + ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); + + + ImGui::PushID("SupplyMovePointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"下粉轴前转%.2f格").c_str(), supplyCfgVal.rel); + } + if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + ImGui::SameLine(); + + ImGui::PushID("SupplyMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isSupplyNegativeRepeat) { + m_PowderAssist.isSupplyNegativeRepeat = true; + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + //OutputDebugString("left\n"); + } + } + else { + if (m_PowderAssist.isSupplyNegativeRepeat) + { + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isSupplyNegativeRepeat = false; + //OutputDebugString("stop\n"); + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); + } + if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + ImGui::EndGroup(); + ImGui::EndChild(); + + MotionDrawAssist assit; + AxisStateValue loadvalue; + load->GetValue(loadvalue); + + AxisStateValue moldValue; + mold->GetValue(moldValue); + AxisStateValue armValue; + arm->GetValue(armValue); + + + AxisData axisData; + m_SysParamWrapper->GetAxisData(axisData); + float loadposdif = axisData.LoadAxisTrackCleanPos - axisData.LoadAxisTrackPrintPos; + if (loadposdif != 0.0f)assit.loadRPos = (loadvalue.Pos - axisData.LoadAxisTrackPrintPos) / loadposdif; + else assit.loadRPos = 0.0f; + + assit.loadRPos = assit.loadRPos > 1.0f ? 1.0f : assit.loadRPos; + assit.loadRPos = assit.loadRPos < 0.0f ? 0.0f : assit.loadRPos; + + /*assit.loadRPos = load->m_RPos>1.0f ? 1.0f : load->m_RPos; + int cylinderState = m_SignalStateWrapper->m_CylinderState->GetValue(); + if (cylinderState == CylinderInCleanUnConnectBox || + cylinderState == CylinderInCleanConnectedBox || + cylinderState == CylinderInHandHasCylinder || + cylinderState == CylinderInHandNoCylinder) { + assit.loadRPos = 1.0f; + }*/ + + assit.moldRpos = moldValue.RPos>1.0f ? 1.0f : moldValue.RPos; + assit.armRPos = armValue.RPos; + assit.isCleanPressure = m_IOCfgWrapper->m_CleannerPressOn->IsActive(); + assit.isPrintPressure = m_IOCfgWrapper->m_PrintPressOn->IsActive(); + assit.isPrintMoldSupprt = m_IOCfgWrapper->m_PrintSupportCylinderOn->IsActive(); + assit.isPrintJackup = m_IOCfgWrapper->m_PrintJackUpOn->IsActive(); + assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); + assit.isCleanClose = true; + //if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); + ImGui::Powder(assit); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::BeginGroup(); + ImGui::Dummy(ImVec2(0, 170)); + ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); + + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMovPointBack"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMoveLimitBack"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isArmBackRepeat) { + m_PowderAssist.isArmBackRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + } + else { + if (m_PowderAssist.isArmBackRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + m_PowderAssist.isArmBackRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmBackRepeat) { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + m_PowderAssist.isArmBackRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) + { + if (IsArmCanMoveBack()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + } + } + + + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMovPointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isArmFrontRepeat) { + m_PowderAssist.isArmFrontRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + } + else { + if (m_PowderAssist.isArmFrontRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isArmFrontRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmFrontRepeat) { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isArmFrontRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + if (IsArmCanMoveFront()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + ImGui::PushID("arm_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + arm->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); + } + + if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) + { + ImGui::SameLine(); + ImGui::PushID("arm_alarm_remove"); + if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴越限解除").c_str()); + } + } + + + ImGui::Dummy(ImVec2(0, 35)); + ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMovePointUp"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMoveLimitUp"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isMoldUpRepeat) { + m_PowderAssist.isMoldUpRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldUpRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + m_PowderAssist.isMoldUpRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + if (m_PowderAssist.isMoldUpRepeat) { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + m_PowderAssist.isMoldUpRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + if (IsMoldCanMoveUp()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(_(u8"升降[%.3f]往上连续移动").c_str(), mold->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + } + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMovePointDown"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下移动%.3f").c_str(), mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + } + ImGui::SameLine(); + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMoveLimitDown"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isMoldDownRepeat) { + m_PowderAssist.isMoldDownRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往下连续移动").c_str(), mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldDownRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + m_PowderAssist.isMoldDownRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + if (m_PowderAssist.isMoldDownRepeat) { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + m_PowderAssist.isMoldDownRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) + { + if (IsMoldCanMoveDown()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(_(u8"升降[%.3f]往连续下移动").c_str(), mold->GetShowPos()); + } + else + { + g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); + } + + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + } + } + ImGui::PushID("mold_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + mold->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); + } + ImGui::EndGroup(); + + ImGui::EndChild(); + + ImGui::End(); + +} void HBD1500::DrawAnalogExt() { @@ -4397,161 +4413,161 @@ void HBD1500::DrawAnalogExt() ImGui::EndGroup(); } -//void HBD1500::DrawServoState(bool* winShow) -//{ -// ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize| ImGuiWindowFlags_AlwaysAutoResize); -// ImGui::BeginTabBar("servo_state"); -// if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { -// AxisStateValue mold; -// m_Axis->m_Mold->GetState()->GetValue(mold); -// ImGui::BeginGroup();` -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), mold.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), mold.BindSlaveFinish ? "YES" : "NO"); -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// g_SystemInfo->LockInfo(); -// float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; -// float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; -// float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; -// float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; -// g_SystemInfo->UnlockInfo(); -// ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); -// ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); -// ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); -// ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); -// -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"清粉轴").c_str())) { -// AxisStateValue clean; -// m_Axis->m_Clean->GetState()->GetValue(clean); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), clean.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对上运动: %s").c_str(), clean.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对下运动: %s").c_str(), clean.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"上JOG: %s").c_str(), clean.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"下JOG: %s").c_str(), clean.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), clean.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), clean.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), clean.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean.ExceptionCode); //轴伺服异常字_R -// -// ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), clean.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), clean.BindSlaveOn ? "YES" : "NO"); -// ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), clean.BindSlaveFinish ? "YES" : "NO"); -// -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// AxisStateValue arm; -// m_Axis->m_Arm->GetState()->GetValue(arm); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// AxisStateValue load; -// m_Axis->m_Load->GetState()->GetValue(load); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// AxisStateValue supply; -// m_Axis->m_Supply->GetState()->GetValue(supply); -// //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); -// ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); -// ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); -// ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); -// ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); -// ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); -// ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); -// ImGui::EndTabItem(); -// } -// -// ImGui::EndTabBar(); -// ImGui::End(); -//} +void HBD1500::DrawServoState(bool* winShow) +{ + ImGui::Begin(_(u8"伺服状态").c_str(), winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize| ImGuiWindowFlags_AlwaysAutoResize); + ImGui::BeginTabBar("servo_state"); + if (ImGui::BeginTabItem(_(u8"打印轴").c_str())) { + AxisStateValue mold; + m_Axis->m_Mold->GetState()->GetValue(mold); + ImGui::BeginGroup(); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), mold.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), mold.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), mold.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), mold.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), mold.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), mold.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), mold.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), mold.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), mold.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), mold.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), mold.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), mold.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), mold.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), mold.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), mold.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), mold.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), mold.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), mold.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), mold.BindSlaveFinish ? "YES" : "NO"); + ImGui::Text(_(u8"轴位置: %.3f").c_str(), mold.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), mold.Torque); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + g_SystemInfo->LockInfo(); + float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; + float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; + float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; + float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; + g_SystemInfo->UnlockInfo(); + ImGui::Text(_(u8"光栅每层实际值: %.3f").c_str(), linearLayerValue); + ImGui::Text(_(u8"升降理论行程: %.3f").c_str(), moldTheoryDis); + ImGui::Text(_(u8"光栅实际行程: %.3f").c_str(), linearActDis); + ImGui::Text(_(u8"光栅实际脉冲数: %.3f").c_str(), linearPulseValue); + + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"清粉轴").c_str())) { + AxisStateValue clean; + m_Axis->m_Clean->GetState()->GetValue(clean); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), clean.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), clean.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), clean.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对上运动: %s").c_str(), clean.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对下运动: %s").c_str(), clean.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"上JOG: %s").c_str(), clean.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"下JOG: %s").c_str(), clean.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), clean.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), clean.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), clean.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), clean.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), clean.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), clean.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), clean.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), clean.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), clean.ExceptionCode); //轴伺服异常字_R + + ImGui::Text(_(u8"主轴伺服刹车: %s").c_str(), clean.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(_(u8"主轴伺服绑定从轴: %s").c_str(), clean.BindSlaveOn ? "YES" : "NO"); + ImGui::Text(_(u8"主从轴已经绑定: %s").c_str(), clean.BindSlaveFinish ? "YES" : "NO"); + + ImGui::Text(_(u8"轴位置: %.3f").c_str(), clean.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), clean.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + AxisStateValue arm; + m_Axis->m_Arm->GetState()->GetValue(arm); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), arm.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), arm.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), arm.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对前运动: %s").c_str(), arm.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对后运动: %s").c_str(), arm.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"前JOG: %s").c_str(), arm.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"后JOG: %s").c_str(), arm.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), arm.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), arm.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), arm.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), arm.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), arm.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), arm.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), arm.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), arm.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), arm.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), arm.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), arm.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + AxisStateValue load; + m_Axis->m_Load->GetState()->GetValue(load); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), load.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), load.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), load.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), load.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), load.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), load.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), load.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), load.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), load.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), load.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), load.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), load.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), load.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), load.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), load.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), load.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), load.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), load.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + AxisStateValue supply; + m_Axis->m_Supply->GetState()->GetValue(supply); + //ImGui::Text(_(u8"伺服使能:%s").c_str(), supply.ServoOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服成立原点: %s").c_str(), supply.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(_(u8"伺服复位: %s").c_str(), supply.ServoReset ? "YES" : "NO"); + ImGui::Text(_(u8"相对右运动: %s").c_str(), supply.MoveP ? "YES" : "NO"); + ImGui::Text(_(u8"相对左运动: %s").c_str(), supply.MoveN ? "YES" : "NO"); + ImGui::Text(_(u8"右JOG: %s").c_str(), supply.MovePContinue ? "YES" : "NO"); + ImGui::Text(_(u8"左JOG: %s").c_str(), supply.MoveNContinue ? "YES" : "NO"); + ImGui::Text(_(u8"绝对值运动: %s").c_str(), supply.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(_(u8"急停: %s").c_str(), supply.MotionStop ? "YES" : "NO"); + ImGui::Text(_(u8"伺服RDY状态: %s").c_str(), supply.ServoRDY ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行HOME_Done: %s").c_str(), supply.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(_(u8"指令运行RESET_Done: %s").c_str(), supply.ResetDone ? "YES" : "NO"); + ImGui::Text(_(u8"伺服BUSY: %s").c_str(), supply.ServoBusy ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常: %s").c_str(), supply.ServoException ? "YES" : "NO"); + ImGui::Text(_(u8"可运行状态: %s").c_str(), supply.Runable ? "YES" : "NO"); + ImGui::Text(_(u8"伺服异常字: %d").c_str(), supply.ExceptionCode); //轴伺服异常字_R + ImGui::Text(_(u8"轴位置: %.3f").c_str(), supply.Pos); + ImGui::Text(_(u8"轴扭矩: %.3f").c_str(), supply.Torque); + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + ImGui::End(); +} void HBD1500::InitSignal(SignalStateWrapper* ssw, void* cc) { @@ -6964,187 +6980,187 @@ void HBD1500::InitSysParam(SysParamWrapper* spw, void* cc) // // //} -// -//bool HBD1500::CheckPrintMoldReady() -//{ -// if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) -// { -// return false; -// } -// else return true; -//} -// -//bool HBD1500::IsLoadAxisCanMoveLeft() -//{ -// if (!m_SignalState.m_PrintJackupInSplitePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; -// if (!m_SignalState.m_PrintPressingInReleasePos)return false; -// if (!m_SignalState.m_PrintJackupInDropPos)return false; -// if (!m_SignalState.m_PrintSupportInAvoidPos)return false; -// if (!m_SignalState.m_CleanPressingInReleasePos)return false; -// if (!m_SignalState.m_CylinderFixInReleasePos)return false; -// if (!m_SignalState.m_CleanBoxReleasePos)return false; -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if(!m_SignalState.m_CleanAxisInCylinderSeparatePos)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetLoadAxisCanotMoveLeftInfo() { -// if (!m_SignalState.m_PrintJackupInSplitePos)return _(u8"打印顶升轴不在缸体分离位").c_str(); -// if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return _(u8"移载轴越软左限").c_str(); -// if (!m_SignalState.m_PrintPressingInReleasePos)return _(u8"打印位压紧气缸不在松开位").c_str(); -// if (!m_SignalState.m_PrintJackupInDropPos)return _(u8"打印位顶升气缸不在下降位").c_str(); -// if (!m_SignalState.m_PrintSupportInAvoidPos)return _(u8"打印位支撑气缸不在避让位").c_str(); -// if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); -// if (!m_SignalState.m_CleanBoxReleasePos)return _(u8"清粉箱不在松开位").c_str(); -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return _(u8"移载轴已到左限位").c_str(); -// if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); -// if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return _(u8"清粉升降轴不在缸体分离位").c_str(); -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::IsLoadAxisCanMoveRight() -//{ -// if (!m_SignalState.m_PrintJackupInSplitePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; -// if (!m_SignalState.m_PrintPressingInReleasePos)return false; -// if (!m_SignalState.m_PrintJackupInDropPos)return false; -// if (!m_SignalState.m_PrintSupportInAvoidPos)return false; -// if (!m_SignalState.m_CleanPressingInReleasePos)return false; -// if (!m_SignalState.m_CylinderFixInReleasePos)return false; -// if (!m_SignalState.m_CleanBoxReleasePos)return false; -// if (!m_SignalState.m_LoadRightNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetLoadAxisCanotMoveRightInfo() { -// if (!m_SignalState.m_PrintJackupInSplitePos)return _(u8"打印顶升轴不在缸体分离位").c_str(); -// if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return _(u8"移载轴越软右限").c_str(); -// if (!m_SignalState.m_PrintPressingInReleasePos)return _(u8"打印位压紧气缸不在松开位").c_str(); -// if (!m_SignalState.m_PrintJackupInDropPos)return _(u8"打印位顶升气缸不在下降位").c_str(); -// if (!m_SignalState.m_PrintSupportInAvoidPos)return _(u8"打印位支撑气缸不在避让位").c_str(); -// if (!m_SignalState.m_CleanPressingInReleasePos)return _(u8"清粉位压紧气缸不在松开位").c_str(); -// if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); -// if (!m_SignalState.m_CleanBoxReleasePos)return _(u8"清粉箱不在松开位").c_str(); -// if (!m_SignalState.m_LoadRightNotInsideLimit)return _(u8"移载轴已到右限位").c_str(); -// if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); -// if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return _(u8"清粉升降轴不在缸体分离位").c_str(); -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::IsArmCanMoveBack() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; -// if (!m_SignalState.m_ArmPosInsideBackLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetArmCanotMoveBackInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); -// if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return _(u8"铺粉轴位置超过软后限").c_str(); -// if (!m_SignalState.m_ArmPosInsideBackLimit)return _(u8"铺粉轴已到后限位").c_str(); -// if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::IsArmCanMoveFront() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetArmCanotMoveFrontInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); -// if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return _(u8"铺粉轴位置超过软前限").c_str(); -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return _(u8"铺粉轴已到前限位").c_str(); -// if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::IsMoldCanMoveUp() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideUpLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -//// if (!m_SignalState.m_PrintSlaveServoNoAlarm)return false; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetMoldCanotUpInfo() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return _(u8"升降轴上升扭力越限").c_str(); -// if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return _(u8"升降轴越软上限").c_str(); -// if (!m_SignalState.m_PrintInsideUpLimit)return _(u8"升降轴越上限").c_str(); -// if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); -//// if (!m_SignalState.m_PrintSlaveServoNoAlarm)return _(u8"打印从轴伺服异常").c_str(); -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::IsMoldCanMoveDown() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideDownLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -// //if (!m_SignalState.m_PrintSlaveServoNoAlarm)return false; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -// -//string HBD1500::GetMoldCanotDownInfo() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return _(u8"升降轴下降扭力越限").c_str(); -// if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return _(u8"升降轴越软下限").c_str(); -// if (!m_SignalState.m_PrintInsideDownLimit)return _(u8"升降轴越下限").c_str(); -// if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); -// //if (!m_SignalState.m_PrintSlaveServoNoAlarm)return _(u8"打印从轴伺服异常").c_str(); -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); -// return _(u8"未知原因").c_str(); -//} -// -//bool HBD1500::CheckPrintHigh(float jobhigh) -//{ -// float ah = m_MachineCtrl->GetAllowPrintHigh(); -// if (jobhigh > ah) -// { -// char buffer[512]; -// sprintf_s(buffer, sizeof(buffer), _(u8"需要打印的高度:%.3f 超过了 允许的打印高度:%.3f").c_str(), jobhigh, ah); -// ToastBean* bean = new ToastBean(string(buffer), 5000, Toast::COLOR_RED); -// g_Toast->AddToast(bean); -// return false; -// } -// else return true; -//} \ No newline at end of file + +bool HBD1500::CheckPrintMoldReady() +{ + if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) + { + return false; + } + else return true; +} + +bool HBD1500::IsLoadAxisCanMoveLeft() +{ + if (!m_SignalState.m_PrintJackupInSplitePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; + if (!m_SignalState.m_PrintPressingInReleasePos)return false; + if (!m_SignalState.m_PrintJackupInDropPos)return false; + if (!m_SignalState.m_PrintSupportInAvoidPos)return false; + if (!m_SignalState.m_CleanPressingInReleasePos)return false; + if (!m_SignalState.m_CylinderFixInReleasePos)return false; + if (!m_SignalState.m_CleanBoxReleasePos)return false; + if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if(!m_SignalState.m_CleanAxisInCylinderSeparatePos)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetLoadAxisCanotMoveLeftInfo() { + if (!m_SignalState.m_PrintJackupInSplitePos)return _(u8"打印顶升轴不在缸体分离位").c_str(); + if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return _(u8"移载轴越软左限").c_str(); + if (!m_SignalState.m_PrintPressingInReleasePos)return _(u8"打印位压紧气缸不在松开位").c_str(); + if (!m_SignalState.m_PrintJackupInDropPos)return _(u8"打印位顶升气缸不在下降位").c_str(); + if (!m_SignalState.m_PrintSupportInAvoidPos)return _(u8"打印位支撑气缸不在避让位").c_str(); + if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); + if (!m_SignalState.m_CleanBoxReleasePos)return _(u8"清粉箱不在松开位").c_str(); + if (!m_SignalState.m_LoadLeftNotInsideLimit)return _(u8"移载轴已到左限位").c_str(); + if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); + if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return _(u8"清粉升降轴不在缸体分离位").c_str(); + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::IsLoadAxisCanMoveRight() +{ + if (!m_SignalState.m_PrintJackupInSplitePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; + if (!m_SignalState.m_PrintPressingInReleasePos)return false; + if (!m_SignalState.m_PrintJackupInDropPos)return false; + if (!m_SignalState.m_PrintSupportInAvoidPos)return false; + if (!m_SignalState.m_CleanPressingInReleasePos)return false; + if (!m_SignalState.m_CylinderFixInReleasePos)return false; + if (!m_SignalState.m_CleanBoxReleasePos)return false; + if (!m_SignalState.m_LoadRightNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetLoadAxisCanotMoveRightInfo() { + if (!m_SignalState.m_PrintJackupInSplitePos)return _(u8"打印顶升轴不在缸体分离位").c_str(); + if (!m_SignalState.m_LoadTorqueInsideLimit)return _(u8"移载扭力越限").c_str(); + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return _(u8"移载轴越软右限").c_str(); + if (!m_SignalState.m_PrintPressingInReleasePos)return _(u8"打印位压紧气缸不在松开位").c_str(); + if (!m_SignalState.m_PrintJackupInDropPos)return _(u8"打印位顶升气缸不在下降位").c_str(); + if (!m_SignalState.m_PrintSupportInAvoidPos)return _(u8"打印位支撑气缸不在避让位").c_str(); + if (!m_SignalState.m_CleanPressingInReleasePos)return _(u8"清粉位压紧气缸不在松开位").c_str(); + if (!m_SignalState.m_CylinderFixInReleasePos)return _(u8"缸体固定气缸不在松开位").c_str(); + if (!m_SignalState.m_CleanBoxReleasePos)return _(u8"清粉箱不在松开位").c_str(); + if (!m_SignalState.m_LoadRightNotInsideLimit)return _(u8"移载轴已到右限位").c_str(); + if (!m_SignalState.m_LoadServoNoAlarm)return _(u8"移载轴伺服异常").c_str(); + if (!m_SignalState.m_CleanAxisInCylinderSeparatePos)return _(u8"清粉升降轴不在缸体分离位").c_str(); + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::IsArmCanMoveBack() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; + if (!m_SignalState.m_ArmPosInsideBackLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetArmCanotMoveBackInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); + if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return _(u8"铺粉轴位置超过软后限").c_str(); + if (!m_SignalState.m_ArmPosInsideBackLimit)return _(u8"铺粉轴已到后限位").c_str(); + if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::IsArmCanMoveFront() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; + if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetArmCanotMoveFrontInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return _(u8"打印升降轴高于基板缸平面").c_str(); + if (!m_SignalState.m_ArmTorqueInsideLimit)return _(u8"铺粉轴扭力越限").c_str(); + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return _(u8"铺粉轴位置超过软前限").c_str(); + if (!m_SignalState.m_ArmPosInsideFrontLimit)return _(u8"铺粉轴已到前限位").c_str(); + if (!m_SignalState.m_ArmServoNoAlarm)return _(u8"铺粉轴伺服异常").c_str(); + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::IsMoldCanMoveUp() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; + if (!m_SignalState.m_PrintInsideUpLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; +// if (!m_SignalState.m_PrintSlaveServoNoAlarm)return false; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetMoldCanotUpInfo() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return _(u8"升降轴上升扭力越限").c_str(); + if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return _(u8"升降轴越软上限").c_str(); + if (!m_SignalState.m_PrintInsideUpLimit)return _(u8"升降轴越上限").c_str(); + if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); +// if (!m_SignalState.m_PrintSlaveServoNoAlarm)return _(u8"打印从轴伺服异常").c_str(); + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::IsMoldCanMoveDown() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; + if (!m_SignalState.m_PrintInsideDownLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; + //if (!m_SignalState.m_PrintSlaveServoNoAlarm)return false; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} + +string HBD1500::GetMoldCanotDownInfo() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return _(u8"升降轴下降扭力越限").c_str(); + if (!m_SignalState.m_ArmNotUponBasePlatform)return _(u8"铺粉臂在基板范围内").c_str(); + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return _(u8"升降轴越软下限").c_str(); + if (!m_SignalState.m_PrintInsideDownLimit)return _(u8"升降轴越下限").c_str(); + if (!m_SignalState.m_PrintMainServoNoAlarm)return _(u8"打印主轴伺服异常").c_str(); + //if (!m_SignalState.m_PrintSlaveServoNoAlarm)return _(u8"打印从轴伺服异常").c_str(); + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return _(u8"舱门打开时运动受限").c_str(); + return _(u8"未知原因").c_str(); +} + +bool HBD1500::CheckPrintHigh(float jobhigh) +{ +/* float ah = m_MachineCtrl->GetAllowPrintHigh(); + if (jobhigh > ah) + { + char buffer[512]; + sprintf_s(buffer, sizeof(buffer), _(u8"需要打印的高度:%.3f 超过了 允许的打印高度:%.3f").c_str(), jobhigh, ah); + ToastBean* bean = new ToastBean(string(buffer), 5000, Toast::COLOR_RED); + g_Toast->AddToast(bean); + return false; + } + else*/ return true; +} \ No newline at end of file diff --git a/PrintC/Machine/HBD1500.h b/PrintC/Machine/HBD1500.h index d0984b9..684a95d 100644 --- a/PrintC/Machine/HBD1500.h +++ b/PrintC/Machine/HBD1500.h @@ -88,16 +88,14 @@ public: void InitSysParam(SysParamWrapper* spw, void* cc); //void InitPLCCommand(vector& vecs); //void GetAlarmState(SignalState& signalState); - //bool CheckPrintMoldReady(); - //bool CheckPrintHigh(float jobhigh); + bool CheckPrintMoldReady(); + bool CheckPrintHigh(float jobhigh); virtual void CheckIO(); private: /*static*/ void CheckIO_V0(/*vector&ins, IOCfgWrapper* iocfgWrapper, string str, int type*/); //static void ProcReadPLC(void* pobject, Command* pcommand); //static void ProcReadPLCData(void* pobject, Command* pcommand); - void LoadInRun() {} - void LoadOutRun() {} bool IsLoadAxisCanMoveLeft(); string GetLoadAxisCanotMoveLeftInfo(); diff --git a/PrintC/Machine/HBDE1000.cpp b/PrintC/Machine/HBDE1000.cpp index 529904c..8a85bfe 100644 --- a/PrintC/Machine/HBDE1000.cpp +++ b/PrintC/Machine/HBDE1000.cpp @@ -8,6 +8,7 @@ #include "../Toast.h" #include "../SystemInfo.h" #include "../Logger.h" +#include "../DataManage/DataHandle.h" const int HBDE1000::IO_V0 = 0; HBDE1000::HBDE1000(MachineTypeCfg::MachineTypeId type) :Machine(type) @@ -3837,1375 +3838,1388 @@ void HBDE1000::DrawSignal(bool* isshow) // ImGui::EndChild(); //} -void HBDE1000::DrawPowderCtrl(bool* winShow) -{} -//void HBDE1000::DrawPowderCtrl(bool* winShow) -//{ -// ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); -// ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); -// ImGui::PopStyleVar(); -// -// int dstepflag = 1; -// double fstepflag = 1.0; -// long lstepflag = 1; -// static int kb = GTS_AXIS_ID_ARM; -// static bool continue_move = false; -// -// //CoverCfg* coverCfg = m_CoverCfg; -// MainAxisState* mold = m_Axis->m_Mold->GetState(); -// AxisState* load = m_Axis->m_Load->GetState(); -// AxisState* arm = m_Axis->m_Arm->GetState(); -// AxisState* supply = m_Axis->m_Supply->GetState(); -// -// AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); -// AxisConfig::CfgValue armCfgVal; -// armCfg->GetValue(armCfgVal); -// AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); -// AxisConfig::CfgValue moldCfgVal; -// moldCfg->GetValue(moldCfgVal); -// //AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); -// //AxisConfig::CfgValue cleanCfgVal; -// //cleanCfg->GetValue(cleanCfgVal); -// AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); -// AxisConfig::CfgValue loadCfgVal; -// loadCfg->GetValue(loadCfgVal); -// AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); -// AxisConfig::CfgValue supplyCfgVal; -// supplyCfg->GetValue(supplyCfgVal); -// -// ChartletManager* chartletManager = ChartletManager::GetInstance(); -// ImVec2 wpos = ImGui::GetWindowPos(); -// SignalService::GetInstance().GetSignalState(m_SignalState); -// if (m_PowderAssist.isLeftExpand) -// { -// ImGui::BeginGroup(); -// ImGui::BeginChild("AxisSettingChild", ImVec2(420, 520), false, ImGuiWindowFlags_NoNav); -// ImGui::BeginTabBar("AxisSetting"); -// if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Speed->SetValue(moldCfgVal.speed); -// g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Acc->SetValue(moldCfgVal.acc); -// g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// moldCfg->m_Dec->SetValue(moldCfgVal.dec); -// g_log->TraceInfo(u8"更新成型缸减速度:%.3f", moldCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); -// g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// -// if ((g_Admin > USER_ADMIN)) { -// ImGui::Dummy(ImVec2(0, 20)); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断打印升降轴移动到安全位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印升降轴移动到安全位"); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印升降轴移动到安全位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行打印升降轴移动到安全位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印升降轴移动到安全位"); -// } -// -// ImGui::SameLine(); -// -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottoming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断打印轴移动到底座缸平面位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断打印轴移动到底座缸平面位"); -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印轴移动到底座缸平面位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行打印轴移动到底座缸平面位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印轴移动到底座缸平面位"); -// } -// ImGui::SameLine(); -// if (mold->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) -// { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断打印轴移动到基板缸平面位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断打印轴移动到基板缸平面位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印轴移动到基板缸平面位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); -// m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行打印轴移动到基板缸平面位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印轴移动到基板缸平面位"); -// } -// } -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Speed->SetValue(loadCfgVal.speed); -// g_log->TraceInfo(u8"更新移载轴速度:%.3f", loadCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Acc->SetValue(loadCfgVal.acc); -// g_log->TraceInfo(u8"更新移载轴加速度:%.3f", loadCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// loadCfg->m_Dec->SetValue(loadCfgVal.dec); -// g_log->TraceInfo(u8"更新移载轴减速度:%.3f", loadCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); -// g_log->TraceInfo(u8"更新移载轴点动距离:%.3f", loadCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断移载轴移动到轨道吊装位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道吊装位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道吊装位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行移载轴移动到轨道吊装位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移载轴移动到轨道吊装位"); -// } -// -// ImGui::SameLine(); -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断移载轴移动到轨道清粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道清粉位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道清粉位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行移载轴移动到轨道清粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移载轴移动到轨道清粉位"); -// } -// ImGui::SameLine(); -// if (load->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断移载轴移动到轨道打印位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道打印位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道打印位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); -// m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行移载轴移动到轨道打印位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移栽轴移动到轨道打印位"); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Speed->SetValue(armCfgVal.speed); -// g_log->TraceInfo(u8"更新铺粉轴速度:%.3f", armCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Acc->SetValue(armCfgVal.acc); -// g_log->TraceInfo(u8"更新铺粉轴加速度:%.3f", armCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// armCfg->m_Dec->SetValue(armCfgVal.dec); -// g_log->TraceInfo(u8"更新铺粉轴减速度:%.3f", armCfgVal.dec); -// } -// if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// armCfg->m_RefDistance->SetValue(armCfgVal.rel); -// g_log->TraceInfo(u8"更新铺粉轴点动距离:%.3f", armCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// if (g_Admin > USER_ADMIN) { -// ImGui::Dummy(ImVec2(0, 20)); -// -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断铺粉轴移动到接粉后位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到接粉后位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到接粉后位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(2); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行铺粉轴移动到接粉后位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到接粉后位"); -// } -// ImGui::SameLine(); -// -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断铺粉轴移动到接粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到接粉位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到接粉位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行铺粉轴移动到接粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到接粉位"); -// } -// -// if (arm->m_MoveAbsPos) -// { -// if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) -// { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); -// g_log->TraceInfo(u8"中断铺粉轴移动到前下粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到前下粉位"); -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到前下粉位"); -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); -// m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); -// g_log->TraceInfo(u8"执行铺粉轴移动到前下粉位"); -// } -// if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到前下粉位"); -// } -// } -// -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { -// ImGui::PushItemWidth(100); -// if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); -// g_log->TraceInfo(u8"更新下粉轴速度:%.3f", supplyCfgVal.speed); -// } -// if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); -// g_log->TraceInfo(u8"更新下粉轴加速度:%.3f", supplyCfgVal.acc); -// } -// if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) -// { -// supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); -// g_log->TraceInfo(u8"更新下粉轴减速度:%.3f", supplyCfgVal.dec); -// } -// if (ImGui::InputScalar(u8"粉格", ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); -// g_log->TraceInfo(u8"更新下粉轴相对移动距离:%.3f", supplyCfgVal.rel); -// } -// ImGui::PopItemWidth(); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(u8"铺粉")) { -// AxisData ad; -// vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; -// m_SysParamWrapper->GetAxisData(ad); -// ImGui::PushItemWidth(120); -// if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { -// m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); -// g_log->TraceInfo(u8"更新铺粉方式:%d", ad.CoverType); -// } -// -// if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); -// g_log->TraceInfo(u8"更新铺粉速度:%.3f", ad.CoverSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); -// g_log->TraceInfo(u8"更新打印单向返回速度:%.3f", ad.CoverReturnSpeed); -// } -// if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); -// g_log->TraceInfo(u8"更新打印单向铺粉距离:%.3f", ad.CoverDistance); -// } -// if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); -// g_log->TraceInfo(u8"更新打印铺粉层厚:%.3f", ad.LayerThick); -// } -// if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); -// g_log->TraceInfo(u8"更新打印间隙补偿:%.3f", ad.FixGap); -// } -// if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); -// g_log->TraceInfo(u8"更新打印铺粉格数:%d", ad.SupplyCount); -// } -// if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); -// g_log->TraceInfo(u8"更新打印下粉时间:%d", ad.SupplyTime); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); -// g_log->TraceInfo(u8"更新铺粉调试层厚:%.3f", ad.DebugLayerThick); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); -// g_log->TraceInfo(u8"更新铺粉调试间隙补偿:%.3f", ad.DebugFixGap); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); -// g_log->TraceInfo(u8"更新铺粉调试下粉时间:%d", ad.DebugSupplyTime); -// } -// if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); -// g_log->TraceInfo(u8"更新铺粉调试格数:%d", ad.DebugSupplyCount); -// } -// if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { -// m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); -// g_log->TraceInfo(u8"更新铺粉调试距离:%.3f", ad.DebugCoverDistance); -// } -// ImGui::PopItemWidth(); -// -// ImGui::Dummy(ImVec2(0, 20)); -// if (m_SignalStateWrapper->m_IsCovering->GetValue()) { -// ImGui::PushID("CoverTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(-1, 0))) { -// m_SignalStateWrapper->m_CoverTriger->SetValue(false); -// g_log->TraceInfo(u8"停止铺粉调试"); -// } -// ImGui::PopID(); -// } -// else { -// // if (m_Purifier->IsCoverWindSet()) -// // { -// // m_Purifier->ResetSlowWind(); -// // } -// if (ImGui::Button(u8"铺粉调试", ImVec2(-1, 0))) { -// if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { -// // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { -// // m_Purifier->SetCoverWind(true); -// // } -// m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); -// Sleep(50); -// m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); -// Sleep(50); -// g_log->TraceInfo(u8"执行铺粉调试"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"铺粉调试条件不成立", 3000)); -// } -// } -// } -// ImGui::EndTabItem(); -// } -// if (g_Admin > USER_ADMIN) { -// if (ImGui::BeginTabItem(u8"控制")) { -// if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { -// ImGui::PushID("CylinderReachPrintTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); -// if (ImGui::Button(u8"移动缸体到打印位", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); -// g_log->TraceInfo(u8"执行移动缸体到打印位"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"移动缸体到打印位条件不成立", 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// ImGui::SameLine(); -// if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { -// ImGui::PushID("CylinderReachCleanTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); -// if (ImGui::Button(u8"移动缸体到清粉位", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); -// g_log->TraceInfo(u8"执行移动缸体到清粉位"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"移动缸体到清粉位条件不成立", 3000)); -// } -// -// } -// ImGui::PopItemFlag(); -// } -// -// -// if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { -// ImGui::PushID("CylinderPrintLoadTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); -// if (ImGui::Button(u8"缸体打印位装载", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); -// g_log->TraceInfo(u8"执行缸体打印位装载"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"缸体打印位装载条件不成立", 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// ImGui::SameLine(); -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(u8"缸体连接清粉箱", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(u8"执行缸体连接清粉箱"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"缸体连接清粉箱条件不成立", 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { -// ImGui::PushID("CylinderPrintUnloadTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); -// if (ImGui::Button(u8"缸体打印位卸载", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); -// g_log->TraceInfo(u8"执行缸体打印位卸载"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"缸体打印位卸载条件不成立", 3000)); -// } -// m_RunCfg->m_HadSetBasePlatformPoint = false; -// } -// ImGui::PopItemFlag(); -// } -// ImGui::SameLine(); -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { -// ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); -// if (ImGui::Button(u8"停止", ImVec2(177, 0))) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); -// } -// ImGui::PopID(); -// } -// else { -// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); -// if (ImGui::Button(u8"缸体脱离清粉箱", ImVec2(177, 0))) { -// if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { -// m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); -// g_log->TraceInfo(u8"执行缸体脱离清粉箱"); -// } -// else { -// g_Toast->AddToast(new ToastBean(u8"缸体脱离清粉箱条件不成立", 3000)); -// } -// } -// ImGui::PopItemFlag(); -// } -// -// ImGui::EndTabItem(); -// } -// } -// ImGui::EndTabBar(); -// ImGui::EndChild(); -// -// -// if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(260, 0))) { -// m_Axis->StopAll(); -// g_log->TraceInfo(u8"运动急停"); -// } -// -// ImGui::EndGroup(); -// ImGui::SameLine(); -// } -// -// ImGui::BeginChild("AxisCtrl", ImVec2(820, 670)); -// if (m_PowderAssist.isLeftExpand) { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// else { -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; -// } -// } -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) -// continue_move = !continue_move; -// ImGui::SameLine(); -// ImGui::Text(_(u8"连续运动").c_str()); -// -// ImGui::Dummy(ImVec2(0, 250)); -// -// if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadOut(); -// ImGui::OpenPopup(u8"移载载出"); -// g_log->TraceInfo(u8"执行移出"); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(u8"载出"); -// } -// ImGui::SameLine(); -// if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// LoadIn(); -// ImGui::OpenPopup(u8"移载载入"); -// g_log->TraceInfo(u8"执行移入"); -// } -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(u8"载入"); -// -// } -// -// if (ImGui::BeginPopupModal(u8"移载载入", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadInProcStep() == In_Start) { -// ImGui::Text(u8"移载开始载入"); -// } -// if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { -// ImGui::Text(u8"缸体与清粉箱分离中"); -// } -// if (GetLoadInProcStep() == In_CylinderReachPrint) { -// ImGui::Text(u8"缸体到打印位运行中"); -// } -// if (GetLoadInProcStep() == In_CylinderPrintLoad) { -// ImGui::Text(u8"缸体打印位装载运行中"); -// } -// -// if (GetLoadInResult() == In_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() == In_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadInResult() > In_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadIn()) { -// if (ImGui::Button(u8"中断载入", ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// ImGui::EndPopup(); -// } -// -// -// if (ImGui::BeginPopupModal(u8"移载载出", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { -// if (GetLoadOutProcSetp() == Out_Start) -// { -// ImGui::Text(u8"移载开始载出"); -// } -// if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) -// { -// ImGui::Text(u8"缸体打印位卸载运行中"); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachClean) -// { -// ImGui::Text(u8"缸体到清粉位运行中"); -// } -// if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) -// { -// ImGui::Text(u8"缸体与清粉箱连接中"); -// } -// if (GetLoadOutProcSetp() == Out_CylinderReachHand) -// { -// ImGui::Text(u8"缸体与吊装位运行中"); -// } -// -// if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) -// { -// ImGui::Text(u8"缸体与清粉箱分离中"); -// } -// -// -// if (m_NeedWaitSelectOutPos) { -// vector combtemp = { _(u8"清粉位"),_(u8"吊装位") }; -// ImGui::SemicolonCombo(u8"选择载出位置", &m_SelectOutPos, combtemp); -// if (ImGui::Button(u8"下一步")) -// { -// m_WaitSelectOutPosCommit = true; -// } -// } -// -// if (IsWaitConnectBoxCommit()) { -// if (ImGui::Button(u8"执行缸体与清粉箱连接")) -// { -// SetWaitConnectBoxCommit(false); -// } -// } -// -// if (GetLoadOutResult() == Out_Intercept) { -// ImGui::TextColored(Toast::COLOR_ORANGE, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() == Out_Success) { -// ImGui::TextColored(Toast::COLOR_GREEN, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// else if (GetLoadOutResult() > Out_Success) { -// ImGui::TextColored(Toast::COLOR_RED, GetLoadInfo().c_str()); -// if (ImGui::Button(u8"确定", ImVec2(-1, 0))) -// { -// ImGui::CloseCurrentPopup(); -// } -// } -// -// if (IsLoadOut()) { -// if (ImGui::Button(u8"中断载出", ImVec2(-1, 0))) -// { -// InterceptLoad(); -// } -// } -// ImGui::EndPopup(); -// } -// -// ImGui::Dummy(ImVec2(0, 80)); -// ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); -// if (IsLoadAxisCanMoveLeft()) -// { -// ImGui::PushID("LoadMovePointLeft"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(u8"移载[%.3f]往左移动%.3f", load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(u8"移载[%.3f]往左移动%.3f", load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsLoadAxisCanMoveRight()) -// { -// ImGui::PushID("LoadMovePointRight"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(u8"移载[%.3f]往右移动%.3f", load->GetShowPos(), loadCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_LOAD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { -// m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(u8"移载[%.3f]往右移动%.3f", load->GetShowPos(), loadCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// } -// -// if (IsLoadAxisCanMoveLeft()) { -// ImGui::PushID("LoadMoveLimitLeft"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isLoadLeftRepeat) { -// m_PowderAssist.isLoadLeftRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(u8"移载[%.3f]往左连续移动", load->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isLoadLeftRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); -// } -// if (m_PowderAssist.isLoadLeftRepeat) { -// m_PowderAssist.isLoadLeftRepeat = false; -// } -// } -// -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { -// if (IsLoadAxisCanMoveLeft()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); -// g_log->TraceInfo(u8"移载[%.3f]往左连续移动", load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); -// } -// -// ImGui::SameLine(); -// if (IsLoadAxisCanMoveRight()) { -// ImGui::PushID("LoadMoveLimitRight"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isLoadRightRepeat) { -// m_PowderAssist.isLoadRightRepeat = true; -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(u8"移载[%.3f]往右连续移动", load->GetShowPos()); -// } -// -// } -// else { -// if (m_PowderAssist.isLoadRightRepeat) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); -// } -// if (m_PowderAssist.isLoadRightRepeat) { -// m_PowderAssist.isLoadRightRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_LOAD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) -// { -// if (IsLoadAxisCanMoveRight()) { -// m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); -// g_log->TraceInfo(u8"移载[%.3f]往右连续移动", load->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) -// { -// m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); -// } -// } -// ImGui::PushID("load_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// load->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); -// } -// -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// -// //ImGui::Dummy(ImVec2(500,1)); -// ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); -// ImGui::BeginGroup(); -// ImGui::Text(u8"移栽轴:%.3f", load->GetShowPos() / 1000.0f); -// ImGui::Text(u8"成型缸:%.3f", mold->GetShowPos() / 1000.0f); -// ImGui::Text(u8"铺粉臂:%.3f", arm->GetShowPos() / 1000.0f); -// ImGui::EndGroup(); -// ImGui::SameLine(350); -// ImGui::BeginGroup(); -// ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); -// -// -// ImGui::PushID("SupplyMovePointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(u8"下粉轴前转%.2f格", supplyCfgVal.rel); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// ImGui::SameLine(); -// ImGui::PushID("SupplyMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isSupplyNegativeRepeat) { -// m_PowderAssist.isSupplyNegativeRepeat = true; -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// //OutputDebugString("left\n"); -// } -// } -// else { -// if (m_PowderAssist.isSupplyNegativeRepeat) -// { -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isSupplyNegativeRepeat = false; -// //OutputDebugString("stop\n"); -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); -// } -// if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// -// ImGui::EndGroup(); -// ImGui::EndChild(); -// -// MotionDrawAssist assit; -// assit.loadRPos = load->m_RPos > 1.0f ? 1.0f : load->m_RPos; -// int cylinderState = m_SignalState.m_CylinderState; -// if (cylinderState == CylinderInCleanUnConnectBox || -// cylinderState == CylinderInCleanConnectedBox || -// cylinderState == CylinderInHand) { -// assit.loadRPos = 1.0f; -// } -// -// assit.moldRpos = mold->m_RPos > 1.0f ? 1.0f : mold->m_RPos; -// assit.armRPos = arm->m_RPos; -// assit.isCleanPressure = true; -// assit.isPrintPressure = true; -// assit.isPrintMoldSupprt = false; -// assit.isPrintJackup = false; -// assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); -// assit.isCleanClose = true; -// if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); -// ImGui::Powder1500V1(assit); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::BeginGroup(); -// ImGui::Dummy(ImVec2(0, 170)); -// ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMovPointBack"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsArmCanMoveBack()) { -// ImGui::PushID("ArmMoveLimitBack"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isArmBackRepeat) { -// m_PowderAssist.isArmBackRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// } -// else { -// if (m_PowderAssist.isArmBackRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// ImGui::PopID(); -// -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmBackRepeat) { -// m_PowderAssist.isArmBackRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) -// { -// if (IsArmCanMoveBack()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); -// } -// } -// -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMovPointFront"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); -// } -// -// if (kb == GTS_AXIS_ID_ARM && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsArmCanMoveFront()) { -// ImGui::PushID("ArmMoveLimitFront"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isArmFrontRepeat) { -// m_PowderAssist.isArmFrontRepeat = true; -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// } -// else { -// if (m_PowderAssist.isArmFrontRepeat) -// { -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); -// } -// if (m_PowderAssist.isArmFrontRepeat) { -// m_PowderAssist.isArmFrontRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_ARM && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// if (IsArmCanMoveFront()) { -// m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); -// } -// -// ImGui::PushID("arm_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// arm->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); -// } -// if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) -// { -// ImGui::SameLine(); -// ImGui::PushID("arm_alarm_remove"); -// if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(u8"铺粉轴越限解除"); -// } -// } -// ImGui::Dummy(ImVec2(0, 35)); -// ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMovePointUp"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(u8"升降[%.3f]往上移动%.3f", mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(u8"升降[%.3f]往上移动%.3f", mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// if (IsMoldCanMoveUp()) { -// ImGui::PushID("MoldMoveLimitUp"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { -// if (!m_PowderAssist.isMoldUpRepeat) { -// m_PowderAssist.isMoldUpRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(u8"升降[%.3f]往上连续移动", mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldUpRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); -// } -// if (m_PowderAssist.isMoldUpRepeat) { -// m_PowderAssist.isMoldUpRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { -// if (IsMoldCanMoveUp()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); -// g_log->TraceInfo(u8"升降[%.3f]往上连续移动", mold->GetShowPos()); -// } -// else { -// g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); -// } -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMovePointDown"); -// if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(u8"升降[%.3f]往下移动%.3f", mold->GetShowPos(), moldCfgVal.rel); -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); -// } -// if (kb == GTS_AXIS_ID_MOLD && !continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { -// m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(u8"升降[%.3f]往下移动%.3f", mold->GetShowPos(), moldCfgVal.rel); -// } -// } -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// } -// -// ImGui::SameLine(); -// -// if (IsMoldCanMoveDown()) { -// ImGui::PushID("MoldMoveLimitDown"); -// if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// { -// if (!m_PowderAssist.isMoldDownRepeat) { -// m_PowderAssist.isMoldDownRepeat = true; -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(u8"升降[%.3f]往下连续移动", mold->GetShowPos()); -// } -// } -// else { -// if (m_PowderAssist.isMoldDownRepeat) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); -// } -// -// } -// else { -// ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); -// } -// if (m_PowderAssist.isMoldDownRepeat) { -// m_PowderAssist.isMoldDownRepeat = false; -// } -// } -// if (kb == GTS_AXIS_ID_MOLD && continue_move) { -// if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) -// { -// if (IsMoldCanMoveDown()) { -// m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); -// g_log->TraceInfo(u8"升降[%.3f]往连续下移动", mold->GetShowPos()); -// } -// else -// { -// g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); -// } -// -// } -// if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) -// { -// m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); -// } -// } -// ImGui::PushID("mold_to_zero"); -// if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) -// mold->SetZeroPos(); -// ImGui::PopID(); -// if (ImGui::IsItemHovered()) { -// ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); -// } -// ImGui::EndGroup(); -// -// ImGui::EndChild(); -// -// ImGui::End(); -// -//} +void HBDE1000::DrawPowderCtrl(bool* winShow) +{ + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 8)); + ImGui::Begin(_(u8"铺粉装置调试").c_str(), winShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav); + ImGui::PopStyleVar(); + + int dstepflag = 1; + double fstepflag = 1.0; + long lstepflag = 1; + static int kb = GTS_AXIS_ID_ARM; + static bool continue_move = false; + + //CoverCfg* coverCfg = m_CoverCfg; + MainAxisState* mold = m_Axis->m_Mold->GetState(); + AxisState* load = m_Axis->m_Load->GetState(); + AxisState* arm = m_Axis->m_Arm->GetState(); + AxisState* supply = m_Axis->m_Supply->GetState(); + + AxisConfig* armCfg = m_Axis->m_Arm->GetConfig(); + AxisConfig::CfgValue armCfgVal; + armCfg->GetValue(armCfgVal); + AxisConfig* moldCfg = m_Axis->m_Mold->GetConfig(); + AxisConfig::CfgValue moldCfgVal; + moldCfg->GetValue(moldCfgVal); + //AxisConfig* cleanCfg = m_Axis->m_Clean->GetConfig(); + //AxisConfig::CfgValue cleanCfgVal; + //cleanCfg->GetValue(cleanCfgVal); + AxisConfig* loadCfg = m_Axis->m_Load->GetConfig(); + AxisConfig::CfgValue loadCfgVal; + loadCfg->GetValue(loadCfgVal); + AxisConfig* supplyCfg = m_Axis->m_Supply->GetConfig(); + AxisConfig::CfgValue supplyCfgVal; + supplyCfg->GetValue(supplyCfgVal); + + ChartletManager* chartletManager = ChartletManager::GetInstance(); + ImVec2 wpos = ImGui::GetWindowPos(); + SignalService::GetInstance().GetSignalState(m_SignalState); + if (m_PowderAssist.isLeftExpand) + { + ImGui::BeginGroup(); + ImGui::BeginChild("AxisSettingChild", ImVec2(420, 520), false, ImGuiWindowFlags_NoNav); + ImGui::BeginTabBar("AxisSetting"); + if (ImGui::BeginTabItem(_(u8"成型缸").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &moldCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Speed->SetValue(moldCfgVal.speed); + g_log->TraceInfo(_(u8"更改成型缸速度:%.3f").c_str(), moldCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &moldCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Acc->SetValue(moldCfgVal.acc); + g_log->TraceInfo(_(u8"更改成型缸加速度:%.3f").c_str(), moldCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &moldCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + moldCfg->m_Dec->SetValue(moldCfgVal.dec); + g_log->TraceInfo(u8"更新成型缸减速度:%.3f", moldCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &moldCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + moldCfg->m_RefDistance->SetValue(moldCfgVal.rel); + g_log->TraceInfo(_(u8"更改成型缸点动行程:%.3f").c_str(), moldCfgVal.rel); + } + ImGui::PopItemWidth(); + + if ((g_Admin > USER_ADMIN)) { + ImGui::Dummy(ImVec2(0, 20)); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownesting->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断打印升降轴移动到安全位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印升降轴移动到安全位"); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMoveDownestDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印升降轴移动到安全位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMoveDownestEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(0); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行打印升降轴移动到安全位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印升降轴移动到安全位"); + } + + ImGui::SameLine(); + + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottoming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断打印轴移动到底座缸平面位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断打印轴移动到底座缸平面位"); + } + else { + ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印轴移动到底座缸平面位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformBottomEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(3); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行打印轴移动到底座缸平面位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印轴移动到底座缸平面位"); + } + ImGui::SameLine(); + if (mold->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_MoldAbsTestPos->GetValue() == 4) + { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatforming->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断打印轴移动到基板缸平面位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断打印轴移动到基板缸平面位"); + + } + else { + ImGui::ImageButton(chartletManager->m_MoldMovePlatformDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行打印轴移动到基板缸平面位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_MoldMovePlatformEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_MoldAbsTestPos->SetValue(4); + m_Axis->m_Mold->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行打印轴移动到基板缸平面位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"打印轴移动到基板缸平面位"); + } + } + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"移载轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &loadCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Speed->SetValue(loadCfgVal.speed); + g_log->TraceInfo(u8"更新移载轴速度:%.3f", loadCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &loadCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Acc->SetValue(loadCfgVal.acc); + g_log->TraceInfo(u8"更新移载轴加速度:%.3f", loadCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &loadCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + loadCfg->m_Dec->SetValue(loadCfgVal.dec); + g_log->TraceInfo(u8"更新移载轴减速度:%.3f", loadCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &loadCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + loadCfg->m_RefDistance->SetValue(loadCfgVal.rel); + g_log->TraceInfo(u8"更新移载轴点动距离:%.3f", loadCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 3) + { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断移载轴移动到轨道吊装位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道吊装位"); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadHandPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道吊装位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadHandPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(3); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行移载轴移动到轨道吊装位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移载轴移动到轨道吊装位"); + } + + ImGui::SameLine(); + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断移载轴移动到轨道清粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道清粉位"); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadCleanPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道清粉位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadCleanPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(1); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行移载轴移动到轨道清粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移载轴移动到轨道清粉位"); + } + ImGui::SameLine(); + if (load->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_LoadAxisAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断移载轴移动到轨道打印位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断移载轴移动到轨道打印位"); + + } + else { + ImGui::ImageButton(chartletManager->m_LoadPrintPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行移载轴移动到轨道打印位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_LoadPrintPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_LoadAxisAbsTestPos->SetValue(0); + m_Axis->m_Load->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行移载轴移动到轨道打印位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"移栽轴移动到轨道打印位"); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"铺粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &armCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Speed->SetValue(armCfgVal.speed); + g_log->TraceInfo(u8"更新铺粉轴速度:%.3f", armCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &armCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Acc->SetValue(armCfgVal.acc); + g_log->TraceInfo(u8"更新铺粉轴加速度:%.3f", armCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &armCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + armCfg->m_Dec->SetValue(armCfgVal.dec); + g_log->TraceInfo(u8"更新铺粉轴减速度:%.3f", armCfgVal.dec); + } + if (ImGui::InputScalar(_(u8"点动行程(μm)").c_str(), ImGuiDataType_Float, &armCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + armCfg->m_RefDistance->SetValue(armCfgVal.rel); + g_log->TraceInfo(u8"更新铺粉轴点动距离:%.3f", armCfgVal.rel); + } + ImGui::PopItemWidth(); + if (g_Admin > USER_ADMIN) { + ImGui::Dummy(ImVec2(0, 20)); + + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断铺粉轴移动到接粉后位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到接粉后位"); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到接粉后位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(2); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行铺粉轴移动到接粉后位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到接粉后位"); + } + ImGui::SameLine(); + + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 0) + { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断铺粉轴移动到接粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到接粉位"); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmAcceptPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到接粉位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmAcceptPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(0); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行铺粉轴移动到接粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到接粉位"); + } + + if (arm->m_MoveAbsPos) + { + if (m_SysParamWrapper->m_ArmAbsTestPos->GetValue() == 1) + { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosing->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(false); + g_log->TraceInfo(u8"中断铺粉轴移动到前下粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"中断铺粉轴移动到前下粉位"); + + } + else { + ImGui::ImageButton(chartletManager->m_ArmFrontDropPosDisable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"不能执行铺粉轴移动到前下粉位"); + } + } + else { + if (ImGui::ImageButton(chartletManager->m_ArmFrontDropPosEnable->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_SysParamWrapper->m_ArmAbsTestPos->SetValue(1); + m_Axis->m_Arm->GetCtrl()->m_MoveAbsPos->SetValue(true); + g_log->TraceInfo(u8"执行铺粉轴移动到前下粉位"); + } + if (ImGui::IsItemHovered())ImGui::SetTooltip(u8"铺粉轴移动到前下粉位"); + } + } + + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(_(u8"供粉轴").c_str())) { + ImGui::PushItemWidth(100); + if (ImGui::InputScalar(_(u8"速度(mm/s)").c_str(), ImGuiDataType_Float, &supplyCfgVal.speed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Speed->SetValue(supplyCfgVal.speed); + g_log->TraceInfo(u8"更新下粉轴速度:%.3f", supplyCfgVal.speed); + } + if (ImGui::InputScalar(_(u8"加速度(m/s²)").c_str(), ImGuiDataType_Float, &supplyCfgVal.acc, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Acc->SetValue(supplyCfgVal.acc); + g_log->TraceInfo(u8"更新下粉轴加速度:%.3f", supplyCfgVal.acc); + } + if (ImGui::InputScalar(_(u8"减速度(m/s2)").c_str(), ImGuiDataType_Float, &supplyCfgVal.dec, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) + { + supplyCfg->m_Dec->SetValue(supplyCfgVal.dec); + g_log->TraceInfo(u8"更新下粉轴减速度:%.3f", supplyCfgVal.dec); + } + if (ImGui::InputScalar(u8"粉格", ImGuiDataType_Float, &supplyCfgVal.rel, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + supplyCfg->m_RefDistance->SetValue(supplyCfgVal.rel); + g_log->TraceInfo(u8"更新下粉轴相对移动距离:%.3f", supplyCfgVal.rel); + } + ImGui::PopItemWidth(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(u8"铺粉")) { + AxisData ad; + vector ss = { _(u8"双向铺粉"),_(u8"单向铺粉"),_(u8"不铺粉") ,_(u8"双向铺粉2") ,_(u8"单向铺粉2"),_(u8"单向铺粉3") }; + m_SysParamWrapper->GetAxisData(ad); + ImGui::PushItemWidth(120); + if (ImGui::SemicolonCombo(_(u8"铺粉类型").c_str(), &ad.CoverType, ss)) { + m_SysParamWrapper->m_CoverType->SetValue(ad.CoverType); + g_log->TraceInfo(u8"更新铺粉方式:%d", ad.CoverType); + } + + if (ImGui::InputFloat(_(u8"打印铺粉速度(mm/s)").c_str(), &ad.CoverSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverSpeed->SetValue(ad.CoverSpeed); + g_log->TraceInfo(u8"更新铺粉速度:%.3f", ad.CoverSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉返回变速(mm/s)").c_str(), &ad.CoverReturnSpeed, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverReturnSpeed->SetValue(ad.CoverReturnSpeed); + g_log->TraceInfo(u8"更新打印单向返回速度:%.3f", ad.CoverReturnSpeed); + } + if (ImGui::InputFloat(_(u8"打印单向铺粉距离(mm)").c_str(), &ad.CoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_CoverDistance->SetValue(ad.CoverDistance); + g_log->TraceInfo(u8"更新打印单向铺粉距离:%.3f", ad.CoverDistance); + } + if (ImGui::InputFloat(_(u8"打印铺粉层厚(μm)").c_str(), &ad.LayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_LayerThick->SetValue(ad.LayerThick); + g_log->TraceInfo(u8"更新打印铺粉层厚:%.3f", ad.LayerThick); + } + if (ImGui::InputFloat(_(u8"打印间隙补偿(μm)").c_str(), &ad.FixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_FixGap->SetValue(ad.FixGap); + g_log->TraceInfo(u8"更新打印间隙补偿:%.3f", ad.FixGap); + } + if (ImGui::InputScalar(_(u8"打印铺粉格数").c_str(), ImGuiDataType_S16, &ad.SupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyCount->SetValue(ad.SupplyCount); + g_log->TraceInfo(u8"更新打印铺粉格数:%d", ad.SupplyCount); + } + if (ImGui::InputScalar(_(u8"打印下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.SupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_SupplyTime->SetValue(ad.SupplyTime); + g_log->TraceInfo(u8"更新打印下粉时间:%d", ad.SupplyTime); + } + if (ImGui::InputFloat(_(u8"铺粉调试层厚(μm)").c_str(), &ad.DebugLayerThick, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugLayerThick->SetValue(ad.DebugLayerThick); + g_log->TraceInfo(u8"更新铺粉调试层厚:%.3f", ad.DebugLayerThick); + } + if (ImGui::InputFloat(_(u8"铺粉调试间隙(μm)").c_str(), &ad.DebugFixGap, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugFixGap->SetValue(ad.DebugFixGap); + g_log->TraceInfo(u8"更新铺粉调试间隙补偿:%.3f", ad.DebugFixGap); + } + if (ImGui::InputScalar(_(u8"铺粉调试下粉时间(ms)").c_str(), ImGuiDataType_S16, &ad.DebugSupplyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyTime->SetValue(ad.DebugSupplyTime); + g_log->TraceInfo(u8"更新铺粉调试下粉时间:%d", ad.DebugSupplyTime); + } + if (ImGui::InputScalar(_(u8"铺粉调试格数").c_str(), ImGuiDataType_S16, &ad.DebugSupplyCount, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugSupplyCount->SetValue(ad.DebugSupplyCount); + g_log->TraceInfo(u8"更新铺粉调试格数:%d", ad.DebugSupplyCount); + } + if (ImGui::InputFloat(_(u8"铺粉调试铺粉距离(mm)").c_str(), &ad.DebugCoverDistance, 0, 0, "%.3f", ImGuiInputTextFlags_EnterReturnsTrue)) { + m_SysParamWrapper->m_DebugCoverDistance->SetValue(ad.DebugCoverDistance); + g_log->TraceInfo(u8"更新铺粉调试距离:%.3f", ad.DebugCoverDistance); + } + ImGui::PopItemWidth(); + + ImGui::Dummy(ImVec2(0, 20)); + if (m_SignalStateWrapper->m_IsCovering->GetValue()) { + ImGui::PushID("CoverTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(-1, 0))) { + m_SignalStateWrapper->m_CoverTriger->SetValue(false); + g_log->TraceInfo(u8"停止铺粉调试"); + } + ImGui::PopID(); + } + else { + // if (m_Purifier->IsCoverWindSet()) + // { + // m_Purifier->ResetSlowWind(); + // } + if (ImGui::Button(u8"铺粉调试", ImVec2(-1, 0))) { + if (m_SignalStateWrapper->m_CoverEnable->GetValue()) { + // if (m_ExtCfg->m_AutoCoverSlowWind && m_Purifier->IsWindActive()) { + // m_Purifier->SetCoverWind(true); + // } + m_SignalStateWrapper->m_IsCoverDebug->SetValue(true); + Sleep(50); + m_SignalStateWrapper->m_ManualCoverTest->SetValue(true); + Sleep(50); + g_log->TraceInfo(u8"执行铺粉调试"); + } + else { + g_Toast->AddToast(new ToastBean(u8"铺粉调试条件不成立", 3000)); + } + } + } + ImGui::EndTabItem(); + } + if (g_Admin > USER_ADMIN) { + if (ImGui::BeginTabItem(u8"控制")) { + if (m_SignalStateWrapper->m_CylinderReachPrintRun->GetValue()) { + ImGui::PushID("CylinderReachPrintTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()); + if (ImGui::Button(u8"移动缸体到打印位", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderReachPrintEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachPrintTriger->SetValue(true); + g_log->TraceInfo(u8"执行移动缸体到打印位"); + } + else { + g_Toast->AddToast(new ToastBean(u8"移动缸体到打印位条件不成立", 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + ImGui::SameLine(); + if (m_SignalStateWrapper->m_CylinderReachCleanRun->GetValue()) { + ImGui::PushID("CylinderReachCleanTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()); + if (ImGui::Button(u8"移动缸体到清粉位", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderReachCleanEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderReachCleanTriger->SetValue(true); + g_log->TraceInfo(u8"执行移动缸体到清粉位"); + } + else { + g_Toast->AddToast(new ToastBean(u8"移动缸体到清粉位条件不成立", 3000)); + } + + } + ImGui::PopItemFlag(); + } + + + if (m_SignalStateWrapper->m_CylinderPrintLoadRun->GetValue()) { + ImGui::PushID("CylinderPrintLoadTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()); + if (ImGui::Button(u8"缸体打印位装载", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderPrintLoadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintLoadTriger->SetValue(true); + g_log->TraceInfo(u8"执行缸体打印位装载"); + } + else { + g_Toast->AddToast(new ToastBean(u8"缸体打印位装载条件不成立", 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + ImGui::SameLine(); + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderConnectCleanBoxTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()); + if (ImGui::Button(u8"缸体连接清粉箱", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderConnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderConnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(u8"执行缸体连接清粉箱"); + } + else { + g_Toast->AddToast(new ToastBean(u8"缸体连接清粉箱条件不成立", 3000)); + } + } + ImGui::PopItemFlag(); + } + + if (m_SignalStateWrapper->m_CylinderPrintUnloadRun->GetValue()) { + ImGui::PushID("CylinderPrintUnloadTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()); + if (ImGui::Button(u8"缸体打印位卸载", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderPrintUnloadEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderPrintUnloadTriger->SetValue(true); + g_log->TraceInfo(u8"执行缸体打印位卸载"); + } + else { + g_Toast->AddToast(new ToastBean(u8"缸体打印位卸载条件不成立", 3000)); + } + m_RunCfg->m_HadSetBasePlatformPoint = false; + } + ImGui::PopItemFlag(); + } + ImGui::SameLine(); + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxRun->GetValue()) { + ImGui::PushID("CylinderDisconnectCleanBoxTrigerStop"); + if (ImGui::Button(u8"停止", ImVec2(177, 0))) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(false); + } + ImGui::PopID(); + } + else { + ImGui::PushItemFlag(ImGuiItemFlags_Disabled, !m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()); + if (ImGui::Button(u8"缸体脱离清粉箱", ImVec2(177, 0))) { + if (m_SignalStateWrapper->m_CylinderDisconnectCleanBoxEnable->GetValue()) { + m_SignalStateWrapper->m_CylinderDisconnectCleanBoxTriger->SetValue(true); + g_log->TraceInfo(u8"执行缸体脱离清粉箱"); + } + else { + g_Toast->AddToast(new ToastBean(u8"缸体脱离清粉箱条件不成立", 3000)); + } + } + ImGui::PopItemFlag(); + } + + ImGui::EndTabItem(); + } + } + ImGui::EndTabBar(); + ImGui::EndChild(); + + + if (ImGui::Button(_(u8"运动急停").c_str(), ImVec2(260, 0))) { + //m_Axis->StopAll(); + DataHandle::Instance()->SetPushMsg(AXISSTOPALL); + g_log->TraceInfo(u8"运动急停"); + } + + ImGui::EndGroup(); + ImGui::SameLine(); + } + + ImGui::BeginChild("AxisCtrl", ImVec2(820, 670)); + if (m_PowderAssist.isLeftExpand) { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HNARROW]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + else { + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::HEXPAND]->GetTex(), ImVec2(38, 50), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_PowderAssist.isLeftExpand = !m_PowderAssist.isLeftExpand; + } + } + + ImGui::SameLine(); + ImGui::BeginGroup(); + if (ImGui::ToggleButton(_(u8"连续运动").c_str(), continue_move)) + continue_move = !continue_move; + ImGui::SameLine(); + ImGui::Text(_(u8"连续运动").c_str()); + + ImGui::Dummy(ImVec2(0, 250)); + + MACHINEPARAM mp; + GetMachineParam(mp); + if (ImGui::ImageButton(chartletManager->m_LoadOut->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadOut(); + DataHandle::Instance()->SetPushMsg(LOADOUT); + ImGui::OpenPopup(u8"移载载出"); + g_log->TraceInfo(u8"执行移出"); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(u8"载出"); + } + ImGui::SameLine(); + if (ImGui::ImageButton(chartletManager->m_LoadIn->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + //LoadIn(); + DataHandle::Instance()->SetPushMsg(LOADIN); + ImGui::OpenPopup(u8"移载载入"); + g_log->TraceInfo(u8"执行移入"); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(u8"载入"); + + } + + if (ImGui::BeginPopupModal(u8"移载载入", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadInProcStep() == In_Start) { + ImGui::Text(u8"移载开始载入"); + } + if (GetLoadInProcStep() == In_CylinderDisconnectCleanBox) { + ImGui::Text(u8"缸体与清粉箱分离中"); + } + if (GetLoadInProcStep() == In_CylinderReachPrint) { + ImGui::Text(u8"缸体到打印位运行中"); + } + if (GetLoadInProcStep() == In_CylinderPrintLoad) { + ImGui::Text(u8"缸体打印位装载运行中"); + } + + if (mp.m_LoadInResut == In_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE, mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut == In_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadInResut > In_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadIn()) { + if (ImGui::Button(u8"中断载入", ImVec2(-1, 0))) + { + //InterceptLoad(); + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + } + } + ImGui::EndPopup(); + } + + + if (ImGui::BeginPopupModal(u8"移载载出", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { + if (GetLoadOutProcSetp() == Out_Start) + { + ImGui::Text(u8"移载开始载出"); + } + if (GetLoadOutProcSetp() == Out_CylinderPrintUnload) + { + ImGui::Text(u8"缸体打印位卸载运行中"); + } + if (GetLoadOutProcSetp() == Out_CylinderReachClean) + { + ImGui::Text(u8"缸体到清粉位运行中"); + } + if (GetLoadOutProcSetp() == Out_CylinderConnectCleanBox) + { + ImGui::Text(u8"缸体与清粉箱连接中"); + } + if (GetLoadOutProcSetp() == Out_CylinderReachHand) + { + ImGui::Text(u8"缸体与吊装位运行中"); + } + + if (GetLoadOutProcSetp() == Out_CylinderDisconnectCleanBox) + { + ImGui::Text(u8"缸体与清粉箱分离中"); + } + + + if (m_NeedWaitSelectOutPos) { + vector combtemp = { _(u8"清粉位"),_(u8"吊装位") }; + ImGui::SemicolonCombo(u8"选择载出位置", &m_SelectOutPos, combtemp); + if (ImGui::Button(u8"下一步")) + { + m_WaitSelectOutPosCommit = true; + } + } + + + if (mp.m_WaitConnectBoxCommit) { + if (ImGui::Button(u8"执行缸体与清粉箱连接")) + { + SetWaitConnectBoxCommit(false); + } + } + + if (mp.m_LoadOutResut == Out_Intercept) { + ImGui::TextColored(Toast::COLOR_ORANGE,mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut == Out_Success) { + ImGui::TextColored(Toast::COLOR_GREEN, mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + else if (mp.m_LoadOutResut > Out_Success) { + ImGui::TextColored(Toast::COLOR_RED, mp.m_LoadInfo.c_str()); + if (ImGui::Button(u8"确定", ImVec2(-1, 0))) + { + ImGui::CloseCurrentPopup(); + } + } + + if (IsLoadOut()) { + if (ImGui::Button(u8"中断载出", ImVec2(-1, 0))) + { + //InterceptLoad(); + DataHandle::Instance()->SetPushMsg(INTERCEPTLOAD); + } + } + ImGui::EndPopup(); + } + + ImGui::Dummy(ImVec2(0, 80)); + ImGui::RadioButton(_(u8"移载轴").c_str(), &kb, GTS_AXIS_ID_LOAD); + if (IsLoadAxisCanMoveLeft()) + { + ImGui::PushID("LoadMovePointLeft"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(u8"移载[%.3f]往左移动%.3f", load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左移 %.3fmm").c_str(), loadCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(u8"移载[%.3f]往左移动%.3f", load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsLoadAxisCanMoveRight()) + { + ImGui::PushID("LoadMovePointRight"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(u8"移载[%.3f]往右移动%.3f", load->GetShowPos(), loadCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右移 %.3fmm").c_str(), loadCfgVal.rel); + } + if (kb == GTS_AXIS_ID_LOAD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) { + m_Axis->m_Load->MovPoint(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(u8"移载[%.3f]往右移动%.3f", load->GetShowPos(), loadCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + } + + if (IsLoadAxisCanMoveLeft()) { + ImGui::PushID("LoadMoveLimitLeft"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isLoadLeftRepeat) { + m_PowderAssist.isLoadLeftRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(u8"移载[%.3f]往左连续移动", load->GetShowPos()); + } + } + else { + if (m_PowderAssist.isLoadLeftRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + m_PowderAssist.isLoadLeftRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴左连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::LEFT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveLeftInfo().c_str()); + } + if (m_PowderAssist.isLoadLeftRepeat) { + m_PowderAssist.isLoadLeftRepeat = false; + } + } + + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow), false)) { + if (IsLoadAxisCanMoveLeft()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::LEFT); + g_log->TraceInfo(u8"移载[%.3f]往左连续移动", load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveLeftInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_LeftArrow))) + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::LEFT); + } + + ImGui::SameLine(); + if (IsLoadAxisCanMoveRight()) { + ImGui::PushID("LoadMoveLimitRight"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isLoadRightRepeat) { + m_PowderAssist.isLoadRightRepeat = true; + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(u8"移载[%.3f]往右连续移动", load->GetShowPos()); + } + + } + else { + if (m_PowderAssist.isLoadRightRepeat) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + m_PowderAssist.isLoadRightRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移载轴右连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::RIGHT_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetLoadAxisCanotMoveRightInfo().c_str()); + } + if (m_PowderAssist.isLoadRightRepeat) { + m_PowderAssist.isLoadRightRepeat = false; + } + } + if (kb == GTS_AXIS_ID_LOAD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow), false)) + { + if (IsLoadAxisCanMoveRight()) { + m_Axis->m_Load->MovLimitStart(AxisConfig::ActiveDirect::RIGHT); + g_log->TraceInfo(u8"移载[%.3f]往右连续移动", load->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetLoadAxisCanotMoveRightInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_RightArrow))) + { + m_Axis->m_Load->MovLimitStop(AxisConfig::ActiveDirect::RIGHT); + } + } + ImGui::PushID("load_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + load->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"移栽轴位置清零").c_str()); + } + + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::BeginGroup(); + + //ImGui::Dummy(ImVec2(500,1)); + ImGui::BeginChild("SupplyCtrl", ImVec2(500, 160)); + ImGui::BeginGroup(); + ImGui::Text(u8"移栽轴:%.3f", load->GetShowPos() / 1000.0f); + ImGui::Text(u8"成型缸:%.3f", mold->GetShowPos() / 1000.0f); + ImGui::Text(u8"铺粉臂:%.3f", arm->GetShowPos() / 1000.0f); + ImGui::EndGroup(); + ImGui::SameLine(350); + ImGui::BeginGroup(); + ImGui::RadioButton(_(u8"供粉轴").c_str(), &kb, GTS_AXIS_ID_SUPPLY); + + + ImGui::PushID("SupplyMovePointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(u8"下粉轴前转%.2f格", supplyCfgVal.rel); + } + if (kb == GTS_AXIS_ID_SUPPLY && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + ImGui::SameLine(); + ImGui::PushID("SupplyMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isSupplyNegativeRepeat) { + m_PowderAssist.isSupplyNegativeRepeat = true; + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + //OutputDebugString("left\n"); + } + } + else { + if (m_PowderAssist.isSupplyNegativeRepeat) + { + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isSupplyNegativeRepeat = false; + //OutputDebugString("stop\n"); + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"供粉轴左连续").c_str()); + } + if (kb == GTS_AXIS_ID_SUPPLY && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Supply->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Supply->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + + ImGui::EndGroup(); + ImGui::EndChild(); + + MotionDrawAssist assit; + AxisStateValue moldValue; + mold->GetValue(moldValue); + AxisStateValue armValue; + arm->GetValue(armValue); + AxisStateValue loadValue; + load->GetValue(loadValue); + + assit.loadRPos = loadValue.RPos > 1.0f ? 1.0f : loadValue.RPos; + int cylinderState = m_SignalState.m_CylinderState; + if (cylinderState == CylinderInCleanUnConnectBox || + cylinderState == CylinderInCleanConnectedBox || + cylinderState == CylinderInHand) { + assit.loadRPos = 1.0f; + } + + assit.moldRpos = moldValue.RPos > 1.0f ? 1.0f : moldValue.RPos; + assit.armRPos = armValue.RPos; + assit.isCleanPressure = true; + assit.isPrintPressure = true; + assit.isPrintMoldSupprt = false; + assit.isPrintJackup = false; + assit.isInPrintPos = (m_SignalState.m_CylinderState == CylinderInPrintLoaded || m_SignalState.m_CylinderState == CylinderInPrintUnLoaded); + assit.isCleanClose = true; + if (m_IOCfgWrapper->m_Clean3RCylinderContact)assit.isCleanConnect = m_IOCfgWrapper->m_Clean3RCylinderContact->IsActive(); + ImGui::Powder1500V1(assit); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::BeginGroup(); + ImGui::Dummy(ImVec2(0, 170)); + ImGui::RadioButton(_(u8"铺粉臂").c_str(), &kb, GTS_AXIS_ID_ARM); + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMovPointBack"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::BACK); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsArmCanMoveBack()) { + ImGui::PushID("ArmMoveLimitBack"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isArmBackRepeat) { + m_PowderAssist.isArmBackRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + } + else { + if (m_PowderAssist.isArmBackRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + m_PowderAssist.isArmBackRepeat = false; + } + } + ImGui::PopID(); + + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴后连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmBackRepeat) { + m_PowderAssist.isArmBackRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) + { + if (IsArmCanMoveBack()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::BACK); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::BACK); + } + } + + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMovPointFront"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前移 %.3fmm").c_str(), armCfgVal.rel / 1000.0f); + } + + if (kb == GTS_AXIS_ID_ARM && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Arm->MovPoint(AxisConfig::ActiveDirect::FRONT); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveFrontInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsArmCanMoveFront()) { + ImGui::PushID("ArmMoveLimitFront"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isArmFrontRepeat) { + m_PowderAssist.isArmFrontRepeat = true; + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + } + else { + if (m_PowderAssist.isArmFrontRepeat) + { + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + m_PowderAssist.isArmFrontRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴前连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetArmCanotMoveBackInfo().c_str()); + } + if (m_PowderAssist.isArmFrontRepeat) { + m_PowderAssist.isArmFrontRepeat = false; + } + } + if (kb == GTS_AXIS_ID_ARM && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + if (IsArmCanMoveFront()) { + m_Axis->m_Arm->MovLimitStart(AxisConfig::ActiveDirect::FRONT); + } + else { + g_Toast->AddToast(new ToastBean(GetArmCanotMoveBackInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + m_Axis->m_Arm->MovLimitStop(AxisConfig::ActiveDirect::FRONT); + } + + ImGui::PushID("arm_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + arm->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"铺粉轴位置清零").c_str()); + } + if (m_AxisRecordWrapper->m_PCArmOverLimitAlarm->GetValue()) + { + ImGui::SameLine(); + ImGui::PushID("arm_alarm_remove"); + if (ImGui::ImageButton(chartletManager->m_AlarmRemove->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_AxisRecordWrapper->m_PCArmOverLimitAlarmRemove->SetValue(true); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(u8"铺粉轴越限解除"); + } + } + ImGui::Dummy(ImVec2(0, 35)); + ImGui::RadioButton(_(u8"成型缸").c_str(), &kb, GTS_AXIS_ID_MOLD); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMovePointUp"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(u8"升降[%.3f]往上移动%.3f", mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(u8"升降[%.3f]往上移动%.3f", mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + } + + ImGui::SameLine(); + if (IsMoldCanMoveUp()) { + ImGui::PushID("MoldMoveLimitUp"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) { + if (!m_PowderAssist.isMoldUpRepeat) { + m_PowderAssist.isMoldUpRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(u8"升降[%.3f]往上连续移动", mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldUpRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + m_PowderAssist.isMoldUpRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸上连续").c_str()); + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::UP_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotUpInfo().c_str()); + } + if (m_PowderAssist.isMoldUpRepeat) { + m_PowderAssist.isMoldUpRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow), false)) { + if (IsMoldCanMoveUp()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::UP); + g_log->TraceInfo(u8"升降[%.3f]往上连续移动", mold->GetShowPos()); + } + else { + g_Toast->AddToast(new ToastBean(GetMoldCanotUpInfo(), 5000, Toast::COLOR_ORANGE)); + } + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_UpArrow))) + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::UP); + } + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMovePointDown"); + if (ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(u8"升降[%.3f]往下移动%.3f", mold->GetShowPos(), moldCfgVal.rel); + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下移 %.3fmm").c_str(), moldCfgVal.rel / 1000.0f); + } + if (kb == GTS_AXIS_ID_MOLD && !continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) { + m_Axis->m_Mold->MovPoint(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(u8"升降[%.3f]往下移动%.3f", mold->GetShowPos(), moldCfgVal.rel); + } + } + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + } + + ImGui::SameLine(); + + if (IsMoldCanMoveDown()) { + ImGui::PushID("MoldMoveLimitDown"); + if (ImGui::ImageButtonEx(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_GREEN_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + { + if (!m_PowderAssist.isMoldDownRepeat) { + m_PowderAssist.isMoldDownRepeat = true; + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(u8"升降[%.3f]往下连续移动", mold->GetShowPos()); + } + } + else { + if (m_PowderAssist.isMoldDownRepeat) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + m_PowderAssist.isMoldDownRepeat = false; + } + } + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸下连续").c_str()); + } + + } + else { + ImGui::ImageButton(chartletManager->m_TextureMap[ChartletManager::DOWN_ARROW_RED_BAR]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(GetMoldCanotDownInfo().c_str()); + } + if (m_PowderAssist.isMoldDownRepeat) { + m_PowderAssist.isMoldDownRepeat = false; + } + } + if (kb == GTS_AXIS_ID_MOLD && continue_move) { + if (ImGui::IsWindowFocused() && ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow), false)) + { + if (IsMoldCanMoveDown()) { + m_Axis->m_Mold->MovLimitStart(AxisConfig::ActiveDirect::DOWN); + g_log->TraceInfo(u8"升降[%.3f]往连续下移动", mold->GetShowPos()); + } + else + { + g_Toast->AddToast(new ToastBean(GetMoldCanotDownInfo(), 5000, Toast::COLOR_ORANGE)); + } + + } + if (ImGui::IsWindowFocused() && ImGui::IsKeyReleased(ImGui::GetKeyIndex(ImGuiKey_DownArrow))) + { + m_Axis->m_Mold->MovLimitStop(AxisConfig::ActiveDirect::DOWN); + } + } + ImGui::PushID("mold_to_zero"); + if (ImGui::ImageButton(chartletManager->m_ToZero->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) + mold->SetZeroPos(); + ImGui::PopID(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_(u8"成型缸位置清零").c_str()); + } + ImGui::EndGroup(); + + ImGui::EndChild(); + + ImGui::End(); + +} void HBDE1000::DrawAnalogExt() { @@ -5503,321 +5517,322 @@ void HBDE1000::DrawAnalogExt() //{ // //} -//bool HBDE1000::IsLoadAxisCanMoveLeft() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; -// if (!m_SignalState.m_CylinderSealNoInflationStatue)return false; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//string HBDE1000::GetLoadAxisCanotMoveLeftInfo() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return u8"打印顶升轴不在安全位"; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return u8"移载扭力越限"; -// if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return u8"移载轴越软左限"; -// if (!m_SignalState.m_CylinderSealNoInflationStatue)return u8"密封圈充气状态"; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; -// if (!m_SignalState.m_LoadLeftNotInsideLimit)return u8"移载轴已到左限位"; -// if (!m_SignalState.m_LoadServoNoAlarm)return u8"移载轴伺服异常"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -//bool HBDE1000::IsLoadAxisCanMoveRight() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return false; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return false; -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; -// if (!m_SignalState.m_CylinderSealNoInflationStatue)return false; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; -// if (!m_SignalState.m_LoadRightNotInsideLimit)return false; -// if (!m_SignalState.m_LoadServoNoAlarm)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//string HBDE1000::GetLoadAxisCanotMoveRightInfo() -//{ -// if (!m_SignalState.m_PrintJackupInSafePos)return u8"打印顶升轴不在安全位"; -// if (!m_SignalState.m_LoadTorqueInsideLimit)return u8"移载扭力越限"; -// if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return u8"移载轴越软右限"; -// if (!m_SignalState.m_CylinderSealNoInflationStatue)return u8"密封圈充气状态"; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; -// if (!m_SignalState.m_LoadRightNotInsideLimit)return u8"移载轴已到右限位"; -// if (!m_SignalState.m_LoadServoNoAlarm)return u8"移载轴伺服异常"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -//bool HBDE1000::IsArmCanMoveBack() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; -// if (!m_SignalState.m_ArmPosInsideBackLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//string HBDE1000::GetArmCanotMoveBackInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return u8"打印升降轴高于基板缸平面"; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return u8"铺粉轴扭力越限"; -// if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return u8"铺粉轴位置超过软后限"; -// if (!m_SignalState.m_ArmPosInsideBackLimit)return u8"铺粉轴已到后限位"; -// if (!m_SignalState.m_ArmServoNoAlarm)return u8"铺粉轴伺服异常"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -//bool HBDE1000::IsArmCanMoveFront() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return false; -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; -// if (!m_SignalState.m_ArmServoNoAlarm)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//string HBDE1000::GetArmCanotMoveFrontInfo() -//{ -// if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return u8"打印升降轴高于基板缸平面"; -// if (!m_SignalState.m_ArmTorqueInsideLimit)return u8"铺粉轴扭力越限"; -// if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return u8"铺粉轴位置超过软前限"; -// if (!m_SignalState.m_ArmPosInsideFrontLimit)return u8"铺粉轴已到前限位"; -// if (!m_SignalState.m_ArmServoNoAlarm)return u8"铺粉轴伺服异常"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -//bool HBDE1000::IsMoldCanMoveUp() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideUpLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//bool HBDE1000::IsMoldCanMoveDown() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return false; -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; -// if (!m_SignalState.m_PrintInsideDownLimit)return false; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return false; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; -// if (!m_SignalState.m_HighPressureLackAlarm)return false; -// if (!m_SignalState.m_SystemStopAlarm)return false; -// if (!m_SignalState.m_CleanLiftStopAlarm)return false; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; -// return true; -//} -//string HBDE1000::GetMoldCanotUpInfo() -//{ -// if (!m_SignalState.m_PrintTorqueUpInsideLimit)return u8"升降轴上升扭力越限"; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return u8"铺粉臂在基板范围内"; -// if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return u8"升降轴越软上限"; -// if (!m_SignalState.m_PrintInsideUpLimit)return u8"升降轴越上限"; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return u8"打印主轴伺服异常"; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) -// { -// return u8"缸体不在打印位、清粉位、吊装位"; -// } -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -//string HBDE1000::GetMoldCanotDownInfo() -//{ -// if (!m_SignalState.m_PrintTorqueDownInsideLimit)return u8"升降轴下降扭力越限"; -// if (!m_SignalState.m_ArmNotUponBasePlatform)return u8"铺粉臂在基板范围内"; -// if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return u8"升降轴越软下限"; -// if (!m_SignalState.m_PrintInsideDownLimit)return u8"升降轴越下限"; -// if (!m_SignalState.m_PrintMainServoNoAlarm)return u8"打印主轴伺服异常"; -// if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) -// { -// return u8"缸体不在打印位、清粉位、吊装位"; -// } -// if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; -// if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; -// if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; -// if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; -// if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; -// return u8"未知原因"; -//} -// -//void HBDE1000::DrawServoState(bool* winShow) -//{ -// ImGui::SetNextWindowSize(ImVec2(452, 603)); -// ImGui::Begin(u8"伺服状态", winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize); -// ImGui::BeginTabBar("servo_state"); -// if (ImGui::BeginTabItem(u8"打印轴")) { -// AxisStateValue mold; -// m_Axis->m_Mold->GetState()->GetValue(mold); -// ImGui::BeginGroup(); -// ImGui::Text(u8"伺服使能:%s", mold.ServoOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服成立原点: %s", mold.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服复位: %s", mold.ServoReset ? "YES" : "NO"); -// ImGui::Text(u8"相对上运动: %s", mold.MoveP ? "YES" : "NO"); -// ImGui::Text(u8"相对下运动: %s", mold.MoveN ? "YES" : "NO"); -// ImGui::Text(u8"上JOG: %s", mold.MovePContinue ? "YES" : "NO"); -// ImGui::Text(u8"下JOG: %s", mold.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(u8"绝对值运动: %s", mold.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(u8"急停: %s", mold.MotionStop ? "YES" : "NO"); -// ImGui::Text(u8"伺服RDY状态: %s", mold.ServoRDY ? "YES" : "NO"); -// ImGui::Text(u8"指令运行HOME_Done: %s", mold.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(u8"指令运行RESET_Done: %s", mold.ResetDone ? "YES" : "NO"); -// ImGui::Text(u8"伺服BUSY: %s", mold.ServoBusy ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常: %s", mold.ServoException ? "YES" : "NO"); -// ImGui::Text(u8"可运行状态: %s", mold.Runable ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常字: %d", mold.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(u8"主轴伺服刹车: %s", mold.ServoBreakOn ? "YES" : "NO"); -// ImGui::Text(u8"轴位置: %.3f", mold.Pos); -// ImGui::Text(u8"轴扭矩: %.3f", mold.Torque); -// ImGui::EndGroup(); -// -// ImGui::SameLine(); -// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); -// ImGui::SameLine(); -// -// ImGui::BeginGroup(); -// g_SystemInfo->LockInfo(); -// float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; -// float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; -// float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; -// float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; -// g_SystemInfo->UnlockInfo(); -// ImGui::Text(u8"光栅每层实际值: %.3f", linearLayerValue); -// ImGui::Text(u8"升降理论行程: %.3f", moldTheoryDis); -// ImGui::Text(u8"光栅实际行程: %.3f", linearActDis); -// ImGui::Text(u8"光栅实际脉冲数: %.3f", linearPulseValue); -// -// ImGui::EndGroup(); -// ImGui::EndTabItem(); -// } -// -// -// if (ImGui::BeginTabItem(u8"铺粉轴")) { -// AxisStateValue arm; -// m_Axis->m_Arm->GetState()->GetValue(arm); -// ImGui::Text(u8"伺服使能:%s", arm.ServoOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服成立原点: %s", arm.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服复位: %s", arm.ServoReset ? "YES" : "NO"); -// ImGui::Text(u8"相对前运动: %s", arm.MoveP ? "YES" : "NO"); -// ImGui::Text(u8"相对后运动: %s", arm.MoveN ? "YES" : "NO"); -// ImGui::Text(u8"前JOG: %s", arm.MovePContinue ? "YES" : "NO"); -// ImGui::Text(u8"后JOG: %s", arm.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(u8"绝对值运动: %s", arm.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(u8"急停: %s", arm.MotionStop ? "YES" : "NO"); -// ImGui::Text(u8"伺服RDY状态: %s", arm.ServoRDY ? "YES" : "NO"); -// ImGui::Text(u8"指令运行HOME_Done: %s", arm.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(u8"指令运行RESET_Done: %s", arm.ResetDone ? "YES" : "NO"); -// ImGui::Text(u8"伺服BUSY: %s", arm.ServoBusy ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常: %s", arm.ServoException ? "YES" : "NO"); -// ImGui::Text(u8"可运行状态: %s", arm.Runable ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常字: %d", arm.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(u8"轴位置: %.3f", arm.Pos); -// ImGui::Text(u8"轴扭矩: %.3f", arm.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(u8"移载轴")) { -// AxisStateValue load; -// m_Axis->m_Load->GetState()->GetValue(load); -// ImGui::Text(u8"伺服使能:%s", load.ServoOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服成立原点: %s", load.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服复位: %s", load.ServoReset ? "YES" : "NO"); -// ImGui::Text(u8"相对右运动: %s", load.MoveP ? "YES" : "NO"); -// ImGui::Text(u8"相对左运动: %s", load.MoveN ? "YES" : "NO"); -// ImGui::Text(u8"右JOG: %s", load.MovePContinue ? "YES" : "NO"); -// ImGui::Text(u8"左JOG: %s", load.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(u8"绝对值运动: %s", load.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(u8"急停: %s", load.MotionStop ? "YES" : "NO"); -// ImGui::Text(u8"伺服RDY状态: %s", load.ServoRDY ? "YES" : "NO"); -// ImGui::Text(u8"指令运行HOME_Done: %s", load.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(u8"指令运行RESET_Done: %s", load.ResetDone ? "YES" : "NO"); -// ImGui::Text(u8"伺服BUSY: %s", load.ServoBusy ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常: %s", load.ServoException ? "YES" : "NO"); -// ImGui::Text(u8"可运行状态: %s", load.Runable ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常字: %d", load.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(u8"轴位置: %.3f", load.Pos); -// ImGui::Text(u8"轴扭矩: %.3f", load.Torque); -// ImGui::EndTabItem(); -// } -// -// if (ImGui::BeginTabItem(u8"供粉轴")) { -// AxisStateValue supply; -// m_Axis->m_Supply->GetState()->GetValue(supply); -// ImGui::Text(u8"伺服使能:%s", supply.ServoOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服成立原点: %s", supply.ServoHomeIndexOn ? "YES" : "NO"); -// ImGui::Text(u8"伺服复位: %s", supply.ServoReset ? "YES" : "NO"); -// ImGui::Text(u8"相对右运动: %s", supply.MoveP ? "YES" : "NO"); -// ImGui::Text(u8"相对左运动: %s", supply.MoveN ? "YES" : "NO"); -// ImGui::Text(u8"右JOG: %s", supply.MovePContinue ? "YES" : "NO"); -// ImGui::Text(u8"左JOG: %s", supply.MoveNContinue ? "YES" : "NO"); -// ImGui::Text(u8"绝对值运动: %s", supply.MoveAbsPos ? "YES" : "NO"); -// ImGui::Text(u8"急停: %s", supply.MotionStop ? "YES" : "NO"); -// ImGui::Text(u8"伺服RDY状态: %s", supply.ServoRDY ? "YES" : "NO"); -// ImGui::Text(u8"指令运行HOME_Done: %s", supply.ServoHomeDone ? "YES" : "NO"); -// ImGui::Text(u8"指令运行RESET_Done: %s", supply.ResetDone ? "YES" : "NO"); -// ImGui::Text(u8"伺服BUSY: %s", supply.ServoBusy ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常: %s", supply.ServoException ? "YES" : "NO"); -// ImGui::Text(u8"可运行状态: %s", supply.Runable ? "YES" : "NO"); -// ImGui::Text(u8"伺服异常字: %d", supply.ExceptionCode); //轴伺服异常字_R -// ImGui::Text(u8"轴位置: %.3f", supply.Pos); -// ImGui::Text(u8"轴扭矩: %.3f", supply.Torque); -// ImGui::EndTabItem(); -// } -// -// ImGui::EndTabBar(); -// ImGui::End(); -//} -// -//bool HBDE1000::CheckPrintMoldReady() -//{ -// if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) -// { -// return false; -// } -// else return true; -//} -// + +bool HBDE1000::IsLoadAxisCanMoveLeft() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return false; + if (!m_SignalState.m_CylinderSealNoInflationStatue)return false; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; + if (!m_SignalState.m_LoadLeftNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +string HBDE1000::GetLoadAxisCanotMoveLeftInfo() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return u8"打印顶升轴不在安全位"; + if (!m_SignalState.m_LoadTorqueInsideLimit)return u8"移载扭力越限"; + if (!m_SignalState.m_LoadPosInsideLeftSoftLimit)return u8"移载轴越软左限"; + if (!m_SignalState.m_CylinderSealNoInflationStatue)return u8"密封圈充气状态"; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; + if (!m_SignalState.m_LoadLeftNotInsideLimit)return u8"移载轴已到左限位"; + if (!m_SignalState.m_LoadServoNoAlarm)return u8"移载轴伺服异常"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} +bool HBDE1000::IsLoadAxisCanMoveRight() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return false; + if (!m_SignalState.m_LoadTorqueInsideLimit)return false; + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return false; + if (!m_SignalState.m_CylinderSealNoInflationStatue)return false; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; + if (!m_SignalState.m_LoadRightNotInsideLimit)return false; + if (!m_SignalState.m_LoadServoNoAlarm)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +string HBDE1000::GetLoadAxisCanotMoveRightInfo() +{ + if (!m_SignalState.m_PrintJackupInSafePos)return u8"打印顶升轴不在安全位"; + if (!m_SignalState.m_LoadTorqueInsideLimit)return u8"移载扭力越限"; + if (!m_SignalState.m_LoadPosInsideRightSoftLimit)return u8"移载轴越软右限"; + if (!m_SignalState.m_CylinderSealNoInflationStatue)return u8"密封圈充气状态"; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; + if (!m_SignalState.m_LoadRightNotInsideLimit)return u8"移载轴已到右限位"; + if (!m_SignalState.m_LoadServoNoAlarm)return u8"移载轴伺服异常"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Load->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} +bool HBDE1000::IsArmCanMoveBack() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return false; + if (!m_SignalState.m_ArmPosInsideBackLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +string HBDE1000::GetArmCanotMoveBackInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return u8"打印升降轴高于基板缸平面"; + if (!m_SignalState.m_ArmTorqueInsideLimit)return u8"铺粉轴扭力越限"; + if (!m_SignalState.m_ArmPosInsideSoftBackLimit)return u8"铺粉轴位置超过软后限"; + if (!m_SignalState.m_ArmPosInsideBackLimit)return u8"铺粉轴已到后限位"; + if (!m_SignalState.m_ArmServoNoAlarm)return u8"铺粉轴伺服异常"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} +bool HBDE1000::IsArmCanMoveFront() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return false; + if (!m_SignalState.m_ArmTorqueInsideLimit)return false; + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return false; + if (!m_SignalState.m_ArmPosInsideFrontLimit)return false; + if (!m_SignalState.m_ArmServoNoAlarm)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +string HBDE1000::GetArmCanotMoveFrontInfo() +{ + if (!m_SignalState.m_PrintUpDownPosBelowPlatform)return u8"打印升降轴高于基板缸平面"; + if (!m_SignalState.m_ArmTorqueInsideLimit)return u8"铺粉轴扭力越限"; + if (!m_SignalState.m_ArmPosInsideSoftFrontLimit)return u8"铺粉轴位置超过软前限"; + if (!m_SignalState.m_ArmPosInsideFrontLimit)return u8"铺粉轴已到前限位"; + if (!m_SignalState.m_ArmServoNoAlarm)return u8"铺粉轴伺服异常"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Arm->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} +bool HBDE1000::IsMoldCanMoveUp() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return false; + if (!m_SignalState.m_PrintInsideUpLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +bool HBDE1000::IsMoldCanMoveDown() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return false; + if (!m_SignalState.m_ArmNotUponBasePlatform)return false; + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return false; + if (!m_SignalState.m_PrintInsideDownLimit)return false; + if (!m_SignalState.m_PrintMainServoNoAlarm)return false; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos)return false; + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return false; + if (!m_SignalState.m_HighPressureLackAlarm)return false; + if (!m_SignalState.m_SystemStopAlarm)return false; + if (!m_SignalState.m_CleanLiftStopAlarm)return false; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return false; + return true; +} +string HBDE1000::GetMoldCanotUpInfo() +{ + if (!m_SignalState.m_PrintTorqueUpInsideLimit)return u8"升降轴上升扭力越限"; + if (!m_SignalState.m_ArmNotUponBasePlatform)return u8"铺粉臂在基板范围内"; + if (!m_SignalState.m_PrintMoldPosInsideUpSoftLimit)return u8"升降轴越软上限"; + if (!m_SignalState.m_PrintInsideUpLimit)return u8"升降轴越上限"; + if (!m_SignalState.m_PrintMainServoNoAlarm)return u8"打印主轴伺服异常"; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) + { + return u8"缸体不在打印位、清粉位、吊装位"; + } + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} +string HBDE1000::GetMoldCanotDownInfo() +{ + if (!m_SignalState.m_PrintTorqueDownInsideLimit)return u8"升降轴下降扭力越限"; + if (!m_SignalState.m_ArmNotUponBasePlatform)return u8"铺粉臂在基板范围内"; + if (!m_SignalState.m_PrintAxisPosInsideDownSoftLimit)return u8"升降轴越软下限"; + if (!m_SignalState.m_PrintInsideDownLimit)return u8"升降轴越下限"; + if (!m_SignalState.m_PrintMainServoNoAlarm)return u8"打印主轴伺服异常"; + if (!m_SignalState.m_PrintMoldInPrintPos && !m_SignalState.m_PrintMoldInCleanPos && !m_SignalState.m_PrintMoldInHandPos) + { + return u8"缸体不在打印位、清粉位、吊装位"; + } + if (!m_SignalState.m_LoadUpDownServiceDoorCloseStatue)return u8"上下维护门不在关闭状态"; + if (!m_SignalState.m_HighPressureLackAlarm)return u8"高压气不足报警"; + if (!m_SignalState.m_SystemStopAlarm)return u8"系统急停异常"; + if (!m_SignalState.m_CleanLiftStopAlarm)return u8"清粉急停异常"; + if (m_Axis->m_Mold->GetState()->m_AxisCfg->m_SafeLimit && !g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose)return u8"舱门打开时运动受限"; + return u8"未知原因"; +} + +void HBDE1000::DrawServoState(bool* winShow) +{ + ImGui::SetNextWindowSize(ImVec2(452, 603)); + ImGui::Begin(u8"伺服状态", winShow, ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoResize); + ImGui::BeginTabBar("servo_state"); + if (ImGui::BeginTabItem(u8"打印轴")) { + AxisStateValue mold; + m_Axis->m_Mold->GetState()->GetValue(mold); + ImGui::BeginGroup(); + ImGui::Text(u8"伺服使能:%s", mold.ServoOn ? "YES" : "NO"); + ImGui::Text(u8"伺服成立原点: %s", mold.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(u8"伺服复位: %s", mold.ServoReset ? "YES" : "NO"); + ImGui::Text(u8"相对上运动: %s", mold.MoveP ? "YES" : "NO"); + ImGui::Text(u8"相对下运动: %s", mold.MoveN ? "YES" : "NO"); + ImGui::Text(u8"上JOG: %s", mold.MovePContinue ? "YES" : "NO"); + ImGui::Text(u8"下JOG: %s", mold.MoveNContinue ? "YES" : "NO"); + ImGui::Text(u8"绝对值运动: %s", mold.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(u8"急停: %s", mold.MotionStop ? "YES" : "NO"); + ImGui::Text(u8"伺服RDY状态: %s", mold.ServoRDY ? "YES" : "NO"); + ImGui::Text(u8"指令运行HOME_Done: %s", mold.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(u8"指令运行RESET_Done: %s", mold.ResetDone ? "YES" : "NO"); + ImGui::Text(u8"伺服BUSY: %s", mold.ServoBusy ? "YES" : "NO"); + ImGui::Text(u8"伺服异常: %s", mold.ServoException ? "YES" : "NO"); + ImGui::Text(u8"可运行状态: %s", mold.Runable ? "YES" : "NO"); + ImGui::Text(u8"伺服异常字: %d", mold.ExceptionCode); //轴伺服异常字_R + ImGui::Text(u8"主轴伺服刹车: %s", mold.ServoBreakOn ? "YES" : "NO"); + ImGui::Text(u8"轴位置: %.3f", mold.Pos); + ImGui::Text(u8"轴扭矩: %.3f", mold.Torque); + ImGui::EndGroup(); + + ImGui::SameLine(); + ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical); + ImGui::SameLine(); + + ImGui::BeginGroup(); + g_SystemInfo->LockInfo(); + float linearLayerValue = g_SystemInfo->m_EnvState.m_LinearLayerPos; + float moldTheoryDis = g_SystemInfo->m_EnvState.m_MoldTheoryDistance; + float linearActDis = g_SystemInfo->m_EnvState.m_LinearActDistance; + float linearPulseValue = g_SystemInfo->m_EnvState.m_LinearActPulse; + g_SystemInfo->UnlockInfo(); + ImGui::Text(u8"光栅每层实际值: %.3f", linearLayerValue); + ImGui::Text(u8"升降理论行程: %.3f", moldTheoryDis); + ImGui::Text(u8"光栅实际行程: %.3f", linearActDis); + ImGui::Text(u8"光栅实际脉冲数: %.3f", linearPulseValue); + + ImGui::EndGroup(); + ImGui::EndTabItem(); + } + + + if (ImGui::BeginTabItem(u8"铺粉轴")) { + AxisStateValue arm; + m_Axis->m_Arm->GetState()->GetValue(arm); + ImGui::Text(u8"伺服使能:%s", arm.ServoOn ? "YES" : "NO"); + ImGui::Text(u8"伺服成立原点: %s", arm.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(u8"伺服复位: %s", arm.ServoReset ? "YES" : "NO"); + ImGui::Text(u8"相对前运动: %s", arm.MoveP ? "YES" : "NO"); + ImGui::Text(u8"相对后运动: %s", arm.MoveN ? "YES" : "NO"); + ImGui::Text(u8"前JOG: %s", arm.MovePContinue ? "YES" : "NO"); + ImGui::Text(u8"后JOG: %s", arm.MoveNContinue ? "YES" : "NO"); + ImGui::Text(u8"绝对值运动: %s", arm.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(u8"急停: %s", arm.MotionStop ? "YES" : "NO"); + ImGui::Text(u8"伺服RDY状态: %s", arm.ServoRDY ? "YES" : "NO"); + ImGui::Text(u8"指令运行HOME_Done: %s", arm.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(u8"指令运行RESET_Done: %s", arm.ResetDone ? "YES" : "NO"); + ImGui::Text(u8"伺服BUSY: %s", arm.ServoBusy ? "YES" : "NO"); + ImGui::Text(u8"伺服异常: %s", arm.ServoException ? "YES" : "NO"); + ImGui::Text(u8"可运行状态: %s", arm.Runable ? "YES" : "NO"); + ImGui::Text(u8"伺服异常字: %d", arm.ExceptionCode); //轴伺服异常字_R + ImGui::Text(u8"轴位置: %.3f", arm.Pos); + ImGui::Text(u8"轴扭矩: %.3f", arm.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(u8"移载轴")) { + AxisStateValue load; + m_Axis->m_Load->GetState()->GetValue(load); + ImGui::Text(u8"伺服使能:%s", load.ServoOn ? "YES" : "NO"); + ImGui::Text(u8"伺服成立原点: %s", load.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(u8"伺服复位: %s", load.ServoReset ? "YES" : "NO"); + ImGui::Text(u8"相对右运动: %s", load.MoveP ? "YES" : "NO"); + ImGui::Text(u8"相对左运动: %s", load.MoveN ? "YES" : "NO"); + ImGui::Text(u8"右JOG: %s", load.MovePContinue ? "YES" : "NO"); + ImGui::Text(u8"左JOG: %s", load.MoveNContinue ? "YES" : "NO"); + ImGui::Text(u8"绝对值运动: %s", load.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(u8"急停: %s", load.MotionStop ? "YES" : "NO"); + ImGui::Text(u8"伺服RDY状态: %s", load.ServoRDY ? "YES" : "NO"); + ImGui::Text(u8"指令运行HOME_Done: %s", load.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(u8"指令运行RESET_Done: %s", load.ResetDone ? "YES" : "NO"); + ImGui::Text(u8"伺服BUSY: %s", load.ServoBusy ? "YES" : "NO"); + ImGui::Text(u8"伺服异常: %s", load.ServoException ? "YES" : "NO"); + ImGui::Text(u8"可运行状态: %s", load.Runable ? "YES" : "NO"); + ImGui::Text(u8"伺服异常字: %d", load.ExceptionCode); //轴伺服异常字_R + ImGui::Text(u8"轴位置: %.3f", load.Pos); + ImGui::Text(u8"轴扭矩: %.3f", load.Torque); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem(u8"供粉轴")) { + AxisStateValue supply; + m_Axis->m_Supply->GetState()->GetValue(supply); + ImGui::Text(u8"伺服使能:%s", supply.ServoOn ? "YES" : "NO"); + ImGui::Text(u8"伺服成立原点: %s", supply.ServoHomeIndexOn ? "YES" : "NO"); + ImGui::Text(u8"伺服复位: %s", supply.ServoReset ? "YES" : "NO"); + ImGui::Text(u8"相对右运动: %s", supply.MoveP ? "YES" : "NO"); + ImGui::Text(u8"相对左运动: %s", supply.MoveN ? "YES" : "NO"); + ImGui::Text(u8"右JOG: %s", supply.MovePContinue ? "YES" : "NO"); + ImGui::Text(u8"左JOG: %s", supply.MoveNContinue ? "YES" : "NO"); + ImGui::Text(u8"绝对值运动: %s", supply.MoveAbsPos ? "YES" : "NO"); + ImGui::Text(u8"急停: %s", supply.MotionStop ? "YES" : "NO"); + ImGui::Text(u8"伺服RDY状态: %s", supply.ServoRDY ? "YES" : "NO"); + ImGui::Text(u8"指令运行HOME_Done: %s", supply.ServoHomeDone ? "YES" : "NO"); + ImGui::Text(u8"指令运行RESET_Done: %s", supply.ResetDone ? "YES" : "NO"); + ImGui::Text(u8"伺服BUSY: %s", supply.ServoBusy ? "YES" : "NO"); + ImGui::Text(u8"伺服异常: %s", supply.ServoException ? "YES" : "NO"); + ImGui::Text(u8"可运行状态: %s", supply.Runable ? "YES" : "NO"); + ImGui::Text(u8"伺服异常字: %d", supply.ExceptionCode); //轴伺服异常字_R + ImGui::Text(u8"轴位置: %.3f", supply.Pos); + ImGui::Text(u8"轴扭矩: %.3f", supply.Torque); + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + ImGui::End(); +} + +bool HBDE1000::CheckPrintMoldReady() +{ + if (m_SignalStateWrapper->m_CylinderState->GetValue() != CylinderInPrintLoaded) + { + return false; + } + else return true; +} + diff --git a/PrintC/Machine/HBDE1000.h b/PrintC/Machine/HBDE1000.h index 1f81296..99ff0ab 100644 --- a/PrintC/Machine/HBDE1000.h +++ b/PrintC/Machine/HBDE1000.h @@ -73,7 +73,7 @@ public: void InitSysParam(SysParamWrapper* spw, void* cc); //void InitPLCCommand(vector& vecs); //void GetAlarmState(SignalState& signalState); - //bool CheckPrintMoldReady(); + bool CheckPrintMoldReady(); virtual void CheckIO(); private: /*static*/ void CheckIO_V0(/*vector&ins, IOCfgWrapper* iocfgWrapper, string str, int mtype*/); diff --git a/PrintC/Machine/Machine.h b/PrintC/Machine/Machine.h index 5249723..8c3e4f0 100644 --- a/PrintC/Machine/Machine.h +++ b/PrintC/Machine/Machine.h @@ -52,13 +52,13 @@ public: void Update(const ReadData& rd); protected: - int GetLoadInResult() { - int rel = 0; - EnterCriticalSection(&m_LoadCS); - rel = m_LoadInResut; - LeaveCriticalSection(&m_LoadCS); - return rel; - } + //int GetLoadInResult() { + // int rel = 0; + // EnterCriticalSection(&m_LoadCS); + // rel = m_LoadInResut; + // LeaveCriticalSection(&m_LoadCS); + // return rel; + //} //int GetLoadOutResult() { // int rel = 0; // EnterCriticalSection(&m_LoadCS); diff --git a/PrintC/PLC/SysParam.h b/PrintC/PLC/SysParam.h index 4429517..0020a3e 100644 --- a/PrintC/PLC/SysParam.h +++ b/PrintC/PLC/SysParam.h @@ -785,7 +785,7 @@ class AxisRecordWrapper { public: AxisRecordWrapper() {} ~AxisRecordWrapper() {} - void Init(void* cc); + void Init(void* cc = nullptr); public: SysParamBool* m_PrintMoldSafePosRecord; //打印升降轴安全位记录 SysParamBool* m_MoldCylinderSeparatePosRecord; //打印升降与缸体分离位记录_RW diff --git a/PrintC/UI/Controller.cpp b/PrintC/UI/Controller.cpp index 7e1e082..4e33385 100644 --- a/PrintC/UI/Controller.cpp +++ b/PrintC/UI/Controller.cpp @@ -36,8 +36,10 @@ bool Controller::Init() { SysParam::SInit(); m_StateCtrlWrapper = new StateCtrlWrapper(); + m_StateCtrlWrapper->Init(); m_SysParamWrapper = new SysParamWrapper(); m_AxisRecordWrapper = new AxisRecordWrapper(); + m_AxisRecordWrapper->Init(); m_SignalStateWrapper = new SignalStateWrapper(); ConfigManager::Instance()->Init(); m_Machine = ConfigManager::Instance()->GetMachine(); diff --git a/PrintC/UI/UIWin.cpp b/PrintC/UI/UIWin.cpp index 5e7888f..aa1e921 100644 --- a/PrintC/UI/UIWin.cpp +++ b/PrintC/UI/UIWin.cpp @@ -680,8 +680,9 @@ void UIWin::DrawMain() { ImGui::Begin("HBDSystem1000", NULL, ImGuiWindowFlags_MenuBar); // Menu Begin - bool enableFlag = false; + bool enableFlag = true; bool exitStopLaserFlag = false; + if (/*m_Controller->m_ScannerCtrl->IsStandBy() ||*/ g_Admin == ADMIN || g_Admin == USER_ADMIN) { enableFlag = true; } diff --git a/PrintC/config/bean/IOCfg.cpp b/PrintC/config/bean/IOCfg.cpp index cf708d8..cb04320 100644 --- a/PrintC/config/bean/IOCfg.cpp +++ b/PrintC/config/bean/IOCfg.cpp @@ -950,7 +950,7 @@ void IO_1000_V0::Update(unsigned char* arr) doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1000_V1::Init(map& ioCfgMap) @@ -1311,7 +1311,7 @@ void IO_1000_V1::Update(unsigned char* arr) doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1000_V2::Init(map& ioCfgMap) @@ -1705,7 +1705,7 @@ void IO_1000_V2::Update(unsigned char* arr) { doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1000_V3::Init(map& ioCfgMap) @@ -2095,7 +2095,7 @@ void IO_1000_V3::Update(unsigned char* arr) { doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1000_V4::Init(map& ioCfgMap) @@ -2497,7 +2497,7 @@ void IO_1000_V4::Update(unsigned char* arr) { doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1500_V0::Init(map& ioCfgMap) @@ -2882,7 +2882,7 @@ void IO_1500_V0::Update(unsigned char* arr) doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1500_V1::Init(map& ioCfgMap) @@ -3232,7 +3232,7 @@ void IO_1500_V1::Update(unsigned char* arr) doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_1200_V0::Init(map& ioCfgMap) @@ -3584,7 +3584,7 @@ void IO_1200_V0::Update(unsigned char* arr) doorState[1] = m_SafeDoorClose2->m_IsActive; doorState[2] = m_SafeDoorClose3->m_IsActive; doorState[3] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } void IO_E1000_V0::Init(map& ioCfgMap) @@ -3899,5 +3899,5 @@ void IO_E1000_V0::Update(unsigned char* arr) bitset<8> doorState; doorState.reset(); doorState[2] = m_PrintDoorLock->m_IsActive; - m_SafeDoorState = doorState.to_ulong(); + m_SafeDoorState = (char)doorState.to_ulong(); } \ No newline at end of file diff --git a/PrintC/imgui.ini b/PrintC/imgui.ini index 670f3a2..b1867a0 100644 --- a/PrintC/imgui.ini +++ b/PrintC/imgui.ini @@ -34,6 +34,11 @@ Pos=636,381 Size=264,102 Collapsed=0 +[Window][铺粉装置调试] +Pos=128,19 +Size=1236,722 +Collapsed=0 + [Docking][Data] DockSpace ID=0x0204CCDD Window=0xDEDC5B90 Pos=0,40 Size=1536,779 Split=X DockNode ID=0x00000001 Parent=0x0204CCDD SizeRef=1178,779 CentralNode=1 diff --git a/PrintC/output/Release/log/2024.hbd b/PrintC/output/Release/log/2024.hbd index 46679f0a6a996f811e3fb1183039841a556eba23..bd7c5ff0b371944eca5782c06cdcc4b478512cd4 100644 GIT binary patch delta 16526 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