PMAC PLC programs are used to accomplish a wide tasks variety. These tasks range from making simple decisions to completely customizing the behavior of PMAC. Although these tasks vary greatly in complexity and scope the programming structures used to accomplish them are relatively few in number. These structures are simple to learn and to use. Once mastered they can combined like building blocks to create a complex program out of very easy and simple to debug pieces.
There are 2 steps to build a PLC program. One is selecting the correct logical structures. The other is combining them in the correct manner. These are the small pieces of PLC code used to do very simple parts of the PLC.
Counter delay
You will often want a small delay after a PLC commands an action or sets an I/O. a simple counter can be used for this but you should be aware of the risks. Counter work at the speed of the PMAC CPU and there fore are not of a fixed time. If the delay time needs to be a fixed time or portable to different PMAC CPU speeds of firmware versions a Timer Delay is a better option.
Timer delay
You will often want a small delay after a PLC commands an action or sets an I/O. a timer delay is a good option when the delay is always at least X msec. timers works independent of the speed of the PMAC CPU and are therefore portable to different PMAC CPU speeds or firmware versions. A timer delay is a better option than a counter delay. If the time for the commanded I/O or action to actually to take place can vary greatly then a conditional delay could be a better option.
Conditional delay
A conditional delay is a good choice when the delay time varies due to external factors. Conditional delays is work independent of the speed of the PMAC CPU and are therefore portable to different PMAC CPU speed or firmware versions.