Created
November 17, 2020 07:36
-
-
Save nikvoronin/44b46a0bb57a44cce4f83dfa4f3b6e20 to your computer and use it in GitHub Desktop.
GoTwinCAT. Read Variable by Pointer Over ADS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (!Console.KeyAvailable) { | |
var result = await client.ReadValueAsync<ushort>( "MAIN.pState^", CancellationToken.None ); | |
ushort state = result.Succeeded | |
? result.Value | |
: (ushort) 0; | |
Console.Write( $"{(state == 100 ? "*" : "+")}" ); | |
await Task.Delay( 50 ); | |
} | |
Console.WriteLine(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment