farcry Posted November 8, 2021 Report Share Posted November 8, 2021 Hello. I have a problem. I'm communicating with MOXA ioLogik from whom I read RAW value of Analog Input. The RAW value is in range from 0 - 65535. The calculated value should be from 0 - 500. If I use Linearization FB I've got wrong number with numbers over 32676 (Signed Negative) The PLC always assumes that it is calculating with SIGNED INTEGERS. How can I overcome this problem? Thanks. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted November 8, 2021 MVP 2023 Report Share Posted November 8, 2021 It looks like you're using 16-bit integers (MIs) and are overflowing the register. Use 32-bit integers instead (MLs). Link to comment Share on other sites More sharing options...
farcry Posted November 9, 2021 Author Report Share Posted November 9, 2021 Thanks for answer but this is not the case. Sollution: Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted November 9, 2021 MVP 2023 Report Share Posted November 9, 2021 farcry, firstly just a FYI....you don't need SB1. To really make sense of what you're saying, we need a scrnshot of the Linear parameters that didn't work. cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted November 9, 2021 MVP 2023 Report Share Posted November 9, 2021 Do a STORE from the incoming MI to an ML and then Vector Copy from the ML to a DW to blow the sign bit out. Joe T. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now