Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: rbelknap on June 05, 2017, 02:26:40 PM

Title: Do-More and Modbus TCP Strings
Post by: rbelknap 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
Title: Re: Do-More and Modbus TCP Strings
Post by: BobO 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.
Title: Re: Do-More and Modbus TCP Strings
Post by: ATU 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.
Title: Re: Do-More and Modbus TCP Strings
Post by: rbelknap 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