Host Engineering Forum

General Category => CTRIO and CTRIO2 => Topic started by: ERokc on November 02, 2014, 11:44:49 PM

Title: Restarting the counter and preset table.
Post by: ERokc on November 02, 2014, 11:44:49 PM
I need to reset the counter and load a preset table to produce an output on corresponding count values.
Prior to completion of the preset table I need to reset the counter and start the table over.

Do I need to clear the table and reload it when the counter gets cleared?

If I load a table without clearing first will it load over the old one?
Title: Re: Restarting the counter and preset table.
Post by: BobO on November 03, 2014, 10:13:11 AM
Do I need to clear the table and reload it when the counter gets cleared?

No. Resetting the counter also resets the table.

If I load a table without clearing first will it load over the old one?

Yes.
Title: Re: Restarting the counter and preset table.
Post by: ERokc on November 03, 2014, 09:49:30 PM
That's the answer I wanted.  I simply want to reset the counter and start the same table again.

Thanks
Title: Re: Restarting the counter and preset table.
Post by: ERokc on November 04, 2014, 12:59:40 PM
I'm writing my instructions and realize the photo sensors detecting an edge are offset from the datum.  I need to set the counter to 750, not zero.  That I can do but how do I reset the preset table that's loaded?  Load it again or is there a table reset function?
 
Title: Re: Restarting the counter and preset table.
Post by: BobO on November 04, 2014, 03:11:19 PM
The table is reset by the counter being reset. Just use CTREGWR to update the counter with the desired reset value, then reset the counter however you normally do.