Orn Jonsson
Member
Hi partners,
I an using an Automation Direct DL06 with ECOM module to send data to a data logging software called Data Worx.
The data is transmitted via ethernet, and for the setup parameters in the PLC I plug in the Ethernetnet address and IP address of the PC. The problem is that if the network adninistrator chances the IP on the PC, the PLC cant find it and I have to drag out the lap top and update the IP in a hex format in the PLC.
I want to be able to enter the IP in the decimal format 192.168.000.100 (four separate single word fields), on the touch screen and have the Logic convert it to hex. This IP number converts to C0 A8 00 64 hex.
The problem is that the first two bytes of the IP hex code HAVE TO go to one word. And the last two bytes HAVE TO go to another word.
For example V2013 = C0 A8 and V2014 = 00 64
How do I get 192 and 168 converted to hex so both results end up in one word. The BIN instruction converts BCD to HEX but I get stuck with C0 in one word and A8 in another.
Thanks,
OJ
I an using an Automation Direct DL06 with ECOM module to send data to a data logging software called Data Worx.
The data is transmitted via ethernet, and for the setup parameters in the PLC I plug in the Ethernetnet address and IP address of the PC. The problem is that if the network adninistrator chances the IP on the PC, the PLC cant find it and I have to drag out the lap top and update the IP in a hex format in the PLC.
I want to be able to enter the IP in the decimal format 192.168.000.100 (four separate single word fields), on the touch screen and have the Logic convert it to hex. This IP number converts to C0 A8 00 64 hex.
The problem is that the first two bytes of the IP hex code HAVE TO go to one word. And the last two bytes HAVE TO go to another word.
For example V2013 = C0 A8 and V2014 = 00 64
How do I get 192 and 168 converted to hex so both results end up in one word. The BIN instruction converts BCD to HEX but I get stuck with C0 in one word and A8 in another.
Thanks,
OJ