Slightly Confused

MarkNightingale

Lifetime Supporting Member + Moderator
Join Date
Sep 2010
Location
In The VAT Shed
Posts
740
Hi All,

Can you please take a look at the following rung of code and tell me how can B3:85/8 ever come on.

I am hoping Ron is around somewhere to shed some light on this.

Thanks

Mark

Confused.jpg
 
I assume you've searched for every instance of this bit? It may be "triggered" by an HMI or other peripheral device or PLC. Is this PLC in a networked system?
 
Rube,

I have searched through everywhere to find that bit and can't find it either in The PLC program or in the Intouch. There are a few messages that are passed back and forth between PLC's but B3 is not in that area of programming.
Surely if it was to be bought on by a HMI though there would be no need to have that rung there at all.
To be honest I don't think this code has ever worked correctly and as I'm going through it im starting to find out why.
The main reason for posting was to check there wasn't something funky going on with the scanning.

Mark
 
Depending on what the PLC is operating, you might just disable the rung and run some tests to see what happens. Some manufacturers write an umbrella program that works for ALL models/options of a system even though not every machine with that program will use EVERY rung/bit. Safety must be taken into account when doing these tests obviously.
 
Greetings Mark ...

the big question is:

does ANYTHING ELSE have any control over the status of bit B3:85/8? ... taking this at face value (and without seeing the rest of your program) here's what we could say at the nuts and bolts level ...

suppose that bit/box B93:0/14 has a status of ZERO ... that would make the XIO on this rung TRUE ...

suppose that the value of N11:199 happens to be Greater Than or Equal to 1500 ... then the GEQ on this rung would be TRUE ... (your example shows the value of N11:199 to be 2101 – so TRUE in the example) ...

now then ...

suppose that SOMETHING happened to put a status of ONE into the bit/box B3:85/8 ... in that case, the XIC on this rung would be TRUE ... therefore all of the conditions on the rung would be TRUE – and the OTE would write a ONE into the bit/box of B3:85/8 on each scan ...

in other words, if the first two conditions on the rung are TRUE, then putting a status of ONE into the bit/box for B3:85/8 would KEEP a status of ONE in that bit/box ...

now then ...

suppose that either one of the first two conditions (XIO or GEQ) become FALSE ... in that case, bit/box B3:85/8 would go to a status of ZERO ... that's because the OTE would write a value of ZERO into the bit/box ...

and if ANYTHING happened to write a value of ZERO into bit/box B3:85/8, then the bit/box would stay at a value of ZERO ... specifically, it would stay "off" until SOMETHING turned it back "on" again ...

now the question:

what (if anything) is the rung supposed to accomplish? ...

best GUESS (without seeing the rest of the program) is that the original programmer wanted to produce something like a "seal-in" type arrangement for bit/box B3:85/8 ... in other words, if we can make it become a ONE – then KEEP it a ONE – until either of the first two conditions go FALSE ...

going one step further ...

since you're using an OTE for bit/box B3:85/8, then when the system first "powers up" the processor's PRESCAN is going to automatically write a ZERO into bit/box B3:85/8 ...

so MAYBE (another GUESS) the original programmer wanted to make sure that the status of bit B3:85/8 would always be a ZERO immediately after a "go to run" event ...

now the inevitable question: can you post the entire program? ... if not, can you email a copy to me with a gentlemen's agreement that it will go no further? ...

another GOOD possibility ... all of this is just a "left over" scrap of code that does NOTHING in the program ...
 
Last edited:
It could be simply that A.N.Other has put in the XIC B3:85/8 to temporarily disable the rung, say, for test purposes but forgot to remove it, its hard to say without seeing full prog.

Are any values being moved into word B3:85? or are any file moves into this data table area being made?
a cross reference should find any occurrences.

Steve
 
I've looked all over the program for anything thats even close to B3:85/8.

I think Ron is correct when he says the original programmer is using it as some sort of lock in because the OTE when traced runs an agitator, so it makes sense that if the level in the tank drops below a certain level he wants the agitator to stop, but nowhere in the program or in the SCADA application can I find anywhere that references that bit.

Ron I will gladly email you the code to see it its something I am totally missing. It is Friday and its been a hell of a long week.

Thanks for yor responses.

Mark
 
I've got the program – and nothing jumps out at me that we haven't already discussed ...

best guess so far ... MAYBE the original programmer had this rung for something like a sort of "while-I'm-debugging-the-system" tool ...

so ...

he MANUALLY toggles B3:85/8 to the "on" condition – and the agitator runs until either of the first two conditions on the rung become FALSE ... then the agitator shuts down – and won't come back on again until the programmer manually toggles the bit back "on" ...

as Rube said, maybe there is (or WAS) a link to the HMI to allow an operator to toggle this bit "on" to run the agitator – for something like the same reason ...

also ... take a look at how bit B36:3/0 gets used to control the logic for the agitator ... maybe something will surface from that if you consider the normal operation of the system ...

I also checked to see if B3:85/8 was being controlled by Indirect Addressing – or something else along those lines ... nothing obvious there either ...

I'll look some more later this weekend ...
 
If this is OEM I have caught them placing two OTE with the same address in a program more than once, in that case both would need to be true.
 
Oldnerd,

There isn't another OTE in the program, that was the first thing I looked for.

Just for the record as well, both wouldn't need to be true for it to be on, only the one at the latest part of the scan cycle would need to be true.

Mark
 
Probably just semantics, but I think what you're really asking is only the logic preceeding the latest OTE with that address would need to become true before that bit went true. When one instance of a bit goes true, all instances of the same bit go true.
 
Last edited:
Rube,

Not technically correct. The last OTE would only be true if that rung was true.

No matter what was happening above the last OTE, and it could be showing on, if the wrong with the final OTE is not true this bit will not be true.

I havent got my programming laptop with me (weekend off:beer:)
so I cant give you an example but if you go to Ron Beauforts site PLC bootcamp it will explain all.

Cheers

Mark
 
I hope this gives you some idea.

Although button 1 is ON and therefore in the same rung Bit 1 is on, because Button 2 is NOT ON this rung will make Bit 1 OFF, therefore Output 1 would be off.

Mark

Example.jpg
 
Rube,

Not technically correct. The last OTE would only be true if that rung was true.


"only the logic preceeding the latest OTE with that address would need to become true before that bit went true."

Maybe I should have said "last" instead of "latest" but I think we're saying the same thing.

Cheers back!
 
And, as Ron notes, if you were monitoring this you wouldn't see Bit 1 as 'On'.

And, if the third rung were instead placed between the other two you would see Output 1 as 'On' but 'Bit 1' still off. It can be massively confusing.

Thank goodness for Ron's videos.
 

Similar Topics

Hi all I have a problem , need some ideas... We have 2 plants fed from the same substation, Both Plc systems are fed from seperate UPS´s...
Replies
6
Views
2,681
I have been tinkering with a little DIY remote access stuff lately, prompted by some recommendations and challenges on this forum. To my...
Replies
5
Views
1,839
I need a little sanity check and hopefully advice from some experienced users. I have a mechanism that we're driving with a JVL MAC3000...
Replies
4
Views
1,138
Looking for an economic way to monitor kWh and kVARh on multiple circuits (up to 10) in a single distribution board. The Square D Power Logic...
Replies
3
Views
1,709
Does anyone make a "positioning cylinder" like the Festo DDPC but with a digital encoder feedback ? I have an application where a 0.0005 mm...
Replies
5
Views
1,765
Back
Top Bottom