News:

  • August 27, 2026, 10:14:47 AM

Login with username, password and session length

Author Topic: EIPMSG instruction  (Read 6492 times)

JRB

  • Newbie
  • *
  • Posts: 4
EIPMSG instruction
« on: September 29, 2018, 06:59:23 PM »
I have been able to get the EIPMSG instruction working to read and write parameters when using a fixed IP address in the message setup. I need to have the instruction set up so I can change the IP address dynamically from a touchscreen entry, and I haven't been able to figure out how to get the variable IP address part of the instruction working. If I try to use the default D0 address, I don't know how to put an IP address like 169.254.93.16 in that address. I tried breaking it up into 4 sets of hexadecimal numbers (A9FE5D10), but that exceeds the range of the D0 memory location. What am I missing?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6174
  • Yes Pinky, Do-more will control the world!
Re: EIPMSG instruction
« Reply #1 on: September 29, 2018, 07:14:53 PM »
D memory is 32 bits, as are IP V4 addresses. Each byte of the D location contains one digit of the IP address. There are several ways to do this, but the easiest to explain is probably to use casting. If you are using D0, the cast to access each byte is D0:B0, D0:B1, D0:B2, D0:B3. I used the INI instruction to plug the individual bytes of D0, and then displayed it as an IP address in the data view.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

JRB

  • Newbie
  • *
  • Posts: 4
Re: EIPMSG instruction
« Reply #2 on: September 29, 2018, 07:35:39 PM »
Thank you. That got the variable IP setup working for me, and gives me a good starting point for what I am trying to do. I'm still pretty new to using the Do-More BRX, but I like what I see.