Unlatching Bis

mwatkins

Member
Join Date
Jun 2002
Posts
73
Quick question for you. In an Allen-Brdley SLC500 system can you unlatch a bit by setting the file to zero.
For example MOV 0 to N7:3. Would this unlatch say N7:3/1.
Or can you only do this using the Unlatch bit.
Thanks
 
Writing to the data table is writing to the data table.

Both methods work. So does CLR N7:3. Also FFL 0 #N7:3 1. If you want to unlatch only N7:3/1, but leave N7:3/0 alone, you could use a Masked Move, MVM 0 0002h N7:3.

But keep in mind that these sorts of games can be a bear to troubleshoot. A Search and a Crossreference will only look for the bit address, and not necessarily reveal that you are also manipulating the bit via the whole word.

It's not necessarily bad to use this technique, but please, please, please be consistant throughout the program, so that once someone understands that this is what you are doing, they can follow it everywhere.

And have good reasons for doing it.

And annotate the heck out of it.

And keep the logic that sets and resets the bit together, if you can.

Otherwise, your name will be cursed by whomever follows you. (I'm dealing with a program written badly (this is just ONE of the ways), and if curses worked, he would be suffering as much as I am.
 
Thanks for the help Allen. And yes I will document the program.
I am also cursing the programmer of this project I am working on.
:D
 

Similar Topics

I'd like to get some feedback on the use of latching/unlatching relays. (Something I've never used in my limited programming experience.) I've...
Replies
15
Views
4,814
I am looking at some AB RSLogix5000 controllogix code. A very simplified sample of code written within the same ladder...
Replies
14
Views
2,940
Hello everyone. I'm new to TwinCat 2 and was wondering if someone can tell me the AB equivalent of a TwinCat Latch and Unlatch? Also, is the...
Replies
5
Views
2,314
Hello again, everyone. Could anyone help me understand the best way to handle state transitions in ladder logic programs with Studio 5000? I...
Replies
9
Views
3,193
Nubee question on latching and unlatching relays I have a customer with a Data center configured like below: What I am trying to do is: If...
Replies
1
Views
2,781
Back
Top Bottom