carlkaranja Posted May 28, 2015 Report Share Posted May 28, 2015 hi, am working on a project whereby am using a flow sensor to give me pulses to calculate flow rate. my challege is when the number is too big it goes negative, i think after +32767, what can i do to achive my goal without this number and my program become accurate. please assist anything you need to know let me know. Link to comment Share on other sites More sharing options...
Alexander Posted May 28, 2015 Report Share Posted May 28, 2015 Which controller are you using? If you are using the Jazz or M91 you may be able to use a U90 Special Function to combine two MI's into a ML within the ladder. You can find the instructions in the U90 Help file under Ladder/ Functions/ Special Functions: without Elements/ 'Long' Integer functions. Also possible would be to use a secondary counter to represent large values such as 10,000, 20,000, or 30,000. A comparison statement could be used so that every 10,000 pulses, a secondary counter would increase by 1. Then the count could be reset. This would involve using multiple comparison statements later to compare the numbers, but may work as a solution. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted May 29, 2015 MVP 2023 Report Share Posted May 29, 2015 It would also be helpful if you posted your code. Joe T. Link to comment Share on other sites More sharing options...
carlkaranja Posted July 19, 2015 Author Report Share Posted July 19, 2015 Thanks am working with samba and its doing fine with my projects. 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