Jump to content

Double Word to ML


Recommended Posts

Hello,
 
Thanks for the reply , but if my DW is more than +2,147,483,648 , I can divide it into two MLs ?
 
I am using that in a flow meter in high-speed input , so that the value in the DW is more than +2,147,483,648 .
 
I saw on the high-speed input I can use ML , so I have a doubt whether the value in ML is more than +2,147,483,648 that will rewrite  automaticaly or i need to do a reset on the ML?
 
This is my program:
 
  

DW19

 

Link to comment
Share on other sites

Hello,

 

I am unsure what you mean by "divide it into two MLs".  Are you trying to build a larger integer out of two MLs?  If so, it is not possible to create integers out of two other integers.

 

The range for a DW is 0 to +4,294,967,295.  The range for an ML is -2,147,483,648 to +2,147,483,647.  The largest number the controller can handle in an integer is 4,294,967,295.  Since you are working with pulses from a HSI, the pulses cannot be negative.  So there shouldn't really be a need to use MLs for the HSI. 

 

Hope this helps.

Link to comment
Share on other sites

Typically if you overflow an integer data type it rolls over to it's maximum negative number and counts from there which can cause some pretty weird issues if you haven't accounted for it.

 

 

What is the goal of the high speed counter? What happens with the count when you're done with it, or when it reaches a setpoint?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.