Page 178 - Welding Robots Technology, System Issues, and Applications
P. 178
166 Welding Robots
float value = 9100;
nResult = m_pon.WriteNum(LPCTSTR("decision1"),&value);
if (nResult <0) m_msg.SetWindowText("Failled to leave routine.");
if (m_linear.GetCheck())
{
value = 198;
nResult = m_pon.WriteNum(LPCTSTR("varmove"),&value);
if (nResult <0) m_msg.SetWindowText("Failled to leave routine.");
} else
{
value = 0;
nResult = m_pon.WriteNum(LPCTSTR("varmove"),&value);
if (nResult <0) m_msg.SetWindowText("Failled to leave routine.");
}
CString msg;
float value;
m_inc.GetWindowText(msg);
if (msg.GetLength()) value = -(float) atof(msg); else value = 0;
if ((m_linear.GetCheck() == 1) || (m_joints.GetCheck() == 1)) nResult
= m_pon.WriteNum(LPCTSTR("xx"),&value); else
nResult = m_pon.WriteNum(LPCTSTR("rx"),&value);
if (nResult <0) m_msg.SetWindowText("Failled to leave routine.");
CString msg;
float value;
m_inc.GetWindowText(msg);
if (msg.GetLength()) value = (float) atof(msg); else value = 0;
if ((m_linear.GetCheck() == 1) || (m_joints.GetCheck() == 1)) nResult
= m_pon.WriteNum(LPCTSTR("xx"),&value); else
nResult = m_pon.WriteNum(LPCTSTR("rx"),&value);
if (nResult <0) m_msg.SetWindowText("Failled to leave routine.");
Figure 5.15. Code associated with some functions of the “WeldAdjustl” application