Modbus TCP i64?

As far as I know, the current version of Modbus Int kit does not support i64 comms.

Has anyone come up with a mod for that?

Edit: Even easier, use the built-in command: MakeInt64

You could combine the upper 32 bits and the lower 32 bits like follows:

n64High = nHigh;
n64Combined = (n64High << 32);
n64Combined = n64Combined + (0x00000000FFFFFFFFi64 bitand nLow);

Where nHigh is the upper 32 bits and nLow is the lower 32. Put it in a subroutine if you like.

1 Like

Hey Phil. Well I wasn’t feeling adventurous although what you described had crossed my mind, but had not put any real thought into it. Figured I’d check if it was already done first and these things are rarely as simply as it might seem…
I’ll do some testing today and see if I can confirm the accuracy of it. I guess my next question is should I get the registers as i32 or as i16? All the Kollmorgen registers are i16 so the i64 is stored as 4 - i16.

I would read them as 2 32 bit so it is less work to combine.