|
PLCÃâ·ÂÁ¦¾î(MASTER-K10s1) |
|||
ÇнÀ¸ñÇ¥ |
||||
PC ȸ鿡¼ Ãâ·Â ½ºÀ§Ä¡ÀÇ »óŸ¦ ÀÐ¾î¼ PLC Ãâ·ÂÁ¢Á¡À¸·Î
Ãâ·ÂÀ» ³»º¸³»´Â ÇÁ·Î±×·¥À» ¸¸µç´Ù. |
||||
ÇнÀÁÖÁ¦ |
||||
1. MASTER-K10s1 ¿¡´Â 6°³ÀÇ Ãâ·Â ´ÜÀÚ°¡ ÀÖÀ¸¹Ç·Î 6°³ÀÇ ½ºÀ§Ä¡¸¦
¸¸µç´Ù. 2. ½ºÀ§Ä¡ÀÇ »óŸ¦ ÀÐ¾î¼ ¼Û½ÅÇÏ´Â CheckOut()
ÇÔ¼ö¸¦ ¸¸µç´Ù. STX01 HP001006101000 EOT À§¿¡¼ 01Àº ±â±â¹øÈ£, P´Â µ¥ÀÌÅÍ ¾²±â ¸í·É, P001Àº µ¥ÀÌÅÍ ¾²±âÀÇ ½ÃÀÛ¹øÁö, 06Àº ¾²±â µ¥ÀÌÅÍ °³¼ö ÀÌ´Ù. 101000ÀÇ »óÅ´ P10°ú P12´Â 24º¼Æ®ÀÇ Ãâ·ÂÀ» º¸³»°í ³ª¸ÓÁö´Â 0VÀÇ Ãâ·ÂÀ» º¸³½´Ù. ¿©±â¼ Ãâ·ÂÀº 24V¸¦ ³»º¸³»´Â °ÍÀÌ ¾Æ´Ï¶ó 24V¸¦ Á¢Áö¿¡ ¿¬°áÇÏ´Â ¿ÀÇÂÄ÷ºÅÍ ÀÔ´Ï´Ù. strTemp.Format("%c%02dHP001006%1d%1d%1d%1d%1d%1d%c",0x05, (int)m_nMachinNo.Value,(int)m_Out0.Value,(int)m_Out1.Value, (int)m_Out2.Value,(int)m_Out3.Value,(int)m_Out4.Value,(int)m_Out5.Value, 0x04); |
||||
¿¹½À³»¿ë |
||||
|
||||
½Ç½À¹æ¹ý |
||||
¸ñ Â÷ |
||||
|
||||
Ãâ·Â ½ºÀ§Ä¡ 6°³¸¦ ¾Æ·¡¿Í °°ÀÌ ¸¸µç´Ù. |
|
|||
¾Æ·¡¿Í °°ÀÌ ¸â¹öº¯¼ö¸¦ m_Out0ºÎÅÍ m_Out5¸¦ ÁöÁ¤ÇÑ´Ù. |
|
|||
|
||||
|
Ãâ·Â ½ºÀ§Ä¡¸¦ º¯È ½ÃÅ°¸é °¢ ½ºÀ§Ä¡¸¦ °Ë»çÇÏ¿© Åë½ÅÀ¸·Î °ªÀ» º¸³½´Ù. ½ºÀ§Ä¡¸¦ ¸¶¿ì½º·Î ´õºí Å©¸¯ÇÏ¿© ¡°void CRs232Dlg::OnValueChangedCwboolean9(BOOL Value)¡±¿¡¼ ¡°void CRs232Dlg::OnValueChangedCwboolean14(BOOL Value)¡±±îÁö 6°³ÀÇ ÇÔ¼ö¸¦ ¸¸µé°í ±× ¾È¿¡ ¡°CheckOut();¡±¸¦ ³Ö´Â´Ù. |
|
||
|
CheckOut(); ÇÔ¼ö´Â ½ºÀ§Ä¡ÀÇ »óŸ¦ °Ë»çÇÏ¿© Åë½ÅÀ» º¸³½´Ù. void
CRs232Dlg::CheckOut() { CString
strTemp; strTemp.Format("%c%02dHP001006%1d%1d%1d%1d%1d%1d%c",0x05, (int)m_nMachinNo.Value,(int)m_Out0.Value,(int)m_Out1.Value, (int)m_Out2.Value,(int)m_Out3.Value,(int)m_Out4.Value,(int)m_Out5.Value, 0x04); // P0001 ¿¡¼ºÎÅÍ 6°³ÀÇ Æ÷Æ®·Î 111111 ºñÆ® »óÅ·ΠÃâ·Â m_ComuPort.WriteComm((unsigned
char*)(LPCTSTR)strTemp,strTemp.GetLength()); } void CRs232Dlg::OnValueChangedCwboolean9(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } void CRs232Dlg::OnValueChangedCwboolean10(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } void CRs232Dlg::OnValueChangedCwboolean11(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } void CRs232Dlg::OnValueChangedCwboolean12(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } void CRs232Dlg::OnValueChangedCwboolean13(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } void CRs232Dlg::OnValueChangedCwboolean14(BOOL Value) { // TODO: Add your control notification handler code here CheckOut(); } |
|
||
°ú Á¦ |
||||
|
||||
Áß¿äÇÔ¼ö |
||||
|
||||