Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Difficulty in understanding PLC 5 Logic

Status
Not open for further replies.

gsjhand

Electrical
Jul 17, 2007
34
0
0
CA
Hello Everybody
I am having difficulty in understanding a logic in PLC 5 and I have attached print outs for the same. Data files D56:15 and D56:16/0 to D56:/3 is triggering outputs O: 014 and O: 015. These outputs are used to transfer set points or other parameter values to a servo controller and according to my understanding it works on BCD coding. I am having difficulty in understanding what we are trying to do in rung 37 and why? In second AND function why “Source B” is having “-16” as value? Displayed value of file N7:32 is in Hex. or in Dec. and why we are dividing it with 16, it says it is bit shift right but how it is shifting?
I would greatly appreciate if somebody can explain these steps in detail.
Thanks
 
Replies continue below

Recommended for you

The data is made up of 16 bits, the AND instructions is transferring the low 4 bits (a number between 0-15) into D56:16 and then transfers the high 12 bits into N7:32, which I imagine is just a temporary storage.

The final divide by 16, is simply shifting the bits to the right before storing them in D56:15.

So the original data contained 2 numbers in the 16 bits.

bits 1-4 = 1st number
bits 5-16 = 2nd number
 
Status
Not open for further replies.
Back
Top