public static Int32 ConvertRegistersToDouble(int[] registers)
public static Int32 ConvertRegistersToDouble(int[] registers, RegisterOrder registerOrder)
with the second method you can change the Order of the two 16-Bit registers using the enumeration
public enum RegisterOrder { LowHigh = 0, HighLow = 1 };
give both methods an array of 2 16-Bit values
Greetings
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
What is the proper way to read double word values? When I read the registers they don't seem to match what is on the PLC.
Do you mean 32 Bit values?
You can use the static methods
public static Int32 ConvertRegistersToDouble(int[] registers)
public static Int32 ConvertRegistersToDouble(int[] registers, RegisterOrder registerOrder)
with the second method you can change the Order of the two 16-Bit registers using the enumeration
public enum RegisterOrder { LowHigh = 0, HighLow = 1 };
give both methods an array of 2 16-Bit values
Greetings
Stefan