KA 합산 값을 1000 배하여 Indicator 로 전송

This commit is contained in:
shark219-hub
2024-11-28 17:31:14 +09:00
parent 1ff549ed75
commit c4319f52d0
6 changed files with 27 additions and 42 deletions

View File

@@ -37,6 +37,13 @@ namespace vmsnet
return WriteValue(buffer);
}
UInt16[] splitI32(Int32 value)
{
var hValue = (UInt16)(value >> 16);
var lValue = (UInt16)(value & 0xFFFF);
return new ushort[] { hValue, lValue };
}
public bool WriteValue(UInt16[] values)
{
if (IsOpen == false)
@@ -49,6 +56,7 @@ namespace vmsnet
ErrorMessage = "모드버스가 초기화 되지 않았습니다";
return false;
}
try
{
master.WriteMultipleRegisters(this.SlaveID, 0, values);
@@ -61,12 +69,5 @@ namespace vmsnet
}
}
UInt16[] splitI32(Int32 value)
{
var hValue = (UInt16)(value >> 16);
var lValue = (UInt16)(value & 0xFFFF);
return new ushort[] { hValue, lValue };
}
}
}