News:

  • June 26, 2026, 05:50:23 AM

Login with username, password and session length

Author Topic: Do-More and Modbus TCP Strings  (Read 6946 times)

rbelknap

  • Newbie
  • *
  • Posts: 4
Do-More and Modbus TCP Strings
« on: June 05, 2017, 02:26:40 PM »
I'm looking to use a (2) Do-More processors in a build and need to be able to send ASCII strings to them from AdvancedHMI, mainly model/serial numbers.

My original plan was to use Modbus TCP, but in looking at the manuals I don't see a way to send ASCII strings to the Do-More(s).

Am I seeing this wrong?  or will it just work.

I have the hardware already, but haven't had a chance to hook anything up yet.

Is my only other option to go through the serial port?

Thanks

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Do-More and Modbus TCP Strings
« Reply #1 on: June 05, 2017, 02:32:38 PM »
Do-more can easily move string data from MIR/MHR memory to Do-more strings using the STRPUTB instruction. If byte/word ordering is a problem, use SWAPB to fix before STRPUTB.
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Do-More and Modbus TCP Strings
« Reply #2 on: June 05, 2017, 09:40:47 PM »
There is no real standard for sending strings via Modbus TCP.  The packing varies with the device and can be done many different ways. Best thing to do is to just send the string down to the Domore and then examine the ascii values using the data viewer. Once you see how its packed, use the plethora of data and string manipulation instructions to parse values into a string in the Domore. You might even get lucky and not have to do anything. Check your HMI also, there maybe options on how strings are stored.

rbelknap

  • Newbie
  • *
  • Posts: 4
Re: Do-More and Modbus TCP Strings
« Reply #3 on: June 06, 2017, 09:59:55 AM »
Guys,

This worked well.  And BobO, you were correct I did need to Swap bytes.

Thanks for the help.

Rich