guoke1225 Posted January 31, 2019 Posted January 31, 2019 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.
Omron Forums Support Posted April 10, 2019 Posted April 10, 2019 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->X:$10780,16 M2->Y:$10780,16 M1 = 16527 M2 = 18350 I set up Modbus with FC16, Modbus Ref#0, PMAC Ref#0, Count length 2. Then, on the Server: M1->F:$10780 M1=1.0099999905 PMAC reads in using big endian format, so maybe you need to either convert to big endian or rearrange the byte assignments in PMAC.
Recommended Posts