Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Analog Comparison for signed integer?
I was trying to use everyone's favorite symbol, Analog Comparison (Full Set), to tell me when an analog signal was either positive, negative, or zero, but then I realized it is treating analogs as unsigned values. Needless to say, I was never getting an indication that the value was negative.
Is there a combination of symbols I could use instead for getting the results I'm looking for? I actually only need to know when the value is >= 0, or < 0. TIA |
Where are you getting the values from, self generated or from a device/feedback? And what is the range of values you're comparing?
toggle quoted message
Show quoted text
--- In Crestron@..., "floyd1212" <floyd1212@...> wrote:
|
my values are generated with an INIT, and can range from -2d to 32d.
toggle quoted message
Show quoted text
I just gave it some more thought, and I'm thinking I can compare my value to 32,768, instead of zero, and when my value is > 32,768 it is "negative", and when it is <= 32,768 it is either "positive" or 0d. Right? --- In Crestron@..., "matt_rasmussen_2000" <mjrtoo@...> wrote:
|
There you go
toggle quoted message
Show quoted text
--- In Crestron@..., "floyd1212" <floyd1212@...> wrote:
|
Although, take a look at the help file, I dont remember if the acomp has a signed/unsigned parameter.
toggle quoted message
Show quoted text
--- In Crestron@..., "floyd1212" <floyd1212@...> wrote:
|
Chip
You could also use an ATOD symbol. Negative numbers are the only ones that have the highest bit set.
toggle quoted message
Show quoted text
- Chip --- In Crestron@..., "floyd1212" <floyd1212@...> wrote:
|
to navigate to use esc to dismiss