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

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

AND:

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

OR:

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

---| |----'

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×