Greetings,
I am an Allen-Bradley programmer who has an opportunity to work with some Siemens equipment (S7-1200). The discreet stuff is pretty straight forward but I am struggling with creating timers. Could anyone pass along some tips for setting up a TON? Thank you, in advance.
What problems are you having? In general, the F1 key is your friend. The help files are pretty detailed, although very dry.
Basically, when IN goes true, the Q output goes true after PT amount of time. Q is essentially the same as saying the timer is done. They don't have a Timer Timing bit, but I think TT is the same as
IN Q TT
-||---|/|--()
Overall procedure I use for creating timers:
1) Drag TON onto the network
2) Accept the "Call options" prompt. Basically, this is asking you where to store the internal data of the timer. It is typically recommended to use a meaningful name instead of the default style of IEC_TIMER_1. You need a different instance created for each timer you use.
3) Fill in the PT (Preset Time). Use the format 5m or 15s or 2000ms or even 5m15s. After you type it in, it will add a T# in front if you entered a valid time. If you didn't, it will put it in quotes, thinking you typed in a tag name. If you want your timer to have a variable length, you could use a tag here instead of a constant.
4) If you want it, you can assign a tag to the ET (Elapsed Time). I don't usually need this, but it is available.
5) Add your logic to the IN and Q bits.
6) You can access the Q bit elsewhere in your code by referring to the name of the instance you gave it: IEC_TIMER_1.Q