# 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!

##### Share on other sites

Is it an explanation in Help:

Of course, Output result is changed in accordance to operation and inputs conditions.

Do it in Ladder to see how it works.

##### 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.

AND:

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

OR:

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

---| |----'

## Create an account

Register a new account

×