compare double words in directsoft

plc noob

Member
Join Date
Oct 2007
Location
atlanta , georgia
Posts
258
guy's

is there a way to use compare statements in directsoft 5.2 on doulble word bcd numbers . i have been using some of the double word math instructions . but all the compare instructions seem to be single word bcd . i am i missing something . is there another method to compare double word numbers ?
 
The CMPD instruction provides this. It is an output box instruction. On execution it affects SP60, SP61, SP62 according to the results of the compare. These system bits must be used before any other instruction which may affect them. I copy the state of the relevant bits to another 'C' bit.
 
plc noob,

Use the compare double instruction page 5-82 in the manual
comparedouble1.jpg

.
 
bernie_carlton said:
The CMPD instruction provides this. It is an output box instruction. On execution it affects SP60, SP61, SP62 according to the results of the compare. These system bits must be used before any other instruction which may affect them. I copy the state of the relevant bits to another 'C' bit.


I just did this last night in a program.

One other part of the instruction. You have to load one of your double words into to the accumlator stack then used the CMPD for the other double word. So basically your code looks something like this:


---------------------|--LDD v2000
|--CMPD v2002


-[sp62]--------------(out c0)


Well this is how mine looked anayway.
 

Similar Topics

Help please. Im new to Omron and have a machine down. I have a compare = for barcode label scan. I've attached two pics. On the Mnemonics you can...
Replies
4
Views
623
Hi everyone! Accidentally closed it and it wont appear again. Checked and unchecked the option and seem to make no difference. Running v7.10.00...
Replies
16
Views
1,911
I'm working on an array that contains a UDT of 5 Items Array[4] DataType[0] - Part 1 - Part 2 - Part 3 - Part 4...
Replies
1
Views
843
Hi. I have 2 files where I would like to see the ladder logic differences (similar to the Rockwell compare function). I am using TISoft Siemens...
Replies
1
Views
1,265
Hello experts, I am just starting with AB programing, I have a questions regarding a compare done in an old RSlogix500 and causing me issues when...
Replies
5
Views
1,939
Back
Top Bottom