06-10-2015 01:35 AM
Hi,
how do i identify sign ploarity of a channel? i need it because if sign is negative i have to multiply it with -1 before plotting.
Please help me on this?
Thanks,
Sunil Padikar M
06-12-2015 08:53 AM
Hi sunil,
This could depend on the shape of your data channel. Often if your polarity is negative, then the channel's minimum will have a greater absolute value than the channel's maximum, like this:
Set Channel = Data.Root.ChannelGroups(1).Channels("Speed") IF Abs(CMin(Channel)) > Abs(CMax(Channel)) THEN Call ChnLinScale(Channel, Channel, -1, 0) END IF
Another approach that is sometimes appropriate is to just take the absolute value of the whole channel, like this:
Set Channel = Data.Root.ChannelGroups(1).Channels("Speed") Call Calculate("RawCh = Abs(RawCh)", Array("RawCh"), Array(Channel))
Brad Turpin
DIAdem Product Support Engineer
National Instruments