Welcome to Easyiew.kr

Q&A

¼ÒÇÁÆ®¿þ¾î
Çϵå¿þ¾î
¹®Àǵ帳´Ï´Ù.
±Û¾´ÀÌ tjdandydtk
³¯Â¥ 2022-11-04 09:39:26
Á¶È¸¼ö 907

plc ÄÄÆÄÀÏÅ×Å©³î·ÎÁö »ç¿ë ÁßÀÔ´Ï´Ù.

¿Âµµ Á¦¾î¸¦ ÇÏ·Á°í Çϴµ¥ 

¸ðµâ 1°³´ç 4ä³Î ÃÑ 8¸ðµâ »ç¿ëÁßÀÔ´Ï´Ù. (ÃÑ 32°³)

¼³Á¤°ª¿¡ µµ´ÞÇÏ¸é ¿öµå·¥ÇÁ LW, 14, 1 ¾Ë¶÷ÀÌ ¿À°Ô²û ¼³Á¤Çصξú´Âµ¥

32°³¸¦ ¹­¾î¼­ ¸ÅÅ©·Î ÁöÁ¤À» ÇÏ´Ï ¾Ë¶÷ÀÌ ´Ù½Ã ¶Ç ¾ÈµÇ³×¿ä

ÀÚ¹® Á» ºÎŹ µå¸®°Ú½À´Ï´Ù °¨»çÇÕ´Ï´Ù.

=============================================================
macro_command main()

short re1, la1, alarm, re2, la2

GetData(re1, "Local HMI", LW, 11, 1) // HMI µ¥ÀÌÅÍ Àбâ
GetData(la1, "Local HMI", LW, 1000, 1) // HMI µ¥ÀÌÅÍ Àбâ

if re1 < 0 and la1 < 0 then

re1 * -1 == re2
la1 * -1 == la2

end if

if re2 >= la2 then

alarm = 1

SetData(alarm, "Local HMI", LW, 14, 1)

else if re2 < la2 then

alarm = 0

SetData(alarm, "Local HMI", LW, 14, 1)

end if


if re1 <= la1 then

alarm = 1

SetData(alarm, "Local HMI", LW, 14, 1)

else if re1 > la1 then

alarm = 0

SetData(alarm, "Local HMI", LW, 14, 1)

end if

end macro_command
tjdandydtk ¾Ë¶÷ > ·¥ÇÁon À¸·Î ÀÌÇغÎŹµå¸®°Ú½À´Ï´Ù °¨»çÇÕ´Ï´Ù 
[2022-11-04 10:09:21]