question

Antonio GA2 avatar image
1 Like"
Antonio GA2 asked Joshua S commented

What do these data mean or do they refer to?

Create a server to receive flexsim model values and throw this data to me:

1 ===> It's the value that I wrote as an onCover event

0 ===> I do not know if it's because it refers to it using the modbus protocol

6 ===> I think he writes a simple record (16-bits)

-251 ===> I do not know if it refers to byte size

4 ===> It's the registration number

-256 ===> I do not know what it refers to either

My question is ... If I am correct or what does each of the data mean?

FlexSim 18.2.2
emulationmodbustcpcoli
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joshua S avatar image Joshua S commented ·

When you say it is throwing data at you, is it sending all of this in hex, or line by line? What are you using to capture the data?

0 Likes 0 ·
Antonio GA2 avatar image Antonio GA2 Joshua S commented ·

@Joshua S,

Line by line in java

0 Likes 0 ·

1 Answer

Joshua S avatar image
1 Like"
Joshua S answered Joshua S commented

Modbus protocol has a set of rules for what it does with the information given to it. You are actually missing several 0s which are important to reading the instructions sent to and from a PLC. Before you converted it, the hex format would read as follows

"\x00\x01\x00\x00\x00\x06\xff\x05\x00\x04\xff\x00"

You'll have to look up Modus protocol on what each chunk of bytes does.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Antonio GA2 avatar image Antonio GA2 commented ·

I send him a video, to see how he works

And yes, I already found the modbus tables when it is big-endian and little-endian

video.rar

I perform my tests, changing data and it's like detrining some relationships

0 Likes 0 ·
video.rar (1.2 MiB)
Joshua S avatar image Joshua S Antonio GA2 commented ·

I would suggest downloading a modbus library that you can run your outputs through, trying to figure out what it is doing hex by hex is going to be tedious work.

0 Likes 0 ·