
adccommunitymod (AutomationDirect) asked a question.
Cmp/cmpr
Created Date: August 25,2011
Created By: JoeW
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
After performing a CMP or CMPR instruction on a DL06 PLC, does the value in the accumulator remain the same? Basically, can I do a LD > CMP on one rung, then do a SP60 > OUT on the next, or do I have to SP60 > LD > OUT?
Created Date: August 25,2011
Created by: Adisharr
After performing a CMP or CMPR instruction on a DL06 PLC, does the value in the accumulator remain the same? Basically, can I do a LD> CMP on one rung, then do a SP60> OUT on the next, or do I have to SP60> LD> OUT?
The compare instructions should not alter the contents of the accumulator.
Is there a reason you want to use the CMP instruction rather than the compare contact?
EDIT: I had to look up CMPR - compares two REALs. Looks like that is not possible in a contact compare.
Created Date: August 25,2011
Created by: JoeW
Correct, I am using CMPR. Thanks for the answer.
Created Date: August 25,2011
Created by: Adisharr
Correct, I am using CMPR. Thanks for the answer.
Sure thing Joe..
Created Date: August 25,2011
Created by: JoeW
After performing a CMP or CMPR instruction on a DL06 PLC, does the value in the accumulator remain the same? Basically, can I do a LD> CMP on one rung, then do a SP60> OUT on the next, or do I have to SP60> LD> OUT?