hysteresis between two rctime inputs.
yuright
Posts: 13
I am brand new to Basic Stamp. I am working with a BS2 and am trying to duplicate an analog device I built recently. It uses two pots, a command and a feedback which input to a comparator. It controls two outputs which both go high when inputs are equal. If the inputs are not equal one or the other output will be low etc. I have tried to write a program that will do this. It seems to work except for the last block where I want both outputs the same when inputs are equal. I am using rctime for the inputs. Due to the small variations in the rctime values the outputs flipflop How can I write in the necessary hysteresis to allow both outputs to be the same over a range of input values.
I did take the time to look for an answer in previous posts but was unable to find anything that applied to what I am trying to do. Again I am new to programming language and probably wouldn't have recognized an answer to my question if it were in front of me. I will attach a screenshot of the file. Thanks
I did take the time to look for an answer in previous posts but was unable to find anything that applied to what I am trying to do. Again I am new to programming language and probably wouldn't have recognized an answer to my question if it were in front of me. I will attach a screenshot of the file. Thanks
Comments
IF comtime > feedtime -60 AND comtime < feedtime +60 THEN
HIGH fwd
HIGH rvrs
ENDIF