Thursday, June 28, 2012
Memory area/Data area
I,Q Memory area
Input output bit ,I is use as switch and Q is use as relay and external output is possible When cpu power is On or RUN.
M (Memory bit):Auxiliary relay
As an internal relay inside PLC, direct external output is impossible, but if connected with I/O , it will be
then possible. When power is On or RUN, other areas than specified as latch area by parameter setting
will be all eliminated to 0.
C: counter memory
A counter is a function element of the STEP 7 programming language that acounts. Counters have an area reserved for them in the memory of your CPU. This memory area reserves one 16-bit word for each counter. The statement list instruction/LAD set supports 256 counters. To find out how many counters are available in your CPU, please refer to the CPU technical data.
Counter instructions are the only functions with access to the memory area.
T(Timer) Area in Memory
Timers have an area reserved for them in the memory of your CPU. This memory area reserves one 16-bit word for each timer address. The ladderlogic instruction set supports 256 timers. Please refer to your CPU’s technical information to establish the number of timer words available.
The following functions have access to the timer memory area:
· Timer instructions
· Updating of timer words by means of clock timing. This function of your CPU in the RUN mode decrements a given time value by one unit at the interval designated by the time base until the time value is equal to zero.
Time Value
Bits 0 through 9 of the timer word contain the time value in binary code. The time value specifies a number of units. Time updating decrements the time value by one unit at an interval designated by the time base. Decrementing continues until the time value is equal to zero. You can load a time value into the low word of accumulator 1 in binary, hexadecimal, or binary coded decimal (BCD) format.
You can pre-load a time value using either of the following formats:
· W#16#wxyz
· Where w = the time base (that is, the time interval or resolution)
· Where xyz = the time value in binary coded decimal format
· S5T#aH_bM_cS_dMS
· Where H = hours, M = minutes, S = seconds, and MS = milliseconds;
a, b, c, d are defined by the user.
· The time base is selected automatically, and the value is rounded to the next lower number with that time base.
The maximum time value that you can enter is 9,990 seconds, or 2H_46M_30S.
S5TIME#4S = 4 seconds
s5t#2h_15m = 2 hours and 15 minutes
S5T#1H_12M_18S = 1 hour, 12 minutes, and 18 seconds
Time Base
Bits 12 and 13 of the timer word contain the time base in binary code. The time base defines the interval at which the time value is decremented by one unit. The smallest time base is 10 ms; the largest is 10 s.
Time Base Binary Code for the Time Base
10 ms 00
100 ms 01
1 s 10
10 s 11
Values that exceed 2h46m30s are not accepted. A value whose resolution is too high for the range limits (for example, 2h10ms) is truncated down to a valid resolution. The general format for S5TIME has limits to range and resolution as shown below:
Resolution Range
0.01 second 10MS to 9S_990MS
0.1 second 100MS to 1M_39S_900MS
1 second 1S to 16M_39S
10 seconds 10S to 2H_46M_30S
Bit Configuration in the Time Cell
When a timer is started, the contents of the timer cell are used as the time value. Bits 0 through 11 of the timer cell hold the time value in binary coded decimal format (BCD format: each set of four bits contains the binary code for one decimal value). Bits 12 and 13 hold the time base in binary code.
The following figure shows the contents of the timer cell loaded with timer value 127 and a time base of 1 second
Different typesTimer
S_PULSE:Pulse timer The maximum time that the output signal remains at 1 is the same as the programmed time value t. The output signal stays at 1 for a shorter period if the input signal changes to 0.
S_PEXT:Extended pulse timer The output signal remains at 1 for the programmed length of time, regardless of how long the input signal stays at 1.
S_ODT:On-delay timer The output signal changes to 1 only when the programmed time has elapsed and the input signal is still 1.
S_ODTS:Retentive on-delay timer The output signal changes from 0 to 1 only when the programmed time has elapsed, regardless of how long the input signal stays at 1.
S_OFFDT:
Off-delay timer The output signal changes to 1 when the input signal changes to 1 or while the timer is running. The time is started when the input signal changes from 1 to 0.
!--RELATED-POSTS-STARTS-->
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment