rossmann-engineering / EasyModbusTCP.NET

Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
922 stars 396 forks source link

Question ConvertIntToTwoRegisters #80

Closed Markus1970 closed 2 years ago

Markus1970 commented 2 years ago

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

Markus1970 commented 2 years ago

found the Problem :-)