hier nochmal:
[highlight=epc]
SB_Status=0b01
SB_power = $$
SBData=$$
SBServerIP=0u32
SBServerPort=0u16
if cycle(00,15) then SB_Status= 1b01 endif
if SB_Status == EIN then connecttcp(9090u16, 192.168.178.22) endif
if after(SB_Status, 1000u64)== EIN then sendtcp(9090u16, 192.168.178.22,$00:04:20:27:42:70 power ?$); SB_Status = AUS endif
if event(readtcp(SBServerPort, SBServerIP, SBData)) and SBServerIP == 192.168.178.22 then SB_power=split(SBData,34u16,35u16)endif
SB_Power=convert(SB_power,0b01)
[/highlight]
Gruß Martin
[highlight=epc]
SB_Status=0b01
SB_power = $$
SBData=$$
SBServerIP=0u32
SBServerPort=0u16
if cycle(00,15) then SB_Status= 1b01 endif
if SB_Status == EIN then connecttcp(9090u16, 192.168.178.22) endif
if after(SB_Status, 1000u64)== EIN then sendtcp(9090u16, 192.168.178.22,$00:04:20:27:42:70 power ?$); SB_Status = AUS endif
if event(readtcp(SBServerPort, SBServerIP, SBData)) and SBServerIP == 192.168.178.22 then SB_power=split(SBData,34u16,35u16)endif
SB_Power=convert(SB_power,0b01)
[/highlight]
Gruß Martin
Kommentar