Hello,
I have a VM167 connected with USB to my computer.
I use the sample delphi program.
In my program i want to see a counter (leds) to see on the screen.
Whenever i click a VM130T, my program needs to add one to the counter (a system in the food branck “WE SERVE NR°”)
With te right klik i do the counter - 1. So i use
in timer event…
i:=ReadAllDigital(CardAddress);
CheckBox1.checked:=(i and 1)>0;
if CheckBox1.checked = false then
begin
if OldCounter1 <> ReadCounter(CardAddress) then
begin
if frmSlideshow.VrCounter1.value = 99 then
frmSlideshow.VrCounter1.value := 1
else
frmSlideshow.VrCounter1.Value := frmSlideshow.VrCounter1.Value + 1;
OldCounter1 := ReadCounter(CardAddress);
end;
end;
CheckBox2.checked:=(i and 2)>0;
if CheckBox2.checked = false then
begin
if OldCounter2 <> ReadCounter(CardAddress) then
begin
if frmSlideshow.VrCounter1.value > 0 then
frmSlideshow.VrCounter1.value := frmSlideshow.VrCounter1.value - 1;
OldCounter2 := ReadCounter(CardAddress);
end;
end;
The problem is that the reaction takes to long…i have been playing with the timer interval but stiil no good result. It works but not fast enough. Any idea how it can work faster?