Jump to content

Bits to Numeric example


Recommended Posts

I have several MB types that I need to convert to MI types before I can use them in a logic "OR" function.

An example of one:

I need to convert my MB111 (set =1 / reset =0 type)   this is my MB  " A" input into the "AND" function block

Looks like the converted MB111 will  reside at my newly  assigned, lets say MI222 location  - "B" input of the "AND" function block

I dont understand the "C" input assignment and how to set it.    My span of numbers are 0 to 1 only.

 

BIT->NUM: B (Destination)         <  what should this look like?  do I erase  (Destination) ?

BIT->NUM: C (Length)                    <  what should this look like?  do I erase  (Length) ?

Thanks!

Link to comment
Share on other sites

On 2/26/2023 at 5:30 AM, RickL said:

I have several MB types that I need to convert to MI types before I can use them in a logic "OR" function.

An example of one:

I need to convert my MB111 (set =1 / reset =0 type)   this is my MB  " A" input into the "AND" function block

Looks like the converted MB111 will  reside at my newly  assigned, lets say MI222 location  - "B" input of the "AND" function block

I dont understand the "C" input assignment and how to set it.    My span of numbers are 0 to 1 only.

 

BIT->NUM: B (Destination)         <  what should this look like?  do I erase  (Destination) ?

BIT->NUM: C (Length)                    <  what should this look like?  do I erase  (Length) ?

Thanks!

You don't need to do conversions; logic functions are not intended to be used on BOOLEAN values those functions are for INTEGER values.

 

in the ladder logic you already are working with logic functions already.

AND:

 -----| |---| | ------(   )

OR:

---| |----.----------(   )

---| |----'

 

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.