Showing posts with label plc controller. Show all posts
Showing posts with label plc controller. Show all posts

Sunday, 26 October 2014

PLC Detailed memory map of PLC controller

 INTRODUCTION

 B.1 General explanation of memory areas
 B.2 IR memory area
 B.3 SR memory area
 B.4 AR memory area
 B.5 PC memory area

Introduction
Purpose of this appendix is to explain certain memory areas in detail. As the following tables cover whole memory, there are options left unused in this book. They should be skipped during the first reading, and used later according to needs.
B.1 General explanation of memory areas
Memory of PLC controller consists of several areas, some of these having predefined functions.

Data areaWord(s)Bit(s)Function
IR areainput areaIR 000 - IR 009 (10 words)IR 00000 - IR 00915 (160 bits)These bits may be assigned to an external I/O connection. Some of these have direct output on screw terminal (for example, IR000.00 - IR000.05 and IR010.00 - IR010.03 with CPM1A model)
output areaIR 010 - IR 019 (10 words)IR 01000 - IR 01915 (160 bits)
working areaIR 200 - IR 231 (32 words)IR 20000 - IR 23115 (512 bits)Working bits that can be used freely in the program. They are commonly used as swap bits
SR areaSR 232 - SR 255 (24 words)SR23200 - SR25515 (384 bits)Special functions, such as flags and control bits
TR area---TR 0 - TR 7 (8 bits)Temporary storage of ON/OFF states when jump takes place
HR areaHR 00 - HR 19 (20 words)HR0000 - HR1915 (320 bits)Data storage; these keep their states when power is off
AR areaAR 00 - AR 15 (16 words)AR0000 - AR1515 (256 bits)Special functions, such as flags and control bits
LR areaLR 00 - LR 15 (16 words)LR0000 - LR1515 (256 bits)1:1 connection with another PC
Timer/counter areaTC 000 - TC 127 (timer/counter numbers)Same numbers are used for both timers and counters
DM areaRead/writeDM 0000 - DM 0999 and DM 1022 - DM 1023 (1002 words)---Data of DM area may be accessed only in word form. Words keep their contents after the power is off
Error writingDM 1000 - DM 1021 (22 words)---Part of the memory for storing the time and code of error that occurred. When not used for this purpose, they can be used as regular DM words for reading and writing. They cannot be changed from within the program
Read onlyDM 6144 - DM 6599 (456 words)---
PC setupDM 6600 - DM 6655 (56 words)---
Storing various parameters for controlling the PC
Note:
1. IR and LR bits, when not used to their purpose, may be used as working bits.
2. Contents of HR area, LR area, counter and DM area for reading/writing is stored within backup condenser. On 25C, condenser keeps the memory contents for up to 20 days.
3. When accessing the current value of PV, TC numbers used for data have the form of word. When accessing the Completing flags, they are used as data bits. 4. Data from DM6144 to DM6655 must not be changed from within the program, but can be changed by peripheral device.
B.2. SR memory area
IR area doesn’t have predefined memory locations, but is meant for general use in the program. Of all the locations this memory area consists of, only those directly connected to PLC controller input/output lines are of interest for this appendix.

IR area can be divided into 3 parts:

1. Input area is located from word IR000 to IR009, totaling 160 bits. Most important of these are in the word IR000 because they are directly connected to screw terminal of PLC controller. Input IR000.01 is directly connected to screw terminal marked with 01 on the casing of the PLC controller.

2. Output area is located from word IR010 to IR019, totaling 160 bits. Most important of these are in the word IR010 because they are directly connected to screw terminal of PLC controller. Output IR000.00 is directly connected to screw terminal marked with 00 on the casing of the PLC controller.

3. Working area is located from word IR200 to IR231 totaling 512 bits for general use.

As IR memory area does not have predefined memory locations, more detailed explanations are not necessary.

B.3. IR memory area
Unlike IR area, SR area does have predefined memory locations. These bits are usually tied to the PLC controller work or contain current and set values of different functions. Purpose of specific memory locations of SR area is explained in the following table:

WordsBitsFunction
SR 232 - SR 23500 - 15Input area for macro functions. Contains input operands for MCRO(99) (may be used for working bits, when MCRO(99) is not used)
SR 236 - SR 23900 - 15Output area for macro functions. Contains output operands for MCRO(99) (may be used for working bits, when MCRO(99) is not used)
SR 24000 - 15Contains set value SV, when input interrupt 0 is used in counter mode (4 hexadecimal digits) (may be used for working bits, when input interrupt 0 is not used in counter mode)
SR 24100 - 15Contains set value SV, when input interrupt 1 is used in counter mode (4 hexadecimal digits) (may be used for working bits, when input interrupt 1 is not used in counter mode)
SR 24200 - 15Contains set value SV, when input interrupt 2 is used in counter mode (4 hexadecimal digits) (may be used for working bits, when input interrupt 2 is not used in counter mode)
SR 24300 - 15Contains set value SV, when input interrupt 3 is used in counter mode (4 hexadecimal digits) (may be used for working bits, when input interrupt 3 is not used in counter mode)
SR 24400 - 15Contains current value (PV-1), when input interrupt 0 is used in counter mode (4 hexadecimal digits)
SR 24500 - 15Contains current value (PV-1), when input interrupt 1 is used in counter mode (4 hexadecimal digits)
SR 24600 - 15Contains current value (PV-1), when input interrupt 2 is used in counter mode (4 hexadecimal digits)
SR 24700 - 15Contains current value (PV-1), when input interrupt 3 is used in counter mode (4 hexadecimal digits)
SR 248, SR 24900 - 15Contains current value PV of the high-speed counter (may be used for working bits, when high-speed counter is not used)
SR 25000 - 15Analog setting of value 0. Keeps 4 digit BCD value (0000 - 0200) set via analog potentiometer on the PLC controller casing.
SR 25100 - 15Analog setting of value 1. Keeps 4 digit BCD value (0000 - 0200) set via analog potentiometer on the PLC controller casing.
SR 25200Reset of the high-speed counter
 01 - 07Not used
 08Peripheral port. Switches on for the reset of the peripheral port (this doesn't apply to a case when peripheral device is connected). Bit automatically changes state to OFF after the reset
 09Not used
 10PLC Setup Reset Bit. When on, it initializes PC setup (DM6600-DM6655). It automatically goes to OFF after the reset. This applies only if the PC is in PROGRAM mode
 11Forced Status Hold Bit. OFF: bits used in the operation of forced set/reset are cleared when changing from PROGRAM to MONITOR mode. ON: bits used in the operation of forced set/reset keep their states when changing from PROGRAM to MONITOR mode.
 12 I/O Hold bit. OFF: IR and LR bits are reset when starting or ending an operation. ON: IR and LR bits keep their states when starting or ending an operation.
 13Not used
 14Error Log Reset Bit. Bit state OFF clears the record of error taking place. Bit automatically goes off after the operation
 15Not used
SR 25300 - 07FAL error code. Location contains error code (2 digit number). FAL number is stored at this location upon executing FAL(06) or FAL(07) instructions. Location contents are reset upon executing FAL 00 instruction or by clearing an error from peripheral device
 08Not used
 09Cycle Time Overrun Flag. Bit goes to ON when program length doesn't allow cycle of input/output scanning to be executed in a specified time period
 10 - 12Not used
 13Flag always on
 14Flag always off
 15First Cycle Flag. Goes ON during the first cycle at the beginning of the operation
SR 254001 min clock impulse (30s on, 30s off)
 010.02s clock impulse (0.01s on, 0.01s off)
 02Negative (N) flag
 03 - 05Not used
 06Differential Monitor Flag
 07STEP(8) execution flag
 08 - 15Not used
SR 255000.1s clock impulse (0.05s on, 0.05s off)
 010.2s clock impulse (0.1s on, 0.1s off)
 021.0s clock impulse (0.5s on, 0.5s off)
 03Instruction Execution Error (ER) Flag. Changes state to ON if error occurs during instruction execution
 04Carry (CY) flag
 05"Greater than" (GR) flag
 06"Equals" (EQ) flag
 07"Less than" (LE) flag
 08 - 15Not used

B.4. AR memory area
Purpose of this memory area is to provide information on PLC controller state, malfunctions and some system data. Memory locations of this area keep their states after the power has been shut down.

Word(s)Bit(s)Function
AR00 and AR0100 - 15Not used
AR0200Status flag of the first I/O unit for expanding I/O lines (I/O units status flag)
 01Status flag of the second I/O unit for expanding I/O lines (I/O units status flag)
 02Status flag of the third I/O unit for expanding I/O lines (I/O units status flag)
 03 - 07Not used
 12 - 15Number of connected I/O units
AR03 - AR0700 - 15Not used
AR0800 - 07Not used
 08 - 11Peripheral device error code
 12Flag of peripheral device error
 13Peripheral Device Transmission Enabled Flag
 14 - 15Not used
AR0900 - 15Not used
AR1000 - 15Power-off counter. Contains 4-digit BCD value
AR1100 - 07High-speed Counter Range Comparison Flags
 08 - 14Not used
 15Pulse Output Status. ON: stopped; OFF: Impulse at output
AR1200 - 15Not used
AR1300Power-up PC Setup Error Flag. Goes ON when error occurs in area DM 6600 - DM 6614
 01Start-up PC Setup Error Flag. Goes ON when error occurs in area DM 6615 - DM 6644
 02RUN PC Setup Error Flag. Goes ON when error occurs in area DM 6645 - DM 6655
 03 - 04Not used
 05Long Cycle Time Flag. Goes ON if real cycle length exceeds length set in DM 6619
 06 - 07Not used
 08Memory Area Specification Error Flag. Goes ON when non-existing address is specified in the program
 09Flash Memory Error Flag
 10Read-only DM Error Flag. Goes ON when checksum error occurs in DM 6144 - DM 6599 range
 11PC Setup Error Flag. Goes ON when checksum error occurs in PC Setup area
 12Program Error Flag. Goes ON when checksum error occurs in program memory (UM) or inappropriate instruction is executed
 13Expansion Instruction Error Flag
 14 - 15Not used
AR1400 - 15Maximum Cycle Time. 4 BCD digits. Cleared at the beginning of the operation
AR1500 - 15Current Cycle Time. 4 BCD digits. Not cleared when the operation ends
 Note:
1. IR and LR bits when not used for their function may be used as working bits.
2. Contents of HR area, LR area, counter, and DM area for reading/writing are kept by battery of central processing unit. In case that the battery is removed or malfunction occurs, this data will be lost.
3. When accessing the current value of PV, TC numbers used for data have form of word. When accessing Completing flags, they are used as data bits.
4. Data stored from DM6144 to DM6655 cannot be changed from within the program, but can be changed by peripheral device.
5. Program and data from DM 6144 to DM 6655 are stored in the flash memory.
 
B.5. PC memory area
PLC setup area can be roughly divided into 4 categories:

1. Settings related to basic operations of PLC controller and I/O processes
2. Settings related to cycle duration
3. Settings related to interrupts
4. Settings related to communication.

Word(s)Bit(s)Function
Settings are active only upon resetting the PLC and sending data from PC to PLC
DM 660000 - 07Startup Mode. Active only if bits 08 - 15 are set to 02. 00: PROGRAM; 01: MONITOR; 02: RUN
 08 - 15Startup mode designation. 00: programming console switch; 01: proceeds in the mode last used before turning off the power; 02: settings in 00 - 07
DM 660100 - 07Not used (set to 0)
 08 - 11IOM Hold Bit (SR 25212). 0: Reset; 1: Keeps the state
 12 - 15Forced Status Hold Bit (SR 25211). 0: Reset; 1: Keeps the state
DM 660200 - 03Writing to program memory protection. 00: OFF; 01: ON (except for DM 6602)
 04 - 07Programming console display language. 00: English; 01: Japanese
 08 - 11Not used
DM 660300 - 15Not used
DM 660400 - 0700: in case of battery malfunction, error will not be generated; 01: in case of battery malfunction, error will be generated
 08 - 15Not used
DM 6605 - DM 661400 - 15Not used
Cycle Time Settings (DM 6615 - DM 6619) take effect after the transfer to PC area, next time you start working
DM 6615 - DM 661600 - 15Not used
DM 661700 - 07Servicing time for peripheral port. Active when bits 08 - 15 are set to 01. It is expressed in percentage of cycle time duration (00 to 99 (BCD))
 08 - 15Peripheral port servicing setting enable. 00: 5% of cycle duration; 01: time defined in first half of the word
DM 661800 - 07Cycle monitor time. Settings are identical to those of the second half of the previous word
 08 - 15Cycle monitor enable (Setting in 00 to 07 x unit; 99 5 max). 00:120ms (settings in bits 00-07 are disabled) ; 01: setting unit 10ms; 02: setting unit 100ms; 03: setting unit 1s
DM 661900 - 15Cycle time. 0000: variable (no minimum); 0001: up to 9999 (BCD). Minimal time is expressed in ms
Interrupt Processing (DM 6620 - DM 6639) take effect after the transfer to PC area, next time you start working
DM 662000 - 03Input constant for IR  00000 - IR 00002. 0: 0.8ms; 1: 1ms; 2: 2ms; 3: 4ms; 4: 8ms; 5: 16ms; 6: 32ms; 7: 64ms; 8: 128ms 
 04 - 07Input constant for IR  00003 and IR 00004. Settings are same as with bits 00-03
 08 - 11Input constant for IR  00005 and IR 00006. Settings are same as with bits 00-03
 12 - 15Input constant for IR  00007 and IR 00011. Settings are same as with bits 00-03
DM 662100 - 07Input constant for IR  001. 0: 0.8ms; 1: 1ms; 2: 2ms; 3: 4ms; 4: 8ms; 5: 16ms; 6: 32ms; 7: 64ms; 8: 128ms
 08 - 15Input constant for IR  002. Settings are same as with IR 001
DM 662200 - 07Input constant for IR  003. Settings are same as with IR 001
 08 - 15Input constant for IR  004. Settings are same as with IR 001
DM 662300 - 07Input constant for IR  005. Settings are same as with IR 001
 08 - 15Input constant for IR  006. Settings are same as with IR 001
DM 662400 - 07Input constant for IR  007. Settings are same as with IR 001
DM 662500 - 07Input constant for IR  008. Settings are same as with IR 001
 08 - 15Input constant for IR  009. Settings are same as with IR 001
DM 6626 - DM 662700 - 15Not used
DM 662800 - 03Interrupt enabled on IR 00000. (0: regular input; 1: interrupt input; 2: fast-reaction input)
 04 - 07Interrupt enabled on IR 00001. (0: regular input; 1: interrupt input; 2: fast-reaction input)
 08 - 11Interrupt enabled on IR 00002. (0: regular input; 1: interrupt input; 2: fast-reaction input)
 12 - 15Interrupt enabled on IR 00003. (0: regular input; 1: interrupt input; 2: fast-reaction input)
High-speed counter settings (DM 6640-DM 6644) take effect after the transfer to PC area, next time you start working
DM 6640 - DM 664100 - 15Not used
DM 664200 - 03High-speed counter mode. 0: counting up/down; 4: incremental mode
 04 - 07High-speed counter reset mode. 0: Z phase and software reset; 1: software reset only 
 08 - 15High-speed counter enable. 0: high-speed counter not used; 1: high-speed counter used with settings 00-07
DM 6643 - DM 664400 - 15Not used
 Peripheral port settings take effect after the transfer to PC area
DM 6645 - DM 664900 - 15Not used
DM 665000 - 07Port settings. 00: standard (1 start bit, even parity, 2 stop bits, 9600bps); 01: Settings in DM 6651 (settings other than this cause error and turn on AR 1302)
 08 - 11Area for 1:1 connection with a PC via peripheral port. 0: LR00-LR15
 12 - 15Modes of communication. 0: Host link; 2: one-to-one PC link (slave); 3: one-to-one PC link (master); 4: NT link (settings other than this cause error and turn on AR 1302)
DM 665100 - 07Baud rate. 00: 1200 bps; 01: 2400 bps; 02: 4800 bps; 03: 9600 bps; 04: 19200 bps
 08 - 15Frame format (Start bits/Data bits/Stop bits/Parity).      00:1/7/1/even; 01:1/7/1/odd; 02:1/7/1/none; 03:1/7/2/even; 04:1/7/2/odd; 05:1/7/2/none; 06:1/7/1/even; 07:1/7/1/odd; 08:1/7/1/none; 09:1/7/2/even; 10:1/7/2/odd; 11:1/7/2/none          (settings other than this cause error and turn on AR 1302)   
DM 665200 - 15Host Link Transmission Delay (0000 - 9999ms)                      (settings other than this cause error and turn on AR 1302)
DM 665300 - 07Host Link (00 - 31 BCD)                                                        (settings other than this cause error and turn on AR 1302)
 08 - 15Not used
DM 665400 - 15Not used
Error log settings (DM 6655) take effect after the transfer to PLC controller
DM 665500 - 03Style. 0: move after 7 records; 1: keep only first 7 (no moving);   2-F: no records
 04 - 07Not used
 08 - 11Cycle Time monitor Enable. 0: detect long cycles as non-fatal errors; 1: do not detect long cycles
 12 - 15Not used

Friday, 24 October 2014

CHAPTER 6 SYSWIN program for programming a PLC controller

   

CHAPTER 6  SYSWIN program for programming a PLC controller

Introduction
6.1 Connecting a PLC controller with a PC computer
6.2 SYSWIN program installation
6.3 Writing your first program
6.4 Saving a project
6.5 Program transfer to PLC controller
6.6 Testing program function
6.7 Interpretation of "Tools" icons
6.8 PLC controller working modes
6.9 Run mode
6.10 Monitor mode
6.11 Program-Stop mode
6.12 Program execution and monitoring
6.13 Impact on the program during monitoring
6.14 Graphic representation of dimension changes in a program

Introduction

SYSWIN is a software designed for OMRON programmable controllers class C and CV. It is designed for creating and maintaining a program, as well as for testing PLC controller function, in off-line and controller's operational regime. 
Necessary conditions for starting SYSWIN are Microsoft Windows environment on a standard IBM or 386/486 compatible or Pentium computer, with 8MB RAM at least, and 10MB free disc space. 

6.1 Connecting a PLC controller with a PC computer

PLC controller is linked with a PC computer through an RS-232 cable. One end of the cable is connected to a serial PC port (9-pin or 25-pin connector), while the other end is connected to an RS-232C connector on RS232 module of a CPM1A controller. In order to establish a connection with a PC, DIP switch on the connector must be set in "Host" position. 
 
 

6.2 SYSWIN program installation

Instruction package for CPM1A is covered by three SYSWIN installation diskettes. It can be installed in Windows 3.1, 3.11, 95, 98 or NT 4.0. In order to start the installation you need to select RUN option from a START menu.

 
A window will come up like the one below where you need to write in the file command "setup.exe". Mentioned file can be found in the installation directory of Syswin program. Following a brief installation procedure you will get a program group Syswin 3.4.
Double-click on Syswin icon starts a Syswin program which opens as in the following picture. 
 
 

6.3 Writing your first program

Writing a program begins with New Project option from a File menu. In a message window that appears you need to select options as in picture below.
 

Select a PLC controller by clicking on OK, and a program is ready to be used. It is recommended when you begin working that you write in a header a title of a program, author's name and inputs/outputs used. This may seem as a waste of time, but really isn't because this habit of writing comments will pay off in the future. 

Program written here is just a basic program made for learning Syswin. Program can detect when a key has been pressed and can activate a relay at the PLC controller output. As long as the key is pressed down, a relay is active. Operation of a relay and a key can be followed via LED diodes on PLC controller housing. Writing a program begins with a click on the first icon to the left, recognized by two vertical lines. Icon beneath this one is similar to the first but for a slash. These two icons correspond with concepts normally open and normally closed contact which all instruction lines start with. You can select an option with an open contact by clicking on the first icon. When you click on the black rectangle to the right, a small window will appear where you need to write in the address of a bit a contact relates to. 

It is very important to use addresses in a regular way when programming with SYSWIN. Addresses can have two parts, first refers to the word address, and the second to bit address in that word (both numbers must be separated by a period). For example, if address 200 is used, SYSWIN will interpret this as 2.00, and a zero bit whose word address is 2 will be called for. If you wish to access word 200 or its zero bit, you must use a call 20000, or better even 200.00. In this example address 000.00 is assigned for input address (key). This address represents a zero bit for word 000 from memory region IR. Simply said, it is an input screw terminal designated as 00 input. By connecting a key to it, and to one of the COMM terminal screws, a needed connection between PLC controller and keys is established.
 

Address dialogue box for a bit that contact refers to
When you have written in 000.00, select OK, and first segment of the program will come up. Bit address will appear above the symbol with two vertical lines which refers to this bit, and a black rectangle will move one space to the right.
 

First element of a program myprog.swp

First instructions up to the bus bar are called conditions because their execution activates instructions found to the right of the condition instructions. When a condition is entered, you also need to enter a corresponding instruction that is set off by an execution of the condition. In this example it is a relay controlled by a 00 bit in a word 010 of memory region IR. Output instructions are represented by a circle, or a circle and a line if we are dealing with a normally closed contact. By clicking on the icon with a circle, you select an output option with normally open contacts. Click on a black rectangle, and a contact window will come up where you need to write in the address for the output bit 010.00. Output of the IR region is found at address IR010, and first four bits of this word represent a relay within a PLC controller (if we are talking about a model CPM1A with relay outputs). Program done so far looks as in picture below.
     
Second element of myprog.swp program 
 
The basic functional entirety of some program is Network. Program consists of several networks found one below the other. Operations with these are found in Block option of the menu. Of all options, two basic ones, Insert network and Delete network are used the most. Other makers for PLC controllers use different concepts such as Rung instead of the term Network. Simply said, we are talking about a PLC program sequence which has one or more executing instructions, and along with END instruction can make up one correct PLC program. As the first network in a program is already in use, the next one has to be added. Adding a Network is done with Insert network command from a Block menu. 
 
 

When selecting this option, a small window appears where you need to select whether a new network will appear above or below the existing one.

 
In our case you should choose the second option and click on OK. Following this, a new network appears as in picture below.
 

Last network in every program must contain END instruction. Since this is a simple example, second network is also the last. End instruction is found among the functions. In order to come to it, you need to click on FUN icon following which a window as in picture below will come up.
 

Selecting a function by clicking on FUN icon.

END instruction can be obtained either by writing in "END" in newly obtained window or by clicking on Select which gives all PLC controller instructions sorted by the regions as in the following picture.


Selecting END instruction from a set of instructions sorted in regions.

By entering the END instruction your writing of a program is finished. Finished program looks as in the following picture.

 

Finished myprog.swp program


6.4 Saving a project

Since you've finished writing a program, you need to save a project. Select Save Project option from a File menu, and write in the file name in a message window (myprog.swp in this case). After you click on OK, project will be saved. You can access SYSWIN file contents only from SYSWIN; file type is identified by extension:

Project.swp - SYSWIN program

Project.swl- SYSWIN library

Project.swt - SYSWIN pattern

Project.swb - SYSWIN back-up file

Project.prg - PMD program


6.5 Program transfer to PLC controller

First you need to check whether PLC is connected with a PC correctly, and you'll do this by checking physical connection through a serial cable. Following this you need to select a Communication option from Project menu in order to set parameters for serial communication. Of all the parameters, the most important one to be selected is a serial port of a computer that PLC is connected to. Default settings for CPM1A are: COM1, 9600 Baud, Unit 00, protocol ASCII 7 bit Even Parity 2 stop and they need to be left so. To check how communication functions, you can click on Test PLC to test link with a PLC controller.
 

When a connection has been established, program transfer begins with a click on download from Online menu. Select expansion function or memory allocation. Before you program a PLC, it's good to erase program's memory contents. Finally, after a successful program transfer to a PLC, a message window will come up to inform us of this.


6.6 Testing program function 

Program check option from a Project menu allows testing of program function. Message that appears following a command has several options that can be selected before you run a test. Once these options have been selected, click on Execute, and a report on testing and errors will be displayed. You can further check for errors, and there is also a 'Go to Network' command which transfers you to a segment where the error was found. 

SYSWIN has classic editorial capabilities, such as Edit/Find or Edit/Replace commands. Searching through a program for assigned values or symbols is quick and offers a large number of optional filters. We can search through an entire program or its segments, and this is defined with option call. Also, there are possibilities for defining a search path, as well as for different actions when looking for a desired element.

Beside this, SYSWIN provides various advantages in situations where we need permanent archiving of user program. It is especially important to periodically print projects that are made quick and easy by SYSWIN. Projects can be printed in many different formats, and printing can include specific sections of a project. 

6.7 Meaning of "Tools" icons

SYSWIN has several types of editors among whom a relay diagram also known as relay editor, or first editor that awaits us upon starting a SYSWIN program is the most frequently used editor. 

First we need to explain tools palette (Drawing Tools) and the meaning of each icon. Aside through the usual mouse click, you can access the specific elements of this palette from a keyboard. You'll find a corresponding key of the keyboard by each icon, and you can accomplish the same action with it as you would using a mouse.

 


By clicking on the icon, we have selected a desired tool, and with a click on network section this symbol will be stored in a program. Explanation for each of the icons is given as follows:
 
Open contact icon. By clicking on this icon (or using a key '"') we enter an open contact into Network. We need to position the element we have entered at a specified place (black space). Following this, a message window where data can be entered (open contact address-number of words, bit position) is activated automatically. 
 
Closed contact icon. By clicking on this icon (or '/' on keyboard) we enter a closed contact or inverted condition into network. 
 
Horizontal line. By clicking on this icon (or using '-' on a keyboard), horizontal line is lengthened out from left to right. SYSWIN, however, retains a right to make drawn lines optimal in terms of length, or to point out possible errors. This option is used when you need to add another condition before an instruction contingent upon this condition, or when something simply can not fit. 
 
Vertical line. With a click on this icon, or use of '?', we draw vertical lines from top to bottom. This option is necessary to realize parallel connections between contacts.
 
Output instruction. This represents an instruction that is executed if condition instruction preceding it is executed. With the help of this instruction we advance a result of logical expression with output variables (bits). We can arrive to this instruction with the help of keyboard ('O' key). 
 
Inverted output instruction (shortcut-key 'Q'). Similarly to the previous case, with this executing instruction we advance a result of logical expression to an output bit, and the only difference is that this bit is turned on if a condition is not executed and vice versa. 
 
PLC functions (shortcut-key 'F'). Click on this icon accomplishes possibility of installment of complex PLC instructions into a program. Window that appears following a click on the icon contains all instructions sorted by sections. Some of these instructions are given separately as icons, and some can be accessed only through this option. One such instruction is END instruction which is used in each program. Window that comes up is displayed in the following picture.
 

When this window pops up, select an instruction and click on OK. 
 
Click on this icon (or using 'T' key) will give you an option to enter a timer into the program. Using a mouse, click on the bright area of the monitor, and a message window comes up where you can enter needed information relating to a timer (timer designation and duration in milliseconds). This way, we get a classic timer or timer with a delay when turned on. If some other version of a timer is needed, preceding FUN icon should be used, and option Timers and counters (see picture above) selected. 
 
Counter icon. Click on this icon (or 'C' key), and this will install a classic counter into a PLC program. Prior to this we enter needed information in message window: designation of the counter (CNT001 for instance) and counter value. Change of counter status (decrementing by 1) is done when an input signal (CP) changes from OFF to ON status. 
 
With this icon we can invert previously entered contact, output or input. Inversion is done so that we first click on this icon, and then on a variable whose inversion we wish to perform. 
 
Erase icon. Click on this icon and a shaded area of network erases the shaded part of the program. 

Mouse plays an important part in the SYSWIN program. Each double-click on any PLC instruction results in a corresponding editor where necessary changes can be entered. This principle is accordingly installed into SYSWIN, so double-click on block or network heading (BLOCK HEADER BAR or NETWORK HEADER BAR) gives the same results. 

6.8 PLC controller working modes

There are several ways to find out the present working mode, for example from an Online Mode menu or its display in a Toolbar. This option is accessible if communication was successfully established with a PLC controller.

If we choose a mode that differs from a present one, change of mode will be momentary. In order to avoid an accidental change of PLC controller mode, there is an option that obliges a computer to ask a question before each mode change, whether that is the option a user really wants (this option is included as default). PLC controller has three modes in class C, MONITOR, RUN and PROGRAM/STOP mode. 

6.9 RUN MODE

This PLC mode enables program to be executed as basic operation. It is used in final testing, after a program has been tested in detail, and errors have been eliminated. SYSWIN can not change memory contents of PLC controller in this mode, neither is the change of a program being executed possible. Of course, when program is finished and tested, PLC begins its new life in command closet, being first set to RUN mode. 

6.10 Monitor mode

In this mode, program execution is possible, as well as editing and monitoring during operation. This is the most frequently used mode in program development. When this mode has been selected, controller has an obligation to supply a PC with information which relates to program itself, or more precisely to status of variables in the program. If we additionally confirm Monitoring option from an Online menu, we can follow current values of variables on the monitor itself, in real time.

All changes in inputs and outputs can be viewed on the monitor, and status of variables and program locations used in the program are registered and memorized. 

6.11 Program-Stop mode

Choosing this mode simply stops a PLC controller if PLC was in RUN or MONITOR mode. It is used for data and program transfer to PLC controller. 

6.12 Program execution and monitoring

Program transferred from a PC to a PLC starts executing at the moment when you move from a Stop/Program mode to a Monitor or Run mode. When Monitoring function starts executing, some sections of the monitor will be shaded (see picture above), and this way you can follow program execution. Monitoring is active during editing of some program segment, and is stopped at the moment when a changed section of the program is transferred into a PLC controller. 

6.13 Impact on the program during monitoring

During monitoring, you can use the right button on the mouse to call up a menu of some elements of ladder diagram. Menu that appears when we click on location where address of some bit is positioned, contains the following elements:

Force Set - used for permanent forced set up of bit status to ON
Force Reset - used for permanent forced set up of bit status to OFF
Cancel - cancels out the forced status
Set (1) - used for a brief change of bit status from OFF to ON status
Reset (0) - used for a brief change of bit status from ON to OFF status
Cancel All - cancels out forced status of all bits

With the help of these options, status of bits can be changed, word contents in controller memory can also be changed, and all or some of the earlier forced settings can be cancelled out. The concept of forcing entails forced set up of some input/output to ON or OFF status for program reevaluation. At the moment when PLC leaves monitoring regime, data on forced bits and words is lost. Simultaneous forcing and evaluation of contents of a greater number of dimensions, and Data Set Bar is used for this, usually found at the bottom of the monitor (see previous picture). Editing as well as defining an area in Data Set Bar is accomplished with a double click following which a corresponding message window appears, and we write here address for the bit whose status we are following.

6.14 Graphic representation of dimension changes in a program

SYSWIN allows graphic representation of dimensions with time as abscissa. When a monitoring mode is in use, monitor display changes through time, showing changes in values of monitored dimensions. Monitor refreshment is done after a reception of each sample where sample intervals are 0,1-65.5 seconds. Graphics saved in this way can be stored for later analysis as a file, or read in an already saved file.

Procedure for starting graphic monitoring is following:

- from Editors menu select Time chart monitoring option
- from a new tools palette select Trace Configure (pictured as a key).
- Fill out message box Configure Time Chart Monitor (see next picture)
- From Online menu choose Tracing.

With Trace/Configure command adjust parameters for monitoring. Necessary parameters are Trigger or an event where saving will begin, sampling period and bits and/or words whose values we are monitoring. Mapping of a time diagram for dimensions previously specified begins after the last command.

Quitting is done with a click on a black square icon, and restarting is performed by clicking on an a red circle icon. Return to the editor with a ladder diagram by clicking on Editors menu and Program editor submenu.