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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted November 8, 2021 MVP 2022 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). Quote 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: Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted November 9, 2021 MVP 2022 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 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted November 9, 2021 MVP 2022 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.