rossmann-engineering/EasyModbusTCP.NET

Question ConvertIntToTwoRegisters

Markus1970 opened this issue · 1 comments

Hi All,
I am a complete newbie in .NET. Currently I am working through the example code. The definition of a server process and client writes into single registers are working so far. One problem is that i have a int32 wich needs to be converted into two registers.
I found in the .Net Clients methods that there is an methode existing which sounds very useful for that problem.
"public static int[] ConvertIntToTwoRegisters(Int32 intValue)".
I have tried following:
modbusClient.WriteMultipleRegisters(4, modbusClient.ConvertIntToTwoRegisters(MyINT32value));
Well thats not corrrect, I know.

Is it possible to get an example on how I can use the exitsing convert methods in my code?

Many thanks
Markus

found the Problem :-)