Commit 59eeb4d9 authored by Claes Sjofors's avatar Claes Sjofors

Modbus TCP bugfix for Ai channels with representation UInt16

parent 405cb332
......@@ -281,7 +281,7 @@ void io_card_read(
case pwr_eDataRepEnum_UInt16:
memcpy(&udata16, input_area + cp->offset + chanp->offset, 2);
if (byte_order == pwr_eByteOrderingEnum_BigEndian) data16 = swap16(udata16);
if (byte_order == pwr_eByteOrderingEnum_BigEndian) udata16 = swap16(udata16);
f_raw = (float) udata16;
sig_ai->RawValue = udata16;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment