Code Sequence

Hey Terry, did you ever finish that K-map of Karl's (kalle's) 2 guys, 2 girls, 2 rubbers dilemma?... :p

beerchug

-Eric
 
Hi Guys.

I know what you are thinking 'typical woman has to have the last word'.

Desert Dog.
I'm not sure what you mean.
I agree as the code is written: line 2 will be true on scan 1 and line 1 will be false. On scan 2 line 1 will be true and line 2 will be false.

If the networks were reversed: are you saying
On scan 1 line 1 (was line 2) will be true and line 2 (was line 1) would be false.
On scan 2 line 1 (was line 2) will still be true and line 2 (was line 1) would also be true but for only one scan as "N42" resets "N41"?

Fiona.
 
Originally posted by Peter Natchway
Now why doesn't PLC development software optimize ladders?

I'm guessing on this but I think it's for ease of understanding when you do online monitoring. You want some form of source code that contains the un-optomized version of the code. This is a 'document' that easily lets anyone logically follow what is going on. Once it is optomized the code in the controller won't match the source anymore. Tying these two back together when you want to monitor them might be a trick. Then again, maybe not. When an FPGA development simulator runs a simulation, does it run it on the source or does it optimize it first then run it? It's the same issue.
That may be the ticket. Getting away from the current group of development tools and moving toward highewr level development tools might make some of this go away.
Once development packages start to move away from ladder and move into more abstracted languages it won't be as big a deal. But for now, optimization might be a tough sell.

Keith
 
Fiona said:
<snip>
Desert Dog.
I'm not sure what you mean.
I agree as the code is written: line 2 will be true on scan 1 and line 1 will be false. On scan 2 line 1 will be true and line 2 will be false.

If the networks were reversed: are you saying
On scan 1 line 1 (was line 2) will be true and line 2 (was line 1) would be false.
On scan 2 line 1 (was line 2) will still be true and line 2 (was line 1) would also be true but for only one scan as "N42" resets "N41"?
<snip>

This Will Save The World because for one scan 41 will be true but not 42.
????----|41|----(Set 42)
????----|40|----(Set 41)
----|41|----|Not 42|----(Save The World)



Reverse the order and the world is doomed because as soon as 40 turns true so do 41 and 42.
????----|40|----(Set 41)
????----|41|----(Set 42)
----|41|----|Not 42|----(Save The World)



These setups are used along with other conditions to allow sequencing of actions in a specific order. As many are pointing out there are other ways but understanding this sequencing is important for troubleshooting many things you may come across.

In you example once 42 is set 41 is cleared only because the sequence is beyond that point and is no longer needed this time through, it is then cleared so it is ready for the next time through.
 
Hello Desert Dog.

I have seen the light.

Thanks for your patience,

I was not looking at the code in it's simplest form I was also taking into account the conditions (proximity sensors etc) that must be true for the next step to be triggered. If you remove these then what you are saying makes perfect sense.

I think I owe the original author of the code an apology.

Fiona.
 

Similar Topics

(subtitle: should I bother with structured text? AKA: Panasonic FP gurus please contact me.) Newbie question, but hope someone can help me...
Replies
12
Views
8,577
Anyone have some code I can use for refrigerant Compressors Sequence Control IE an example Cascade Sequencers The simplest sequencers use a...
Replies
3
Views
2,074
Hello, I am trying to read a barcode scanner input using a cognex dataman 280 barcode reader, store it another string, the compare with another...
Replies
1
Views
45
Hi there, I'm new to plc programming and was wondering why I get this error code when I run my simulation for these temperature sensors? What I'm...
Replies
2
Views
77
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
10
Views
281
Back
Top Bottom