Is there anything inherently wrong with doing latching like this?

What is the purpose of the latching it?

Are there checks of the tag elsewhere in the program or just this rung?

If it's only this rung then the latch is useless.

If it's also other rungs then it will only get unlatched if the latch checks are true to latch it. If any of the conditions to latch go false then you will never unlatch the tag.

I have had to go over other's programs that had a stuck latched bit and add (seriously up to 30) unlatch conditions the original programmer overlooked - power off, E-stop, reset button, cycle advanced, conveyor or turntable advanced, operator manually removed a part - many conditions to unlatch
 
I think the key here is the Result_Data_Strobe.
The Result_Data_Latch will only stay latched if Result_Data_Strobe is false, otherwise it gets unlatched after the COP and MOV happen.
The COP and MOV and unlatch only happen if Result_Data_Strobe is true.

EDIT: This is really poorly written logic, this really should be cleaned up.
 
I don't know exactly what your barcode scanner bits are doing, but I don't see how this would work properly either way.

Are you trying to latch Result_Data_Latch and then wait for Result_Data_Strobe to come back before copying/moving your data? That will definitely not work. It looks like you have an Ethernet/IP barcode scanner. Assuming you do, data is sent to and received from the barcode scanner on a schedule based on the RPI of the device. You will have to wait for at least two updates to/from the barcode scanner before the Result_Data_Strobe could even possibly be on. After the rung executes for the first time, the XIO Result_Data_Latch instruction will make the rung false until something other than this rung unlatches it.

If Result_Data_Strobe is true the first time the rung executes, the copy/move instructions will work. However, in that case Result_Data_Latch will latch and unlatch within a few microseconds. The true value will not be sent to the barcode scanner unless the update to/from the barcode scanner happens to occur during that window.
 
The XIO Result_Data_Latch<SR:O.Data[0].1> is in effect a falling edge detector,
  • that only fires when XIC Result Data Available evaluation also results in a True output rung (<SR:I.Data[0].1> value is 1), and
  • on the scan cycle when it fires it is re-armed if and only if the XIC Result_Data_Strobe evaluation results in a True output rung (<SR:I.Data[0].2> value is 1) on that same scan cycle.
 

Similar Topics

Does the last octet mean anything? Technically the network's address is 0, but why does it give you the option in the first place?
Replies
4
Views
1,588
We had an enclosure unfortunately fill up entirely with water. We had a different components in there, a Dynamix 1444 Module and terminal base...
Replies
10
Views
4,129
I've been looking at Ignition's platform and am impressed with its capabilities. The company that I've just started working at is using Citect...
Replies
2
Views
2,705
I have been using Wonderware for the last five years ACD now at a place where review is mostly used. I would like to edit some pages and add...
Replies
2
Views
1,534
I'm currently working on a FTV project and after putting 600+ hrs into Wonderware applications in the past year I realized two things... 1) I miss...
Replies
61
Views
43,240
Back
Top Bottom