Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modbus TCPIP communication with UMAC
I build up Modbus TCPIP communication with UMAC successfully, for the coil and discrete read/write , it is worked normally. and for the registers read/write, it seems that only 16-bit registers can worked normally. because of bit 16 to 23 for X:memory and Y:memory are not used, if I define a register which bits is larger than 23 bits, the data received is wrong. and if I define a register which is a float type value, It can't receive data.
M2040->L:$107A4 //pointer to 48 bits value.
M2041->F:$107A5 //pointer to float type value.

so is there any solutions to avoid this issue? read/write values which bits is larger than 23 bits, and read/write float values correctly.
Hopefully this is better late than never.

Using 2 UMACs, one as client and one as server, I am able to receive float data that is sent in IEEE 32 bit float format. For instance, 00111111100000010100011110101110 is roughly 1.01. I broke that into two Modbus registers and converted into decimal:
0011111110000001 = 16527
0100011110101110 = 18350
M1 = 16527
M2 = 18350
I set up Modbus with FC16, Modbus Ref#0, PMAC Ref#0, Count length 2.

Then, on the Server:

PMAC reads in using big endian format, so maybe you need to either convert to big endian or rearrange the byte assignments in PMAC.

Forum Jump:

Users browsing this thread: 1 Guest(s)