Compare Dint to Obtain a Bool Indicating a Change on value

waterbottle

Member
Join Date
Mar 2019
Location
Florida
Posts
42
Hello guys hope y’all healthy during this time,

Im looking for help in a project im trying to finish. I need to get a bool (ote) when a dint value has change from previous value.

I have a counter for rejection from one machine to the other. The machine dont share anything other than the total number of rejects. Im looking to add a bit of logic for my project but need an idea how to accomplish the OTE every time the Dint value increases.


Rslogix 5000
 
Does RSLogix 5000 support the DTR (data transition instruction)?

If not, you can make the same thing with a NEQ comparing the new data to the old data, and then MOV the new data to the old data immediately afterward, setting your OTE bit true along the way.

The DTR is one of the only instructions I know of that has a rung out condition AND modifies one of its data sources. If available, it can save you a branch and a MOV.
 
Use a NEQ comparing current value to previous value. Then MOV current value to previous value. Then place an OTE directly after. This output will only be high for once scan.
 
NEQ DINT StorageDINT OTE ChangedBit
MOV DINT StorageDINT
ChangedBit will be true for one program scan

Edit - Beat me to it…
 

Similar Topics

Good Afternoon , I'm working on a Shift Register , and I have a Tag called .... Tracking Vision Result Tag Data Type - DINT [313] I'm...
Replies
5
Views
2,115
All, We have a 6 lane conveyor to carry bars and at the end we have a pick and place which picks up the bars if a sensor detects it. For all 6...
Replies
0
Views
2,211
Hello all, I have been trying to come up with a solution for the following application and I am drawing a blank. Compactlogix v20 I am using a...
Replies
7
Views
3,693
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
626
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,918
Back
Top Bottom