Fixed issues with bitwise decoding not working correctly

- refactored bitwise register assign methods
- counted up version number
This commit is contained in:
Felix Weiß
2022-06-22 15:58:24 +02:00
parent 8f9e66d5d3
commit 4c719843f2
10 changed files with 253 additions and 120 deletions

View File

@@ -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