Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Example : The following mnemonic code shows the changes that are achieved
in a program through
insertion and deletion.
0000
Before Insertion CLR
Addr Instruction Data
0000 LD 00000 OUT 0000
0001 AND 00001 OUT 00000
0002 LD 01000 Fine the
0003 AND NOT 00002 address
B A A A 0000 prior to
0004 OR LD 1 0 0 0 OUT 01000
the
0005 AND 00003
insertion
0006 AND NOT 00004 0007 SRCH point
0007 OUT 01000 SRCH OUT 01000
0008 END(01)
AND 0007
AND 00000
After Insertion
Addr Instructio Data F 0007
n 5 AND 00005 Insert
0000 LD 00000 the
0001 AND 00001 instruction
0007 INSERT?
0002 LD 01000 INS AND 00005
0003 AND NOT 00002
0004 OR LD 0008 INSERT END?
0005 AND 00003 OUT 01000
0006 AND NOT 00004
0007 AND 00005 0007 READ
0008 OUT 01000 AND 00005
0009 END(01)
6-12
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Example : (con’t)
0006 SRCH
SRCH AND NOT 00004
After Deletion
Addr Instruction Data 0006 DELETE?
0000 LD 00000 DEL AND NOT 00004 Ensure that
0001 AND 00001 this is the
0002 LD 01000 instruction to
0006 DELETE END
0003 AND NOT 00002 AND 00005 be deleted
0004 OR LD
0005 AND 00003 0005 READ
0006 AND 00005 AND 00003
0007 OUT 01000
0008 END(01)
Number Of Contacts
6-13
6. APPLICATION EXAMPLES OF BASIC COMMANDS
The number of contacts used in a rung is limited only by memory size. As many contacts as
required can be connected by means of the AND and the AND NOT keys.
As many contacts as required can be connected by means of the OR and the OR NOT keys. The
number of contacts is also not limited for use on a logic line.
Logic line
00000
00000
10000
10000
00001
00001
00002
00002
Bit Monitor
Monitor the status of a particular bit. It is possible in any PLC operation mode.
6-14
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Example :
0000
CLR
CONT B 0000
SHIFT 1 MONTR ^ ON
#
Note : a) Press the or key to display the status of the previious or next
bit
b) If the PLC is in PROGRAM or MONITOR mode, the bit’s status can be changed using
the FORCE SET / RESET operation.
Word Monitor
Monitor the content of a particular word. It is possible in any operation mode.
Example :
0000
CLR
CH B 00000
SHIFT LR 1 CHANNEL LR 01
*
CL01
MONTR 1E3B
Note : a) Press the or key to display the status of the previious or next
word.
b) If the PLC is in PROGRAM or MONITOR mode, the word’s content can be changed
using the HEX/DEC Data Modification operation. (See page 72)
6-15
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Example :
0000
CLR
Step 1
B T001
TIM MONTR 0100
Step 2 1
a) If 4 or more bits and words are being monitored, the bits and words that do not appear
MONTR MONTR
on the display can be displayed by pressing the key. If the
If more than 6 bits and words are monitored, monitoring of the first bit or word input will be
cancelled.
c) Press the CLR key to stop monitoring the leftmost bit or word and clear it from
the display.
Differentiation Monitor
Monitor the up or down differentiation status of a particular bit. It is possible in any PLC
operation mode. (Differential mode is where a contact is turned On/Off for one scan only).
Example :
6-16
6. APPLICATION EXAMPLES OF BASIC COMMANDS
0000
CLR
CONT B 00001
SHIFT MONTR ^ OFF
# 1
00001
Up-differentiation monitoring SHIFT U@OFF
00001
Down-differentiation monitoring SHIFT D@OFF
The buzzer will sound when the specified bit goes from OFF to 00001
ON (for up-differentiation) or from ON to OFF (for down ^ ON
differentiation)
Binary Monitor
Monitor the ON/OFF status of any word’s 16 bits. It is possible in any PLC operating mode.
Example :
0000
CLR
CH A B A C100
SHIFT MONTR 1A2B
* 0 1 0
C100 MONTR
SHIFT MONTR 0001101000101011
OR
Note : a) The status of displayed bit can be changed at this point by using Binary Data Modification.
bits.
Example :
D0000 T000
0119 0100
PRES VAL ?
The desired word should be at CHG D0000 0119 ????
the leftmost on the display
Example :
C100
0555
C100
SHIFT MONTR 0000010101010101
A flashing cursor will appear over bit 15. The C100 CHG ?
cursor indicates which bit can be changed. CHG 000010101010101
C100 CHG ?
10 0010101010101
C100 MONTR
WRITE 100S010101010101
Note : a) Use the and keys to move the cursor to the left and right.
B A
b) Use the 1 and 0 keys to change a bit’s status to On or Off. The cursor
will move one bit to the right after one of the keys is pressed.
PLAY REC
c) Use the SHIFT + and +
SHIFT keys to force-set or
SET RESET
force-reset a bit’s status. The NOT key will clear force-set or force-reset status.
Timers
Timers are nomally used for time delay. It can be ON delay, OFF delay etc.
6-18
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Address Instruction Data
0
00000 LD 00000
TIM0 00001 TIM 000
#0025 #0025
00002 LD TIM 000
TIM0 10.00 00003 OUT 01000
00004 END(01)
Timing diagram
input
00000
5.0 sec
output
01000
TIM is a decrementing ON-delay timer instruction which requires a timer number and a set
value (SV) ranging from 0000 to 9999 (0 to 999.9 seconds).
Buzzer
6-19
6. APPLICATION EXAMPLES OF BASIC COMMANDS
2. The 3 players will press the switch in front of them to fight to be first to answer the
question.
3. The buzzer will sound for 10 sec after any one of the players has touched the switch.
4. The light indicator in front of each player will light-up and only reset by the Host switch.
I/O Assignment
By Using SYSWIN Programming Software, the design of the buzzer control ladder diagram is
shown as follow.
6-20
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Network 2 – Buzzer
ON Buzzer when any switch is pressed and timer will cut the buzzer after specified time
005.00 010.00
BUZZER
TIM
000
#0100
Network 3 – Player 1
Player 1 Network
000.00 010.02 010.03 000.03 010.01
PLAYER 1
Network 4 – player 2
Player 2 Network
000.01 010.01 010.03 000.03 010.02
PLAYER 2
Network 5 – Player 3
Player 3 Network
000.02 010.01 010.02 000.03 010.03
PLAYER 3
Network 6 – Reset
Reset for the Game
000.03 005.01
RST RESET
Network 7
END(01)
6-21
6. APPLICATION EXAMPLES OF BASIC COMMANDS
6-22