1
Technical support / Is this possible??
« on: December 31, 2010, 07:24:30 PM »
If we setup a HSC using the HSCDEF statement and then the counter trips the function associated with it in the HSCDEF statement. Then through some sort of movement in an encoder it decrements the counter and then increments back to the set point that trips the function again and again and again. If this occurs at such a rate could a recursive type action occur in the calling of the function associated with the HSCDEF statement? For example:
HSCDEF 1,1,1000
// when the counter hits 1000 it trips function 1
// the counter dithers around a difference of one count down
// and up and fires function 1 again before the first function
// finishes, what would keep this from happening over and over // at high speed, thus causing a recursion of some sort?
Function 1:
OUTPUT[1]=0
REFRESH
P.S. Does the refresh statement take precedence in execution over the updating of the HSC? Thus a missing of counts while the refresh occurs?
Thanks again, great product and may the new year bring even more success to your company.
HSCDEF 1,1,1000
// when the counter hits 1000 it trips function 1
// the counter dithers around a difference of one count down
// and up and fires function 1 again before the first function
// finishes, what would keep this from happening over and over // at high speed, thus causing a recursion of some sort?
Function 1:
OUTPUT[1]=0
REFRESH
P.S. Does the refresh statement take precedence in execution over the updating of the HSC? Thus a missing of counts while the refresh occurs?
Thanks again, great product and may the new year bring even more success to your company.