What is the right Procedure call to read the Encoder status?
Trying to activate 2 lights depending on the encoder status.
Thanks!
Ferry
What is the right Procedure call to read the Encoder status?
Trying to activate 2 lights depending on the encoder status.
Thanks!
Ferry
Hi Ferry,
as i know it doesn’t exist a procedure for the request. But you can find some examples in the board how to realize a time based query of the encoder state.
Here is an example from Torben, i guess:
[code]procedure OnLoad;
begin
EnableTimer(1000);
end;
procedure OnTimer;
begin
if Encoder.GetConnections.GetItem(0).GetState = ecsConnected then
begin
…
end
else
begin
…
end;
end;
begin
end.[/code]
the source you can find here. they discussed and improved the script to handle more than one encoder for example.
Thanks Lord_Femto
Got it running, I did not used the OnTimer procedure so id did not work before.
Regards,
Ferry