Beginner guide (986746), страница 11
Текст из файла (страница 11)
Input indicator will show functionality of device.b) OUTPUT devices to PLCUse FORCED SET/RESET command.qForced Set/ResetForcing outputs or other parts of the program ON or OFF irrespective to the Program is referredto as FORCED SET/RESET.FORCEDPLAYRECORSETRESETTurns ONTurns OFFUsing a Programming Console, Set the Mode Selector switch to MONITORPressCLROUTMONTRPLAYSETAB0A1A0A00Output 01000 LED should be lighted.• The above can also be done in the PROGRAM mode.6-86.qAPPLICATION EXAMPLES OF BASIC COMMANDSProgram SearchThe program can be searched for occurrences of any designated instruction or data area bitaddress used in instruction.
Searches can be performed from any currently displayed address orfrom a cleared display.To designate a bit address or an instruction,<Instruction>CLRSHIFTCONT<Address>#SRCHSRCHHRTIMCNTOnce an occurrence of an instruction or bit address has been found, any additional occurrencesof the same instruction or bit can be found by pressing SRCH again. SRCH’G will be displayedwhile a search is in progress. When the first word of a multiword instruction is displayed for asearch operation, the other words of the instruction can be displayed by pressing the DOWN keybefore continuing the search.If Program Memory is read in RUN or MONITOR mode, the ON/OFF status of any displayedwill also be shown.6-96.•APPLICATION EXAMPLES OF BASIC COMMANDSExample: Bit SearchCLRSHIFT•CONTF5#Example:Instruction SearchesA000050200LDCONT SRCHSRCH0203ANDCONT SRCHSRCH1078CONT SRCHEND(01)0000LDSRCH0200LDSRCH0202LDSRCH1082END(01)A000005000050000LDCLR10000CONTSRCHCLRB000000000SRCH0000000000SRCH000001000B10100TIMSRCH0203TIMSRCH0203TIM DATA001001#01236-106.qAPPLICATION EXAMPLES OF BASIC COMMANDSInserting And Deleting InstructionIn PROGRAM mode, any instruction that is currently displayed can be deleted or anotherinstruction can be inserted before it.
These are not possible in RUN or MONITOR modes.To insert an instruction, display the instruction before which you want the new instruction to beplaced, input the instruction in the same way as when inputting a program initially, and thenpress INS and the DOWN key.<Instruction>INSTo delete an instruction, display the instruction to be deleted and press DEL and the UP key.CAUTION: Be careful not to delete instructions inadvertently.
Once deleted, there is no way to recoverwithout reinputting the instruction again.<Instructioncurrentlydisplayed>DELWhen an instruction(s) is inserted or deleted, all address in Program Memory following theoperation are adjusted automaticaly so that there are no blank address and no unaddressedinstructions.6-116.•APPLICATION EXAMPLES OF BASIC COMMANDSExample :Before InsertionAddr Instruction0000LD0001AND0002LD0003AND NOT0004OR LD0005AND0006AND NOT0007OUT0008END(01)The following mnemonic code shows the changes that are achieved in a program throughinsertion and deletion.CLRData00000000010100000002000030000401000OUTBA1A00000OUT0000000000OUT01000SRCH0007OUTA0ANDAfter InsertionAddr Instruction0000LD0001AND0002LD0003AND NOT0004OR LD0005AND0006AND NOT0007AND0008OUT0009END(01)Data00000000010100000002000030000400005010000000SRCH010000007AND0000050007AND00005INS0007ANDFINSERT?Fine theaddressprior totheinsertionpointInserttheinstruction000050008 INSERT END?OUT010000007ANDREAD000056-126.•APPLICATION EXAMPLES OF BASIC COMMANDSExample : (con’t)Before DeletionAddrInstruction0000LD0001AND0002LD0003AND NOT0004OR LD0005AND0006AND NOT0007AND0008OUT0009END(01)Procedure for DeletionData0000000001010000000200003000040000501000CLRANDNOTE4SRCHAfter DeletionAddrInstruction0000LD0001AND0002LD0003AND NOT0004OR LD0005AND0006AND0007OUT0008END(01)Data00000000010100000002000030000501000DEL00000000AND000000000AND NOT000000000AND NOT000040006SRCHAND NOT000040006 DELETE?AND NOT000040006AND0005ANDDELETE END00005Fine theinstructionThatrequiresdeletionEnsure thatthis is theinstruction tobe deletedREAD000036-136.qAPPLICATION EXAMPLES OF BASIC COMMANDSNumber Of ContactsThe number of contacts used in a rung is limited only by memory size.
As many contacts asrequired can be connected by means of the AND and the AND NOT keys.000000000100002Logic line000000000100002Logic lineAs many contacts as required can be connected by means of the OR and the OR NOT keys. Thenumber of contacts is also not limited for use on a logic line.Logic line00000100000000100002000001000000001000026-146.qAPPLICATION EXAMPLES OF BASIC COMMANDSBit MonitorMonitor the status of a particular bit. It is possible in any PLC operation mode.Example :CLRSHIFTNote :CONTB1#a) Press theorMONTR00000000^ ONkey to display the status of the previious or nextbitb) If the PLC is in PROGRAM or MONITOR mode, the bit’s status can be changed usingthe FORCE SET / RESET operation.qWord MonitorMonitor the content of a particular word.
It is possible in any operation mode.Example :CLRSHIFTCHLR*B1MONTRNote :a) Press theor000000000CHANNELLR01CL011E3Bkey to display the status of the previious or nextword.b) If the PLC is in PROGRAM or MONITOR mode, the word’s content can be changedusing the HEX/DEC Data Modification operation. (See page 72)6-156.qAPPLICATION EXAMPLES OF BASIC COMMANDSMultiply Address MonitoringThe status / contents of up to 6 bits and words can be monitored simultaneously, although only 3can be shown on the display at any one time.Example :0000CLRStep 1Step 2TIMSrep 3SHIFTStep 4DMCONTBMONTRT00101001MONTR00001^ OFFT00101000MONTRD0010123400001 T001^ OFF 0100B#B1A1a) If 4 or more bits and words are being monitored, the bits and words that do not appearon the display can be displayed by pressing theMONTR key.
If theMONTRkey is pressed alone, the display will shift to the right.If more than 6 bits and words are monitored, monitoring of the first bit or word input will becancelled.c) Press theCLRkey to stop monitoring the leftmost bit or word and clear it fromthe display.d) Press theSHIFT +CLRkey to end monitoring altogether.6-166.qAPPLICATION EXAMPLES OF BASIC COMMANDSDifferentiation MonitorMonitor the up or down differentiation status of a particular bit.
It is possible in any PLCoperation mode. (Differential mode is where a contact is turned On/Off for one scan only).Example :0000CLRCONTSHIFTB#MONTR1Up-differentiation monitoringSHIFT00001U@OFFDown-differentiation monitoringSHIFT00001D@OFFThe buzzer will sound when the specified bit goes from OFF toON (for up-differentiation) or from ON to OFF (for downdifferentiation)q00001^ OFF00001^ ONBinary MonitorMonitor the ON/OFF status of any word’s 16 bits. It is possible in any PLC operating mode.Example :CLRCHSHIFTAB0*A10SHIFTMONTRMONTR0000C1001A2BC100 MONTR0001101000101011ORThe status of force-set bits is indicated by “S” andforce-reset bits are shown with “R”.Note :C100 MONTR000S1010001R1011a) The status of displayed bit can be changed at this point by using Binary Data Modification.b) Pressorkey to display the status of the previous or next word’sbits.6-176.qAPPLICATION EXAMPLES OF BASIC COMMANDSHex/BCD Data ModificationThis operation is used to change the BCD or Hexadecimal value of a word being monitored.
It ispossible in the MONITOR or PROGRAM mode only.Example :D00000119CA2qA0PRES VAL ?D0000 0119 ????CHGThe desired word should be atthe leftmost on the displayWRITE0T0000100D0000 T0000200 0100Binary Data ModificationThis operation is used to change the status of a word’s bits when the word is being monitored in16-bit format, using the Binary monitor. It is possible in MONITOR or PROGRAM mode only.Example :C1000555SHIFTA flashing cursor will appear over bit 15.
Thecursor indicates which bit can be changed.SHIFTMONTRC1000000010101010101CHGC100 CHG ?000010101010101a) Use theb) Use theandB1andC100 CHG ?0010101010101100C100 CHG ?10101010101PLAYSETWRITENote :10C100 MONTR100S010101010101keys to move the cursor to the left and right.Akeys to change a bit’s status to On or Off. The cursor0will move one bit to the right after one of the keys is pressed.c) Use theSHIFT+PLAYandSET+SHIFTRECkeys to force-set orRESETforce-reset a bit’s status. The NOT key will clear force-set or force-reset status.6-186.qAPPLICATION EXAMPLES OF BASIC COMMANDSTimersTimers are nomally used for time delay.
It can be ON delay, OFF delay etc.qApplication #2: On Delay CircuitLadder diagram0TIM0Mnemonic codesAddressInstruction00000LD00001TIM#0025TIM010.00000020000300004LDOUTEND(01)Data00000000#0025TIM 00001000Timing diagraminput000005.0 secoutput01000TIM is a decrementing ON-delay timer instruction which requires a timer number and a setvalue (SV) ranging from 0000 to 9999 (0 to 999.9 seconds).6-196.qAPPLICATION EXAMPLES OF BASIC COMMANDSExample : Priority Determination DesignHostPlayer 1Player 2Player 3BuzzerThe game buzzer control requirement:•1.After the Host has finished with question.2.The 3 players will press the switch in front of them to fight to be first to answer thequestion.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 AssignmentInput00000000010000200003DevicePB1PB2PB3RST (reset)Output01000010010100201003DeviceBuzzerPlayer 1 lightPlayer 2 lightPlayer 3 lightBy Using SYSWIN Programming Software, the design of the buzzer control ladder diagram isshown as follow.6-206.APPLICATION EXAMPLES OF BASIC COMMANDSLadder Diagram : Main 1 Network 1Main 1 – Who press first(Priority Determination)This prigram to determine which player press the switch first, after the host have finish asking a question.Network 1 – InterlockedInterlocked network for the 3 player playing the game.000.00010.02010.03005.01PB1PLAYER 2PLAYER 3RESET000.01010.01010.03.PB2PLAYER 1PLAYER 3000.02010.02010.01PB3005.00PLAYER 2PLAYER 1TIM000005.00Network 2 – BuzzerON Buzzer when any switch is pressed and timer will cut the buzzer after specified time010.00005.00BUZZERTIM000#0100Network 3 – Player 1Player 1 Network000.00010.02010.03000.03010.01PB1010.01PLAYER 2PLAYER 3RSTPLAYER 1000.01010.01010.03000.03010.02PB2010.02PLAYER 1PLAYER 3RSTPLAYER 2000.02010.01010.02000.03010.03PB3010.03PLAYER 1PLAYER 2RSTPLAYER 3PLAYER 1Network 4 – player 2Player 2 NetworkPLAYER 2Network 5 – Player 3Player 3 NetworkPLAYER 3Network 6 – ResetReset for the Game000.03005.01RSTRESETNetwork 7END(01)6-216.qAPPLICATION EXAMPLES OF BASIC COMMANDSOn and Off Delay CircuitThis circuit is used to delay the ON/OFF time of an input signal for a given time.I/O AssignmentInput00000DevicesSwitchOutput01000DevicesMotorTiming diagramSignal (input signal)T1ON/OFF delay outputT1: ON-delay timeT2: OFF-delay timeT2Ladder diagram00000(Switch)TIM000#0050TIM000TIM001010000100001000•00000(Switch)TIM001#0050Address0000000001InstructionLDTIM00002000030000400005000060000700008LDORAND-NOTOUTLDAND-NOTTIM00009END(01)Data00000000#0050TIM00001000TIM0001010000100000000001#0050Note :The timer’s present value can be monitored from the programming console by pressing:6-226.APPLICATION EXAMPLES OF BASIC COMMANDSCLRATIMMONTR0Input and output status can also be monitored by pressing:SHIFTCONTMONTR0000001000•To change the timer valueSet the mode selector switch to MONITOR1)CLR00012)3)•DATIMF3TIMDATA50#0050SRCH0001TIMREADOFF000CHG0001 TIM DATA#0050#????WRITEOff delay circuit0TIM0#251000TIM0One-shot Circuit1000Note how similar they are111001TIM1TIM1#251001Off-delay Circuit6-236.qAPPLICATION EXAMPLES OF BASIC COMMANDSCounterCNT (counter) is a preset decremental counter.