in sigma studio, is there a way of flagging a negative number?
I need an output if the number is negative so I can encode it.
Your process may slightly vary depending on what chip you're using and your signal flow, but here's one way this could be accomplished:
What's happening in this schematic is that the "ABCD 1" block is comparing the input signal to the absolute value of the input signal. If the input signal is positive, these values will be equal, and the block will output a "1" (from Switch 1). If the values are different, it means the signal is negative, and will output a "0" (from Switch1_2). This value is written to GPO1 to be used as a flag.
Thanks this is good, will try it in the morning
Retrieving data ...