Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

InitialCount on cwcounter

HI,
 
I have a apps (in delphi with the ocx support for the ni card)  that initialise the cwcounter and work well until that i try to start at a specific number:
 
   cwcounter1.InitialCount := 445;
   cwcounter1.configure;
   cwcounter1.start;
 
But when i read the counter:
 
   CWCounter1.ReadCounter(cnt,overflow);
   edit2.text := inttostr(cnt);
 
 
I always have 0 instead of the value that i put.
 
 
Thanks,
 


 
0 Kudos
Message 1 of 4
(3,647 Views)
I miss to let you know that i use delphi 7 and it's a pci-6602 card and i must have componentworks 6.7 or 6.9.
 
thansk
0 Kudos
Message 2 of 4
(3,647 Views)

Hi BoumSenior,

What happens if you set the initial count after you do the configure?  That code would be:

cwcounter1.configure;
cwcounter1.InitialCount := 445;
cwcounter1.start;

Does that make a difference?

-Justin M.

0 Kudos
Message 3 of 4
(3,624 Views)

Still does the same things, I resolve this with a internal variable in my pgm, and do the calculate internaly instead.

 

 

Thanks,

 

 

0 Kudos
Message 4 of 4
(3,618 Views)