Setting a single bit in a Integer file

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi all,
I have an application where the plant PLC is communicating via Ethernet/IP to 3 different field PLC's. The Field PLC's are all Micrologix 1100.

On every scan of the plant PLC it will write a 1 into N11:0/9. That bit is a run permissive to the field PLC's. We recently had a issue where the communications when down. With no communications the last value was held in the file and the unit kept running.

They want me to reset the bit every 10 seconds so that if the communications goes down again the machine wont just keep running. I only want to reset that bit and not the whole word. There are other bits in that word that can cause shut down if set to 0.

To do this would I have done a Masked Move with a blank word as the source, a mask of 0000000001000000 or 40H or 64 Dec. Is this the best was to do this? Is there better ways of doing this.

I didn't write the original code. I am just tasked with making it work. Changing the plant PLC code is possible but I would prefer to make all the changes in the field PLC's. Less political BS that way.

Let me know your thoughts.
 
I just looked at the program again and I was mistaken. The file is N11:9/0 and there are no other bits used in that word. So I can just clear the word without affecting anything else.

I am still interested in knowing the answer to my original question. So if any of you guys have any comments let me know.

Thanks everyone!!
 
Hi

A mask move would work or you could just make it easy for the next guy and use two timers. 1 if it's on for ten seconds and 2 if it's off for ten seconds, either timer gets done flag your alarm

Donnchadh
 
Thanks everyone. I was wondering about unlatching the bit but since it was not originally latched I didn't think the unlatch would work. That is a great idea!!
 
Thanks everyone. I was wondering about unlatching the bit but since it was not originally latched I didn't think the unlatch would work. That is a great idea!!

You are making the basic mistake of confusing what the bit is, and what you can do with it... the bit is neither a ltach or unlatch bit, it is simply a data storage location, 1 or 0

OTE OTL and OTU are just instructions that act upon that data-storage location, which can not be a "latched-bit", or an "un-latched" bit etc.

FYI ...

OTE writes a "1" to the destination tag if the rung evaluates as true, otherwise it writes a "0"

OTL writes a "1" to the destination tag when the rung is true (it doesn't matter if the destination was a 1 already, it writes it again). OTL does nothing if the rung is false.

OTU writes a "0" to the destination tag when the rung is true (it doesn't matter if the destination was a 0 already, it writes it again). OTU does nothing if the rung is false.
 

Similar Topics

Hello, I am in possession of a WAGO PFC 200 750-8216 which I was successfully able to set up as a Modbus RTU Master to a slave device using...
Replies
0
Views
47
Hello. I am trying to use a Prosoft AN-X4 to improve the communications for a new panelview plus 7. This is going from a SLC-500 through DH+ to a...
Replies
9
Views
225
Hi, I recently installed 2 1783-NATR devices into two of our machines. The machines are pretty much identical, both having 1769- L24ER-QFC1B...
Replies
4
Views
280
Hi guys, so I'm using BOOTP/DHCP tool in my virtual machine for setting up an IP addresses for basically everything. My only issue is always with...
Replies
3
Views
330
hi , I need to sorry for my bad English first. I'm newbie at plc programming ,I had been asked about E/IP protocol information for some system...
Replies
3
Views
339
Back
Top Bottom