Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difficulty in understanding PLC 5 Logic

Status
Not open for further replies.

gsjhand

Electrical
Joined
Jul 17, 2007
Messages
34
Location
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
 
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.

Part and Inventory Search

Sponsor

Back
Top