DanielCamacho
Lifetime Supporting Member
What about this??
This works... Tell the pros and cons...
This works... Tell the pros and cons...
Counters certainly work... but... if you pursue this line of thought... yer gonna pi$$ Ron off!
Terry Woods said:Daniel, your code requires data logging (mental or otherwise, for trouble-shooting purposes) whereas my code, in the thread you pointed to, does not... the ultimate status is always known, all the time, without counters and compares.
Terry Woods said:A lack of experience will cause a novice to go in all kinds of "new directions"...
Tell me why, in your opinon it would not be suitable for use?Terry Woods said:"CUTE" code is not "ELEGANT" code.
It works, its not complicated and it consise...Ron said:Tell the truth I am not sure whether counters should be that complicated for someone that is expected to connect to a plc and troubleshoot.
Terry Woods said:Daniel, your code requires data logging (mental or otherwise, for trouble-shooting purposes) whereas my code, in the thread you pointed to, does not... the ultimate status is always known, all the time, without counters and compares.
rsdoran said:Dont reckon I should mention my flasher ckts using compare instructions or the LIM instructions with an AB?
http://www.patchn.com/ab_plc_flasher.htm
I do have it with 2 timers though.
S:4/6 B3:0
------||-----------------------( )----
ron... i'm obviously pretty new to this, but i thought counters were memory locations that were immediately changed unlike inputs and outputs that are only updated between scans.
Not to worry it has been tested and works fine... Why is it so dificult to accept another way of doing something? I was Project Engineer for 20 programmers, and if I gave the same program to 20 people to do, I would end up with 20 different programs all that do the job. However, I look for, ease of understanding, scan time, memory usage and of course that it is stable... I am not so arogant to think my ideas are the best and I will always accept any valid criticism...rsdoran said:If it does NOT immediately update then its worthless, zero count will never set the OTL.
I may be looking at this wrong but I have a SLC fixed I/O that I can test it on tomorrow.
Alaric said:If you want to use a counter to create a flip flop this is the simplest way to do it. No need to reset, no need to worry about the DN bit, no need to worry about roll over, no need to give a rip about what the actual ACC value is.
rsdoran said:I aint new, just not a programmer. I forget how some updates work from brand to brand for different functions, thats why I said I would have to test it.