mirror of
https://github.com/OpenLogics/MewtocolNet.git
synced 2025-12-06 03:01:24 +00:00
Fixed issues with bitwise decoding not working correctly
- refactored bitwise register assign methods - counted up version number
This commit is contained in:
@@ -30,9 +30,9 @@ namespace Examples {
|
||||
//reading a value from the register collection
|
||||
Console.WriteLine($"BitValue is: {registers.BitValue}");
|
||||
|
||||
interf.GetRegister(nameof(registers.TestInt16)).PropertyChanged += (s, e) => {
|
||||
interf.GetRegister(nameof(registers.TestBool1)).PropertyChanged += (s, e) => {
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine(interf.GetRegister(nameof(registers.TestInt16)).StringValue);
|
||||
Console.WriteLine(interf.GetRegister(nameof(registers.TestBool1)).StringValue);
|
||||
Console.ResetColor();
|
||||
};
|
||||
|
||||
@@ -44,9 +44,6 @@ namespace Examples {
|
||||
|
||||
await Task.Delay(2000);
|
||||
|
||||
//inverts the boolean register
|
||||
await interf.SetRegisterAsync(nameof(registers.TestBool1), !registers.TestBool1);
|
||||
|
||||
Console.WriteLine("Testregister was toggled");
|
||||
|
||||
//adds 10 each time the plc connects to the PLCs INT regíster
|
||||
|
||||
Reference in New Issue
Block a user