Delay Timer

There is nothing wrong with latches first of all, if the latches are in the non retentive area they will be reset on power up (check your documentation).
Keep latch & Unlatch on consecutive rungs if possible, there is nothing worse than set & resets in many places i.e. a single bit is set and reset many times.
Sometimes it is required to keep the state of latches even on power down & up.
It's just a matter of safety, if you don't feel safe using latches perhaps you shouldn't be doing the job. And if you do want to make any latches reset on power up (this can be to stop a sudden movement i.e. return of an actuator) then do it either on fist scan block or use a first scan bit at the start of the program or in the first block to be called. It is really that simple.
I had an argument some time ago, one guy said I never use latches (he meant step flags in reality), he always used registers i.e. sequence. I pointed out this is the same a register (if Retentive) will hold it's value ;)
 
This is the golden rule. KEEP IT SIMPLE.

Would it be wrong to purposefully write the program in a way no one else could understand except you; so this way, the end customer is forced to call you [the OEM] and pay the OEM money for PLC support?

I don't do that myself, but in theory, you would make a profit as the OEM, no?

edit: Don't think badly of me, haha, but this did pop up in my mind, so maybe someone could explain the morals behind this kind of idea.
 
Would it be wrong to purposefully write the program in a way no one else could understand except you; so this way, the end customer is forced to call you [the OEM] and pay the OEM money for PLC support?

I don't do that myself, but in theory, you would make a profit as the OEM, no?

edit: Don't think badly of me, haha, but this did pop up in my mind, so maybe someone could explain the morals behind this kind of idea.

It’s done all the time and is terrible. Not good business and will usually bite everyone involved. I’d much rather just have it locked or source protected.

It’s no better than writing a program bomb, which can lead to legal consequences.
 
It’s done all the time and is terrible. Not good business and will usually bite everyone involved. I’d much rather just have it locked or source protected.

It’s no better than writing a program bomb, which can lead to legal consequences.

I mean legally speaking, sure people will do whatever the law permits, but I am asking morally speaking, haha. My question is difficult, cause everyone has different religions and morals, so the answer will vary from person to person.

I am confused because I am selling a machine that should do a certain task. Whether or not the PLC program is difficult to understand won't impact the operation of the machine.

I guess it boils down to the programmer's intention, if he/she writes it terribly on purpose to make more money, then that is morally incorrect. Whereas if someone does not intend to make money (they are just not good at writing programs, they just want to help the end user as best they can), then it's morally okay in that case.
 
Alrighty latches successfully worked!

I created a simple version of what I did. Hopefully this might help someone else.

The goal of this is to hold a few functions/checks in place while a time is going. Then at the end, start reseting the timers and other functions.

https://ibb.co/6Wc21pB



TP timer is one solution also.


Actually TON is all what you need on programming.
(TP timer = RISING EDGE of input -> S bit ->TON -> R-bit)
(TOF-timer = FALL TRIG of input -> S-bit > TON -> R-bit)
 
Maybe also this thread:
http://www.plctalk.net/qanda/showthread.php?p=838826#post838826


You just need to break things down in to bite sized pieces.

1) What instruction would you use for timing the 20 seconds from the button being pressed to the output turning on?

2) What instruction would let you keep the output on for X amount of time and then turn the output off? I'll give you a hint on this one, because many people get this wrong. The TOF instruction is a tool of Satan and should never ever be used. People who say otherwise, likely hate the Packers, brats, and puppies. Don't be that person.

Sort those two issues out, and post the code you came up with. From there we can help get the rest of the issues sorted out.

Bubba.


:ROFLMAO:
 

Similar Topics

Build error occurs with TON ladder logic command. Time Input expected on block. Using Integer Tag under Control Local, and then hard number 19...
Replies
2
Views
764
Hello guys, I am currently looking through some examples of how timers work, but this ladder logic diagram gets me really confused. Once I:1/0 is...
Replies
2
Views
1,857
Hey guys So this is one of those things that siemens really does better then AB. Im trying to find a work around for it. I want to use a...
Replies
13
Views
3,137
any hint how i can make a pext or pulse timer using on delay timer in ladder logic. on delay timer is said to be a universal timer, all other...
Replies
4
Views
2,363
Hi! I was wondering when input 2 detects I thought it should straight away unlatch . And with the latch timer, it still does it without delaying...
Replies
2
Views
2,138
Back
Top Bottom