lg master k training 2

111
Electro Hydraulic Automation (EHA) (+202) 4941760 4990377 Fax. (+202) 49192896 WEB. www.ehaegypt.com Mail: [email protected] ٧٤ ﻋﺼﻤﺖ ﺍﲪﺪ- ﴰﺲ ﻋﲔ ﺍﻟﻘﺎﻫﺮﺓEHA Training center LG PLC training course Level II (intermediate level)

Upload: khaled-chowdhury

Post on 14-Apr-2015

134 views

Category:

Documents


8 download

DESCRIPTION

LG Master K PLC Training 2This

TRANSCRIPT

Page 1: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

WEB. www.ehaegypt.com Mail: [email protected]

القاهرة –عني مشس - ش امحد عصمت٧٤

EHA Training center

LG PLC training course Level II (intermediate level)

Page 2: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

WEB. www.ehaegypt.com Mail: [email protected]

القاهرة –عني مشس - ش امحد عصمت٧٤

Page 3: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 3 -

Level 2 (intermediate level)

Pre-requisites : LG PLC training course I Duration : 6 days two hours per day Description : advanced PLC programming and application Technology : • LG K7M/MK-120S • PC • KGL and other appropriate Software Target audience : All person that are required to deal with PLC

circuits and PLC programming and attended LG PLC training course I.

contents : Lesson 1: • Analogue signal

• Analogue input device • Analogue output device • Number systems

Lesson 2: • Bits, bytes and words

• Memory map D,P,M as word • Mathematical operation

Lesson 3: • Direct and indirect addressing

• Analogue to digital converter • Digital to analog converter

Lesson 4: • High speed counter

• Examples Lesson 5: • HMI principles

• Connecting the plc to HMI • application

Lesson 6: • project technique using plc and HMI

together

Page 4: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 4 -

Course Philosophy: Training depends mainly on Practical applications. The course

contents are spread out over a 6-day period one lesson per day every lesson is two hours, thus allowing absorption of technical data through practical example. Training manuals are supplied to the student for future reference. Included in the course is a copy of the entire PLC and HMI reference manuals in soft copy version.

Once a student has completed the LG PLC course level II, he/she will be able to:

• Deal with analog inputs and outputs. • Be aware of analog devices. • Understand the hexadecimal numerical system. • Understand the HSC function and the operation of

incremental encoder. • Design HMI programs and connection of HMI to plc. • Able to make mathematical operations and comparison

operations.

Looking forward to having you on the course!

Page 5: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 5 -

Main Points

1.1 Analog Signal

1.2 Analog input devices

1.3 Analog Output devices

1.4 Number systems

Lesson 1 1

Page 6: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 6 -

Definitions of Analog Signal An analog signal is a continuously variable representation of a physical quantity, property, or condition such as pressure, flow, temperature, etc.

Analog Signal 1.1

Page 7: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 7 -

Analog sensors convert physical phenomena to measurable signals, typically Voltages or currents. Consider a simple temperature measuring device, there will be an increase in output voltage proportional to a temperature rise. A computer could measure the voltage, and convert it to a temperature. The basic physical phenomena typically measured with sensors include. - Angular or linear position - Acceleration - Temperature - Pressure or flow rates - Stress, strain or force - Light intensity - Sound Most of these sensors are based on subtle electrical properties of materials and devices. As a result the signals often require signal conditioners. These are often amplifiers that boost currents and voltages to larger voltages.

Analog input devices 1.2

Page 8: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 8 -

1.2.1 Angular Displacement a- Potentiometers Potentiometers measure the angular position of a shaft using a variable resistor. A potentiometer is shown in Figure The potentiometer is resistor, normally made with a thin film of resistive material. A wiper can be moved along the surface of the resistive film. As the wiper moves toward one end there will be a change in resistance proportional to the distance moved. If a voltage is applied across the resistor, the voltage at the wiper Interpolate the voltages at the ends of the resistor.

The potentiometer in Figure 23.2 is being used as a voltage divider. As the wiper rotates the output voltage will be proportional to the angle of rotation.

Page 9: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 9 -

B- Encoders See encoder &HSC chapter C-Tachometers Tachometers measure the velocity of a rotating shaft. A common technique is to mount a magnet to a rotating shaft. When the magnetic moves past a stationary pick-up coil, current is induced. For each rotation of the shaft there is a pulse in the coil, as shown in Figure. When the time between the pulses is measured the period for one rotation can be found, and the frequency calculated. This technique often requires some signal conditioning circuitry.

Another common technique uses a simple permanent magnet DC generator (Note: you can also use a small DC motor). The generator is hooked to the rotating shaft. The rotation of a shaft will induce a voltage proportional to the angular velocity. This technique Will introduce some drag into the system, and is used where efficiency is not an issue.

Page 10: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 10 -

1.2.2 Linear Position Rotational potentiometers were discussed before, but potentiometers are also available in linear/sliding form. These are capable of measuring linear displacement over long distances. Figure shows the output voltage when using the potentiometer as a voltage divider.

Page 11: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 11 -

1.2.3 Linear Variable Differential Transformers (LVDT) Linear Variable Differential Transformers (LVDTs) measure linear displacements over a limited range. The basic device is shown in Figure it consists of outer coils with an inner moving magnetic core. High frequency alternating current (AC) is applied to the center coil. This generates a magnetic field that induces a current in the two outside coils. The core will pull the magnetic field towards it, so in the figure more current will be induced in the left hand coil. The outside coils are wound in opposite directions so that when the core is in the center the induced currents cancel, and the signal out is zero (0Vac). The magnitude of the signal out voltage on either line indicates the position of the core. Near the center of motion the change in voltage is proportional to the displacement. But, further from the center the relationship becomes nonlinear.

Advantage of LVDT: Produces a higher output voltage for small changes in position

Page 12: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 12 -

1.2.4 Forces and Moments Strain Gages Strain gages measure strain in materials using the change in resistance of a wire. The wire is glued to the surface of a part, so that it undergoes the same strain as the part (at the mount point). Figure shows the basic properties of the unreformed wire. Basically, the resistance of the wire is a function of the receptivity, length, and cross sectional area.

Page 13: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 13 -

A strain gage must be small for accurate readings, so the wire is actually wound in a uniaxial or rosette pattern, as shown in Figure When using uniaxial gages the direction is important, it must be placed in the direction of the normal stress. Note: the gages cannot read shear stress. Rosette gages are less sensitive to direction, and if a shear force is present the gage will measure the resulting normal force at 45 degrees. These gauges are sold on thin films that are glued to the surface of a part. The process of mounting strain gages involves surface cleaning. Application of adhesives and soldering leads to the strain gages.

Page 14: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 14 -

A design techniques using strain gages is to design a part with a narrowed neck to mount the strain gage on, as shown in Figure In the narrow neck the strain is proportional to the load on the member, so it may be used to measure force. These parts are often called load cells.

Strain gauges are inexpensive, and can be used to measure a wide range of stresses with accuracies under 1%. Gages require calibration before each use. This often involves making a reading with no load, or a known load applied. An example application includes using strain gages to measure die forces during stamping to estimate when maintenance is needed.

Page 15: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 15 -

1.2.5 Liquids and Gases There are a number of factors to be considered when examining liquids and gasses. • Flow velocity • Density • Viscosity • Pressure There are a number of differences factors to be considered when dealing with fluids and gases. Normally a fluid is considered incompressible, while a gas normally follows the ideal gas law. Also, given sufficiently high enough temperatures, or low enough pressures a fluid can be come a liquid. PV = nRT Where, P = the gas pressure V = the volume of the gas n = the number of moles of the gas R=the ideal gas constant T = the gas temperature When flowing, the flow may be smooth, or laminar. In case of high flow rates or unrestricted flow, turbulence may result. The Reynolds's number is used to determine the transition to turbulence. The equation below is for calculation the Reynolds's number for fluid flow in a pipe. A value below 2000 will result in laminar flow. At a value of about 3000 the fluid flow will become uneven. At a value between 7000 and 8000 the flow will become turbulent.

Page 16: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 16 -

A-Pressure Figure shows different two mechanisms for pressure measurement. The Bourdon tube uses a circular pressure tube. When the pressure inside is higher than the surrounding air pressure (14.7psi approx.) the tube will straighten. A position sensor, connected to the end of the tube, will be elongated when the pressure increases.

Page 17: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 17 -

B-Venturi Valves When a flowing fluid or gas passes through a narrow pipe section (neck) the pressure drops. If there is no flow the pressure before and after the neck will be the same. The faster the fluid flow, the greater the pressure difference before and after the neck. This is known as a Venturi valve. Figure shows a Venturi valve being used to measure a fluid flow rate. The fluid flow rate will be proportional to the pressure difference before and at the neck (or after the neck) of the valve.

Venturi valves allow pressures to be read without moving parts, which makes them very reliable and durable. They work well for both fluids and gases. It is also common to use Venturi valves to generate vacuums for actuators, such as suction cups.

Page 18: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 18 -

C- Ultrasonic Flow Meter A transmitter emits a high frequency sound at point on a tube. The signal must then pass through the fluid to a detector where it is picked up. If the fluid is flowing in the same direction as the sound it will arrive sooner. If the sound is against the flow it will take longer to arrive. In a transit time flow meter two sounds are used, one traveling forward, and the other in the opposite direction. The difference in travel time for the sounds is used to determine the flow velocity. A Doppler flow meter bounces a sound wave off particle in a flow. If the particle is moving away from the emitter and detector pair, then the detected frequency will be lowered, if it is moving towards them the frequency will be higher. The transmitter and receiver have a minimal impact on the fluid flow, and therefore Don’t result in pressure drops. D- Pilot Tubes Gas flow rates can be measured using Pitot tubes, as shown in These are small tubes that project into a flow. The diameter of the tube is small (typically less than 1/8") so that it doesn’t affect the flow.

Page 19: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 19 -

1.2.6 Temperature Temperature measurements are very common with control systems. The temperature ranges are normally described with the following classifications. very low temperatures <-60 deg C - e.g. superconductors in MRI units low temperature measurement -60 to 0 deg C - e.g. freezer controls fine temperature measurements 0 to 100 deg C - e.g. environmental controls high temperature measurements <3000 deg F - e.g. metal refining/processing A- Resistive Temperature Detectors (RTDs) When a metal wire is heated the resistance increases. So, a temperature can be measured using the resistance of a wire. Resistive Temperature Detectors (RTDs) normally use a wire or film of platinum, nickel, copper or nickel-iron alloys. The metals are wound or wrapped over an insulator, and covered for protection. The resistances of these alloys are shown in Figure.

These devices have positive temperature coefficients that cause resistance to increase linearly with temperature. Platinum RTD might have a resistance of 100 ohms at 0C, which will increase by 0.4 ohms/°C. The total resistance of an RTD might double over the temperature range. A current must be passed through the RTD to measure the resistance. (Note: a voltage divider can be used to convert the resistance to a voltage.) The current through the RTD should be kept to a minimum to prevent self heating. These devices are more linear than thermocouples, and can have accuracies of 0.05%. But, they can be expensive

Page 20: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 20 -

B- Thermocouples Each metal has a natural potential level, and when two different metals touch there is a small potential difference, a voltage. (Note: when designing assemblies, dissimilar metals should not touch, this will lead to corrosion.) Thermocouples use a junction of dissimilar metals to generate a voltage proportional to temperature. This principle was discovered by T.J. Seebeck. The basic calculations for thermocouples are shown in Figure. This calculation provides the measured voltage using a reference temperature and a constant specific

The list in Table 1 shows different junction types, and the normal temperature ranges. Both thermocouples, and signal conditioners are commonly available, and relatively inexpensive. For example, most PLC vendors sell thermocouple input cards that will allow multiple inputs into the PLC.

Page 21: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 21 -

The junction where the thermocouple is connected to the measurement instrument is normally cooled to reduce the thermocouple effects at those junctions. When using a thermocouple for precision measurement, a second thermocouple can be kept at a known temperature for reference. A series of thermocouples connected

Page 22: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 22 -

together in series produces a higher voltage and is called a thermopile. Readings can approach an accuracy of 0.5%. C- Thermistors Thermistors are non-linear devices; their resistance will decrease with an increase in temperature. (Note: this is because the extra heat reduces electron mobility in the semiconductor.) The resistance can change by more than 1000 times. The basic calculation is shown in Figure often metal oxide semiconductors the calculation uses a reference temperature and resistance, with a constant for the device, to predict the resistance at another temperature. The expression can be rearranged to calculate the temperature given the resistance.

Page 23: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 23 -

1.2.7 Chemical A-pH The pH of an ionic fluid can be measured over the range from a strong base (alkaline) with pH=14, to a neutral value, pH=7, to a strong acid, pH=0. These measurements are normally made with electrodes that are in direct contact with the fluids. B-Conductivity

Conductivity of a material, often a liquid is often used to detect impurities. This can be measured directly be applying a voltage across two plates submerged in the liquid and measuring the current. A high frequency inductive field is another alternative.

Page 24: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 24 -

Analog output devices are like analog input devices where it takes an analog signal may be voltage or current, where the effect of the output varies according the value of the output signal.

Example: -proportional valves. -Speed reference for ac inverter or dc converter.

Analogue Output devices 1.3

Page 25: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 25 -

People were always difficult to except the fact that something is

different from themselves or their way of thinking. It is probably one of the reasons why numerical systems other than decimal are hard to understand. Still, whether we like it or not, reality is quite different. Decimal system used in everyday life is by far less used than binary code, which is the working base for millions of computers across the world. 1.4.1-Decimal numerical system:

Decimal numerical system is defined with its base 10 and decimal positioning from right to left, and it consists of digits 0, 1, 2,3,4,5,6,7,8 and 9. This means that the rightmost digit is multiplied by 1 in total sum; next digit to it is multiplied by 10, next one by 100, etc. Example:

Operations of addition, subtraction, division and multiplication in decimal numerical system are well known, so we will not detail these.

Number systems 1.4

Page 26: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 26 -

1.4.2-Binary numerical system Binary numerical system is quite different from the decimal that we got used to in common life. Its base is 2 and each digit can have one of two values, “1” or “0”. Binary numerical system is used for computers and microcontrollers, because it is much easier for processing than decimal. Usually, binary number consists of 8, 16 or 32 binary digits. Origins of this division are irrelevant for this course, so we will just take it for granted. Example: 10011011 - Binary number with 8 digits Example: 24-1 = 16 - 1 = 15 So, 4 binary digits cover decimal values from 0 to 15, including the values “0” and “15”, which is 16 different values.

Arithmetical operations that exist in decimal numerical system also apply in binary system. In this chapter, we will cover only addition and subtraction, for simplicity sake.

Page 27: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 27 -

Basic rules that apply to binary addition are:

Addition works similar to decimal numerical system - we add the digits of the same weight. If both digits added are zero, the result remains zero, while “0” and “1” total “1”. Two ones give zero, but one is carried to the left position.

We can do the check by converting these numbers to decimal system and adding them. Value of the first number is 10, value of the second is 9 and 19 as result, which means that operation was done correctly. Problem occurs when the result is greater than can be represented with given number of binary digits. There are various solutions, one of them being expanding the number of binary digits like in the example below

Subtraction works on the same principles as addition does. Two zeros give zero in result, as do two ones, while subtraction of one from zero requires borrowing one from the higher position in binary number.

Example:

Conversion of numbers to decimal system gives as values 10 and 9, with the result of subtraction of 1, which is correct.

Page 28: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 28 -

1.4.3-Hexadecimal numerical system

Hexadecimal numerical system has number 16 for basis. Therefore, there are 16 different digits used in this system. These are “0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F”. Letters A, B, C, D, E and F represent values 10, 11, 12, 13, 14, 15 and are used for the sake of easier notation. As with binary numerical system, we can apply the same formula here for determining the greatest decimal number that can be represented with a given number of hexadecimal digits. Example: 162 - 1 = 256 - 1 = 255 Usually, hexadecimal numbers have prefix “$” or “0x” to emphasize the fact that hexadecimal system is used. Thus, number A37E should be represented with $A37E or 0xA37E. No calculations are needed for converting the hexadecimal number to binary system - it is simple substituting of hexadecimal digits with binary ones. Since maximum value of hexadecimal digit is 15, 4 binary digits are required per one hexadecimal. Example: Check, i.e. converting both numbers to decimal system, gives us value 228 which is correct. In order to calculate decimal equivalent of hexadecimal number, each digit of number should be multiplied by 16 raised to power equal to the position in the number and then added altogether.

Page 29: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 29 -

`Addition works similar to two previous numerical systems.

Example: It is required to add the appropriate digits of a number, and if their sum equals 16, that position takes value “0”. Values exceeding 16 should be added to the sum of digits on higher position. First number converted equals 14891, while other is 43457. Their sum is 58348, which is $E3EC converted to decimal numerical system. Subtraction works identically to previously mentioned systems.

Example: Conversion gives us numbers 11590 and 5970, and the result of subtractions is 5620, that is $15F4 converted to decimal numerical system. Conclusion Binary numerical system remains the most commonly used, decimal system the most intelligible, while hexadecimal is somewhere in between. Its simple conversion to binary system makes it, besides binary and decimal, the most important numerical system to us.

Page 30: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 30 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Page 31: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 31 -

Main Points

2.1 Bits, bytes and words

2.2 Memory map D,P,M as word

2.3 Mathematical operation

Lesson 2 2

Page 32: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 32 -

Definitions:

Bit

A bit is the smallest unit of information on a machine. This term was first used in 1946 by John Tukey, a leading statistician and adviser to five presidents. A single bit can hold only one of two values: 0 or 1. More meaningful information is obtained by combining consecutive bits into larger units. For example, a byte is composed of 8 consecutive bits.

The Nibble

A nibble is a collection of bits on a 4-bit boundary. It wouldn't be a particularly interesting data structure except for two items: BCD (binary coded decimal) numbers and hexadecimal (base 16) numbers. It takes four bits to represent a single BCD or hexadecimal digit.

With a nibble, we can represent up to 16 distinct values. In the case of hexadecimal numbers, the values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F are represented with four bits. BCD uses ten different digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) and requires four bits. In fact, any sixteen distinct values can be represented with a nibble, but hexadecimal and BCD digits are the primary items we can represent with a single nibble.

b3 b2 b1 b0

The Byte

The byte is a collection of 8 bits

The Word

The word is a group of 16 bits. We will number the bits in a word starting from bit zero (b0) through fifteen (b15) as follows:

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0

Like the byte, bit 0 is the LSB and bit 15 is the MSB. When referencing the other bits in a word use their bit position number.

Bits, bytes and words 2.1

Page 33: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 33 -

Notice that a word contains exactly two bytes. Bits b0 through b7 form the low order byte, bits 8 through 15 form the high order byte. Naturally, a word may be further broken down into four nibbles. Nibble zero is the low order nibble in the word and nibble three is the high order nibble of the word. The other two nibbles are "nibble one" or "nibble two".

With 16 bits, you can represent 2^16 (65,536) different values. These could be the unsigned numeric values in the range of 0 => 65,535, signed numeric values in the range of -32,768 => +32,767 or any other data type with no more than 65,536 values. The three major uses for words are

1. 16-bit integer data values 2. 16-bit memory addresses 3. any number system requiring 16 bits or less

The Double Word A double word is exactly what its name implies, two words. Therefore, a double word quantity is 32 bits. Naturally, this double word can be divided into a high order word and a low order word, four bytes, or eight nibbles. Double words can represent all kinds of different data. It may be

1. an unsigned double word in the range of 0 => 4,294,967,295, 2. a signed double word in the range -2,147,483,648 =>

2,147,483,647, 3. a 32-bit floating point value 4. any data that requires 32 bits or less

- can deal with LG MK PLC data registers as words or as bits - as we know the LG plc data memory is divided into the devices:

p ,m ,k ,l ,f ,t ,c ,s ,d. we can use(p , m, k , l) as bits or as word ,that’s mean that there are a word named m10 and there are a bit named m10 as appear in the figure

The word Mxx

Bit Mxx0 Bit Mxx1 Bit Mxxf

Page 34: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 34 -

I can deal with s, contacts of timers T, contacts of counters C and some of F device as bits. I can deal with d and coil of timers, coil of timers and some of F devices as words only Device D There are 5000 word of d device from d0 to d4500 are read/write data registers. From d4501 to d5000 are special registers that user can read them only.

Page 35: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 35 -

To study PLC you must know the memory mapping of the data memory of this PLC, the PLC data memory is divided into several parts , every part have a name & special specifications , these parts called devices .

D DATA REGISTER D device refer to data register (i.e. the store which you can store data in) can be used with timers counters NOTE: No. of data register limited to PLC type for example there are 5000 data registers at master k 120s

M AUXILIARY RELAY (MARKERS) This device is not real input and not real outputs, you can only write in and read these bits using software instructions it is usually used to internal buffer bit calculation . EXAMLPE: M0 internal imagine input or output in plc. NOTE: no. of points (Mxx) limited to plc software point no.(s) for example for master k120s from M000 to M191F (191*16= 3056 marker)

Memory map D,P,M as word 2.2

Page 36: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 36 -

P INPUT & OUTPUT IMAGE This device for real input and real outputs only, you can change this device status (write in these bits) using hardware, if you put 24v on p0 input, the bit of p0 get high (on) EXAMLPE: P0- input for point labeled 0 on plc.

P40 output for point labeled 40 on plc. NOTE: No. of points (pxx) limited to plc point no.(s)

Page 37: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 37 -

Let's now look at using some basic math functions on our data. Many times in our applications we must execute some type of mathematical formula on our data. It's a rare occurrence when our data is actually exactly what we needed.

As an example, let's say we are manufacturing widgets. We don't want to display the total number we've made today, but rather we want to display how many more we need to make today to meet our quota. Let's say our quota for today is 1000 pieces. We'll say X is our current production. Therefore, we can figure that 1000-X=widgets left to make. To implement this formula we obviously need some math capability.

In general, MK PLCs almost always include these math functions:

• Addition- The capability to add one piece of data to another. It is commonly called ADD.

• Subtraction- The capability to subtract one piece of data from another. It is commonly called SUB.

• Multiplication- The capability to multiply one piece of data by another. It is commonly called MUL.

• Division- The capability to divide one piece of data from another. It is commonly called DIV.

LG MK PLC’s math instructions ask us for a few key pieces of information.

• Source A- This is the address of the first piece of data we will use in our formula. In other words it's the location in memory of where the first "number" is that we use in the formula.

• Source B- This is the address of the second piece of data we will use in our formula. In other words it's the location in memory of where the second "number" is that we use in the formula. -NOTE: typically we can only work with 2 pieces of data at a time. In other words we can't work directly with a formula like 1+2+3. We would have to break it up into pieces. Like 1+2=X then X+3= our result.

Mathematical operation 2.3

Page 38: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 38 -

• Destination- This is the address where the result of our formula will be put. For example, if 1+2=3, (I hope it still does!), the 3 would automatically be put into this destination memory location.

ADD symbol

The instructions above typically have a symbol that looks like that shown above. Of course, the word ADD would be replaced by SUB, MUL, DIV, etc. In this symbol, the source A is D30, the source B is constant (100) and the destination is d40.

Therefore, the formula is simply whatever value is in D30 + 1000 the result is automatically stored into D40.

Shown above is how to use math functions on a ladder diagram. Please note that once again we are using a one-shot instruction (D instruction). As we've seen before, this is because if we didn't use it we would execute the formula on every scan. Odds are good that we'd only want to execute the function one time when input P3 becomes true. If we had previously put the number 100 into D100 and 200 into D102, the number 300 would be stored in D110.(i.e. 100+200=300, right??)

What would happen if we had a result that was greater than the value that could be stored in a memory location?

Typically the memory locations are 16-bit locations. In plain words this means that if the number is greater than 65535 (2^16=65536) it is too big to fit. Then we get what's called an overflow. Typically the plc turns on an internal relay that tells us an overflow has happened. The result value will be more than 16 bit number this the plc will deal with this data as if it is 32 bit data, the low 16 bit will be stored into the destination address and the higher 16 bit will be stored in the data register after the destination data register for example if the destination is d110 then the lower 16 bit (word) will be stored in d110, the upper 16 bit (word) will be stored in d111,

Page 39: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 39 -

Hint:

If the math operation result is less than 65536 then the result will be stored in the destination (d110 for example) and 0 will be stored in the data register after the destination (d111)

Math operations 1- Addition The add instruction have the form Add oper1 oper2 oper3 As oper1: constant or word device oper2: constant or word device oper3: word device This expression mean oper3 = oper1+oper2 Example

IF P0 pressed put in p5 the data in d30 plus 100 (P5=d30+100) If d30 has 200, then p5 equal 300. 2- Subtractions The Subtractions have the form Sub oper1 oper2 oper3 As oper1: constant or word device oper2: constant or word device oper3: word device This expression mean oper3 = oper1-oper2 3- multiplication The mul instruction has the form mul oper1 oper2 oper3 As oper1: constant or word device oper2: constant or word device oper3: word device This expression mean oper3 = oper1*oper2

Page 40: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 40 -

4- Division instruction The div instruction has the form Dev oper1 oper2 oper3 As oper1: constant or word device oper2: constant or word device oper3: word device This expression mean oper3 = oper1/oper2 Notes: The word is a collection of 16 bit you can save a number in it from 0 to 65535 If you want to deal with a number more than 65535 (1111111111111111b or ffff h) Then you will need to deal with double word The double word is a collection of 32 bit then the number i can save in this device will variant from 0 to 4294967295 (11111111111111111111111111111111b or ffffffff h ) You can apply mov &math operations on double words , but in this case you will use instructions dmov , dadd ,dsub ,ddiv , dmul instead of mov , add , sub , mul , div If you use this operation dadd d10 d15 d100 Then the data in 32 bit of d10, d11 will added on d15, d16 and the result will be saved in d100, d101

5-Compare operations It is very important thing in plc programming to know the relations of data. Example: You want to monitor the temperature in particular system, you want to out alarm (output P40) if the temp reach 100 degree, you can’t do this operation without using compare instructions Compare instructions 1- > oper 1 oper2 This instruction will connect if oper1>oper2 As oper1: constant or word device oper2: constant or word device

Page 41: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 41 -

Example

P40 will be on if data in d0 more than 100 2- < oper1 oper2 This instruction will connect if oper1>oper2 As oper1: constant or word device oper2: constant or word device By the way use instructions = oper1 oper2, >= oper1 oper2 , <= oper1 oper2

Page 42: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 42 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Page 43: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 43 -

Main Points

3.1 Direct and indirect addressing

3.2 Analogue to digital converter

3.3 Digital to analog converter

Lesson 3 3

Page 44: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 44 -

3.1.1 Direct addressing The D area is used to store numeric data. Each data register consists of 16 bits (1 word) which Is the unit of data read and write? The data resister number designated by the double-word instruction holds the lower 16 bits and the designated data register number + 1 holds the higher 16 bits. 3.1.2 Indirect addressing #D is used for indirect addressing of the D area. The contained value of data register assigned with ‘#’ symbol points the real address of data register at which the result of operation is stored. If #D is used with a double-word instruction, the lower 16 bits will stored at the data resister number designated by the contained value of #D, and higher 16 bits will stored at the data Resister number + 1.

Direct and indirect addressing 3.1

Page 45: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 45 -

Analog input Example: Variable resistor Load cell Pressure transducer

Analog output Example: proportional valves Speed ref. REMARK PLC converting these signals according to its (PLC) resolution (I.e. if the resolution is 12 bit (k80, k120, k200), so plc will converting these value from -48: 4047, and if the resolution is 14 bit (K300) the conversion will be from 0:16000

ANALOG I/Os 3.2

Page 46: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 46 -

Here we can connect up to three analog unit These units may be Analog input current /volt 4 channel Analog output volt 4 channel Analog output current 4 channel Analog input/output 2/1 channel RTD 4 channel

ANALOG I/O IN K120S 3.3

Page 47: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 47 -

THE ADRESSES The special module and allocated data registers are as followings.

Item

Combination module A/D

Conversion module

D/A Conversion module Analog timer

RTD input module

Data Register

Expansion G7F-ADHA

2input 1 output

G7F-ADHB 2 input 2 output

G7F-AD2A 4 input current/volt

G7F-DA2I 4 output current

G7F-DA2V 4 output volt

G7F-AT2A Analog timer

G7F-RD2A RTD

D4980 CH0

A/D value CH0

A/D value CH0

A/D value CH0

D/A value CH0

D/A value CH0

A/T value CH0

Temperature

D4981 CH1

A/D value CH1

A/D value CH1

A/D value CH1

D/A value CH1

D/A value CH1

A/T value CH1

temperature

D4982 CH0

D/A value CH0

D/A value CH2

A/D value CH2

D/A value CH2

D/A value CH2

A/T value CH2

temperature

D4983

#1

- CH1

D/A value CH3

A/D value CH3

D/A value CH3

D/A value CH3

A/T value CH3

temperature

D4984 CH0

A/D value CH0

A/D value CH0

A/D value CH0

D/A value CH0

D/A value CH0

A/T value CH0

temperature

D4985 CH1

A/D value CH1

A/D value CH1

A/D value CH1

D/A value CH1

D/A value CH1

A/T value CH1

temperature

D4986 CH0

D/A value CH0

D/A value CH2

A/D value CH2

D/A value CH2

D/A value CH2

A/T value CH2

temperature

D4987

#2

- CH1

D/A value CH3

A/D value CH3

D/A value CH3

D/A value CH3

A/T value CH3

temperature

D4988 CH0

A/D value CH0

A/D value CH0

A/D value CH0

D/A value CH0

D/A value CH0

A/T value CH0

temperature

D4989 CH1

A/D value CH1

A/D value CH1

A/D value CH1

D/A value CH1

D/A value CH1

A/T value CH1

temperature

D4990 CH0

D/A value CH0

D/A value CH2

A/D value CH2

D/A value CH2

D/A value CH2

A/T value CH2

temperature

D4991

#3

- CH1

D/A value CH3

A/D value CH3

D/A value CH3

D/A value CH3

A/T value CH3

temperature

Page 48: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 48 -

ANALOG I/OS IN K80S 3.4

Page 49: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 49 -

SOFTWARE In software we can easily defined the expansion analog unit FOR EXAMPLE: The first analog unit is mixing unit (two input analog and one analog output) the two analog input are current from 0 to 20mA and the output analog is volt from 0 to 10 V The second analog unit is analog input unit (4 channels) every channel can be defined , the first two inputs are volt from 0 to 10V, 3rd and 4th are currents from 0 to 20 mA.

Page 50: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 50 -

The Address For mixing analog unit:

Special data register Explanation Remark

D4980 A/D conversion value

of channel 0 stores

D4981 A/D conversion value of channel 1 stores

D4982 D/A conversion value

set

A/D D/A conversion module

#1

D4983 A/D conversion value of channel 0 stores

D4984 A/D conversion value of channel 1 stores

D4985 D/A conversion value

set

A/D D/A conversion module

#2

Page 51: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 51 -

Page 52: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 52 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Page 53: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 53 -

Main Points

4.1 Introduction to encoder

4.2 High speed counter

Lesson 4 4

Page 54: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 54 -

Encoders divided mainly to 1-Incermental encoders This type encodes motor revolution into pulses. 2-Absolute encoders This type encoding motor revolution into degrees

Introduction to encoder 4.1

Page 55: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 55 -

Encoder consists of three main parts 1. Perforated disc 2. Lighting source 3. Sensitive device for lighting perforated disc position is between lighting source (which is down) and sensitive device for lighting (which is up) and this disc coupled with motor, so when disc rotate sensitive device for lighting will be ON when it facing the lighting source (pulse come) and when sensitive device for lighting facing black area it will be OFF and so on No. of pulses per revolution depend on no. of holes in disc (encoder resolution) ENCODER WIRING Encoder mainly has 8 terminals 1. Phase A 2. Phase A' (Inverse of A) 3. Phase B 4. Phase B (Inverse of B) 5. Z comes one pulse per revolution 6. Z'(Inverse of Z) 7. 0 VDC 8. 24 VDC

Incremental encoders theory 4.1

Sensitive device for lighting Holes Lighting source Black area

Page 56: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 56 -

CONNECTED WIRES TO PLC The connected wires are PHASE A, PHASE B We can connect phase A and phase B (both of them when we need two direction) or phase A only When we need one direction. HOW PLC READ ENCODER 1-hardware: PLC must support high speed counter (encoder is a very high pulse generator, so it needs special inputs) 2-software preparation: Some orders to plc to prepare the plc to read the encoder this software order differ from PLC type to other.

High speed counter 4.2

Page 57: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 57 -

This topic describes the specification, handling, and programming of built-in high speed counter of MASTER-K120S. The built-in high speed counter of MASTER-K120S (here after called HSC) has the following features;

Function Description

Counter format

• Linear counter: Up/Down counter. Counting range is from -2,147,483,648

to 2,147,483,647 • Ring counter : Counter value rotates

from 0 to (set value-1)

Counter mode

4 counter functions as followings • 1-phase operation mode

• 1-phase pulse + direction mode : Up / down is selected by direction pulse

• 2-phase CW/CCW mode : Up / down is selected by CW or CCW pulse input • 2-phase multiplication mode : Up / down is automatically selected by the

phase difference between A-phase and

B.(multiplied by 4) Preset

function Change current value to preset value.

Latch counter

Latches current value.

Comparison output

When current value is equal to comparison value, turns on the output contact points or executes interrupt

program

Additional function

RPM function

Calculate the RPM(Rotates Per Minute) of input pulse

High speed counter For K120S 4.3

Page 58: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 58 -

These parameters could be set from parameter window as follow:

Page 59: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 59 -

4.3.1)Performance Specifications

4.3.2) Input specification

Items Specifications Items Specifications Rated input

24VDC (7mA) Rated input

24VDC (7mA)

On voltage

20.4 ~ 28.8VDC

On voltage

20.4 ~ 28.8VDC

Off voltage

6VDC or lower

On delay time

200 U SEC or lower

A / B phase

Off voltage

6VDC or lower

Preset input

Off delay time

200 U SEC or lower

Items Specifications Points 1 phase : 4 points, 2 Phase : 2 points Input types A-Phase, B-Phase, Preset input

Counting ranges from -2,147,483,648 to 2,147,483,647(Binary 32 bits)

Max. counting speed

1-phase 100kHz/ 2-phase 50kHz ( Ch0, Ch1) 1-phase 20kHz/ 2-phase 10kHz ( Ch2, Ch3)

1-phase Up counter 1-phase Pulse + direction input

A-Phase : Input pulse, B-Phase : Direction pulse

2-phase CW/CCW mode

A-Phase : Up counting pulse, B-Phase : Down counting pulse

Up / Down selection

2-phase multiplication mode

Auto-select by phase difference of A-phase and B

Additional function Ring counter, Latch counter, Preset, Comparison output, RPM function

Page 60: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 60 -

4.3.3) Names of wiring terminals

Names Usage No.

Terminal No. 1Phase 2Phase 1Phase 2Phase

1 P00

Ch0 Input Ch0 A Phase

Input

Counter input

terminal

A Phase Input

terminal

2 P01

Ch1 Input Ch0 B Phase

Input

Counter input

terminal

B Phase Input

terminal

3 P02

Ch2 Input Ch2 A Phase

Input

Counter input

terminal

A Phase Input

terminal

4 P03

Ch3 Input Ch2 B Phase

Input

Counter input

terminal

B Phase Input

terminal

5 P04 Ch0

Preset 24V

Ch0 Preset 24V Preset input

terminal

Preset input

terminal

6 P05 Ch1

Preset 24V

- Preset input

terminal -

7 P06 Ch2

Preset 24V

Ch2 Preset 24V Preset input

terminal

Preset input

terminal

8 P07 Ch3

Preset 24V

- Preset input

terminal -

9 COM

0 Input Common Input common terminal

Page 61: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 61 -

4.3.4) External interface circuit

4.3.5) Wiring instructions A high speed pulse input is sensitive to the external noise and should be handled with special care. When wiring the built-in high speed counter of MASTER-K120S, take the following precautions against wiring noise. (1) Be sure to use shielded twisted pair cables. Also provide Class 3 grounding. (2) Do not run a twisted pair cable in parallel with power cables or other I/O lines which may generate noise. (3) Before applying a power source for pulse generator, be sure to use a noise protected power supply.

Page 62: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 62 -

(4) For 1-phase input, connect the count input signal only to the phase an input; for 2-phase input, connect to phases A and B 4.3.6) Wiring example (1) Voltage output pulse generator

Pulse Generator

CHSC

A

B

COM

24V

24VG

(2) Open collector output pulse generator

Pulse Generator

CHSC

A

B

COM

24V

24VG

Page 63: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 63 -

4.3.7) Instruction (HSCST)

Flag set Designation

S Channel which is

designated at parameter(0~3)

SV

Set value (binary 32 bits)

Range : (-2,147,483,648 ~ 2,147,483,647)

Error

(F110)

Error flag turns on when designating area is over

CV

Current value of HSC stored area

(a) Functions • When input condition turns on, corresponding high speed counter is enabled. • When input condition turns off, high speed counter stop counting and turns output point off. The current Value is retained. • The high speed counter can counts from -2,147,483,648 to 2,147,483,647(binary 32bits). • When current value is greater than set value, output point F17*(* is channel number) turns on and it turns off when current value is less than set value. • If current value is greater than 2,147,483,647, carry flag F18* turns on and it turns off when input condition turns off If HSC designated as ring counter, Carry flag is set when current value reaches set value. • If current value is smaller than -2,147,483,648, borrow flag F19* Turns on and turns off when input condition turns off if designated as ring counter, if current value is 0, borrow flag is set at next pulse’s rising edge and current value goes ‘set value –1’ (in down counter mode).

Page 64: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 64 -

(b) Error code

Code Error Corrective Actions

H’10 Mode setting error When Ch0 is set as 2-Phase, Ch 1

can’t be used and Ch3 can’t be Used if Ch2 is set to 2-Phase.

H’11 Ring counter setting error

Adjust the range of ring counter within 2 ~ 2,147,483,647.

H’12 SV2 setting error Set SV2 greater than SV1 if zone

comparison set is selected.

H’13 Ring counter and SV2 setting error

Adjust the range of ring counter within 2 ~ 2,147,483,647 Set SV2

greater than SV1if zone comparison set is selected

(c) Parameter Setting (1) Format setting

(a) Linear counter If HSC is designate as linear counter, it can counts from -2,147,483,648 to 2,147,483,647. The carry flag F18*(* is channel number) turns on when the current value of high speed counter is overflow during up counting and HSC stop counting. The borrow flag F19*(* is channel number) turns on when the current value of high speed counter is underflow during down counting and HSC stop counting. Carry and borrow flags can be reset by preset operation and HSC can re-starts its operation.

Page 65: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 65 -

(b) Ring counter

• If HSC is designate as Ring counter, it can counts from 0 to set value. • The carry flag turns on when the current value of high speed counter reaches set value during up counting and current value is changed to 0. • The borrow flag turns on when the current value of high speed counter is reaches 0 during down counting and current value is changed to ‘set value –1’. • When set value is out of range (2 ~ 2,147,483,647), Ring counter setting error (h’11) occurs and HSC operates as linear counter. • When current value is changed to out of range (2 ~ 2,147,483,647) by preset operation, Ring counter setting error (h’11) occurs and HSC operates as linear counter. • The ring counter setting error can be corrected by re-start of instruction (HSCST) only.

Increasing Decreasing

Borrow occurs

0

Current value

-

Increasing Decreasing

Carry occurs

Borrow occurs

0

Current value

Page 66: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 66 -

(2) Mode setting

(A) 1-phase operation mode Current value increases by 1 at the rising edge of input pulse.

(B) 1-phase pulse + direction mode Current value increases by 1 at the rising edge of A-Phase pulse when B-phase is ‘low’ state. Current value decreases by 1 at the rising edge of A-Phase pulse when A- phase is ‘High’ state.

A-phase input l

Current value 1 2 3 4 5

B-phase input

Current value

A-phase input

Low High

Page 67: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 67 -

(C) 2-phase CW/CCW mode Current value increases by 1 at the rising edge of A-Phase pulse when B-phase is ‘low’ state. Current value increases by 1 at the rising edge of B-Phase pulse when A-phase is ‘low’ state.

(D) 2-phase multiplication mode (MUL4)

Up or down is set automatically by the phase difference between A and B phase. • Up counter - At the rising edge of A-Phase pulse when B-phase is ‘low’. - At the falling edge of A-Phase pulse when B-phase is ‘high’. - At the rising edge of B-Phase pulse when A-phase is ‘high’. - At the falling edge of B-Phase pulse when A-phase is ‘low’. • Down counter - At the rising edge of A-Phase pulse when B-phase is ‘high’. - At the falling edge of A-Phase pulse when B-phase is ‘low’. - At the rising edge of B-Phase pulse when A-phase is ‘low’. - At the falling edge of B-Phase pulse when A-phase is ‘high’.

B-phase input

Current value

A-phase input

10 11 12 13 14 15 16 17 18 17 16 15 14 13

B-phase input

Current value

A-phase input

Page 68: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 68 -

(4) Preset setting

(a) Internal Preset Set internal preset area and preset value. Current value of high speed counter is replaced with preset value at the rising edge of internal preset device. (b) External Preset Set external preset area and preset value. External devices are fixed as following Ch0: P4, Ch1: P5, Ch2: P6, Ch3: P7Current value of high speed counter is replaced with preset value at the rising edge of external preset device.

(5) Latch counter setting If this function is enabled, Current value of high speed counter is always retained. - When power supply is off. - When is ‘Stop’ or ‘Pause?’ - When input condition of ‘HSCST’ is off

Page 69: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 69 -

(6) Comparison Output setting (a) Comparison set When current value of HSC is equal to SV1, corresponding output point turns on. P40 ~ P47 are available for comparison output point

b) Zone Comparison Set When current value of HSC isn’t less than SV1 and more than SV2; Corresponding output point turns on. P40 ~ P47 are available for comparison output point. If SV2 is less than SV1, SV2 setting error (h’12) occurs and zone comparison set is disabled.

Latches CV

0

Current value

Time Latches CV

Current value

Output Contact

Input pulse

98 99 100 101 102

Page 70: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 70 -

(c) Comparison Task If Comparison Task is selected in parameter window, corresponding interrupts is enabled. When current value of HSC is equal to SV1, corresponding interrupt program is executed. For the details about programming, refer to ‘KGLWIN User’s Manual’.

Current value

Input pulse

999 1000 2000 2001

Output point

Page 71: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 71 -

(7) RPM setting - Can calculates RPM of input pulse - RPM is stored in designated device.

- The RPM is expressed as:

cycle[ms]refresh rotateper Pulses60,000Value)Last -Value(Current RPM

××

=

(a) Examples of Program Refresh cycle: 1000ms, Pulses per rotate: 60, RPM save area: D0

a) Last value = 500(Assumption), Current value = 1000 RPM = {(1000 – 500) * 60,000} / {60 * 1000} = 500 b) Last value = 1000, Current value = 2000 RPM = {(2000 – 1000) * 60,000} / {60 * 1000} = 1000 c) Last value = 2000, Current value = 4000 RPM = {(4000 – 2000) * 60,000} / {60 * 1000} = 2000

1000ms 2000ms 3000MS ⓐ 500 ⓑ 1000 ⓒ 2000

Current value

Time

Input pulse

D0, D1

1000 2000 2001 4000

Page 72: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 72 -

8) Programming example

(1) Parameter setting • Channel: Ch0 • Counter format: Ring counter (0 ~ 100,000) • Counter mode: 2-phase multiplication mode P0: A-phase pulse input, P1: B-phase pulse input • Preset - Preset type: internal preset (M100) - Preset value: 0 • Last counter setting - None • Comparison output - Output mode: Zone comparison set - SV1: 10,000 SV2: 20,000 - Output point: P43 • RPM setting - Refresh cycle: 100(*10ms) - Pulses per rotate: 60 - RPM save area: D100 (2) Programming • When M0 turns on, HSC starts its operation • If current value is not less than 50,000, F170 turns on. • Current value is saved in D0 (double word).

Remark

The contact point which is designated as HSC input can’t be used for pulse catch or external interrupt. Duplicated designation may cause faults.

Page 73: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 73 -

Page 74: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 74 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Page 75: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 75 -

Main Points

5.1 HMI principles

5.2 Connecting the plc to HMI

5.3 Application

Lesson 5 5

Page 76: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 76 -

5.1.1 Main screen of Panel Editor The Panel Editor consists of four windows and functions of them are as follows:

HMI PRINCIPLES 5.1

Page 77: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 77 -

Menu and toolbar window This window contains various menus and toolbar.

Screen editing window This window displays a practical editing screen

Screen selection window You can select screen to edit from this windows Properties window This window is a window designating properties of various tags. Window configuration is changed according to the tag’s kind.

Page 78: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 78 -

5.1.2 Tag menu The following explains about various tags. XGT-Panel supports 15 kinds of tags. There are some differences in properties of tags according to PLC type to connect, and the example of this manual is the case of MASTER-K series

Selection

Selects tags on screen to edit. Digit tag ( )

Displays a device value of PLC or writes value to device

Page 79: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 79 -

< Properties of Digit tag >

1) Location

Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) Relocating by mouse drag is available. 2) Effect (1) Small font: Changes the size of character to 6 x 8 dots. Default si

ze is 8 x 16 dots. (2) Double: Changes the size of character to 16 x 32 dots. (3) Reverse: Reverses the tag's color. 3) Address S Area • specifies to a system memory of XGT Panel. • A system memory is the memory to be provided to the user, And allows user to use as user memory or as system flags • The size of system memory is 1,000 Word (0~999), and you can Use 900 Word (0~899) as user memory area. The remains are system flag area. A latch area can be set in case of

B type. • Refer to chapter 6.8.3 Parameter in user's manual for details. And r

efer to appendix for details about system flags. • Click , then the following window appears and can input an addres

s or system flag.

Page 80: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 80 -

② Ch 1 • Specify the channel as Ch 1(RS-232C). • Click , then the following window appears and can in Put an address to read.

③ Ch 2 • Specify the channel as Ch 2(RS-422/485). • Click , then the following window appears and can in Put an address to read.

(2) Station: Specifies a station number to connect.

•.enabled when channel is specified as Ch.1 or Ch.2 4) Data

(1) Write enable: Enables Write action of tag by key input •. If the SET key of XGT Panel is pushed, a cursor appears On the tag which [Write Enable] is specified? •. The cursor moves in order from a left upside to right Downside direction whenever SET KEY is pushed. •. Change the value of the tag which is focused currently by Direction keys •. When the ENT Key is pressed, XGT-Panel writes the input

value to PLC.

Page 81: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 81 -

•. Does not operate if the input value is not correct (2) Sign: Enables tag to display a negative number.

•. Checkbox is enabled when a display format is DEC (3) Use password: If this option is specified to tag, the Write Action is disabled until password is unlocked.

•. Checkbox is enabled when [Write Enable] is permitted (4) Max. : Specifies the maximum value which is available to

input. • Edit box is enabled when [Write Enable] is permitted • A larger value than specified Max.Value can not be written to

PLC. Refer to following table for details. (5) Min: Specifies the minimum value which is available to input.

•. Edit box is enabled when [Write Enable] is permitted •. A smaller value than specified Min.Value can not be written

to PLC. Refer to following table for details. (6) Word/Long: Specifies data type of digit tag

•. Word: 2 Bytes, Long: 4 Bytes

Data Display Format

Type Range

Signed

-32768 ~ 32767 Word

Unsigned

0 ~ 65535

Signed

-2147483648 ~ 2147483647 DEC

Long Unsigned

0 ~ 4294967295

Word 0 ~ FFFF HEX

Long 0 ~ FFFFFFFF Word 0 ~ 9999

BCD Long 0 ~ 99999999

< Data display range >

5) Display format (1) DEC: Displays by decimal format. (2) HEX: Displays by hexadecimal format (3) BCD: Displays by binary coded decimal format.

(4) Total digit: Specifies the number of digits allowed to be Displayed or entered.

(Ex) Actual value of device: 12345, Total digit: 3 Displayed Value: 345.

(5) Fraction digit: Specifies the number of digits to the right Of decimal point allowed be displaying or entering.

Page 82: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 82 -

• The combo box is enabled when the display mode is DEC

Available maximum number of digit

Total Fractional

Display example

DEC

5 4 0.1234

HEX

4 Not available FFFF Word

BCD

4 Not available 0123

DEC

10 9 0.123456789

HEX

8 Not available FFFFFFFF Long

BCD

8 Not available 10234567

< Example of display format >

(6) Outline: The digit tag is outlined with the solid-line. (7) Fill leading zeroes: Displays leading zeroes.

(Ex) The case of 123, Displays as 00123(When the total Digit is specified as 5.)

Page 83: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 83 -

5.2.1) Example of the wiring Action.

(1) System configuration

(2) Executes Panel Editor and specify the PLC Type of Ch 2 as LG: MASTER-K (Link).

• Make the communication parameter of GLOFA-Panel and master K120S same. Refer to Master K120S user manual for communication setting of Master-K120S.

(3) Property of Digit tag

• Channel: Ch 2(RS-422/485) • Station: 1 • Address: D0000 • Display format: Word, Dec • Max. : 65535 • Min.: 0

Connecting PLC to HMI 5.2

MK120S

RS-485

XGT

Page 84: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 84 -

(4) Downloading Project • Download the created project at XGT-Panel. • Refer to Ch. 6.9 for details about download. (5) Writing the value to the PLC Assume that a current value of tag is 12345.

The device value of D0000 of MK-120S is changed to 12346.

Key Display Description 1 2 3 4 5

『SET』

A cursor appears on the tag when the SET key of GLOFA-Panel is pushed.

1 2 3 4 5 『 』

The cursor moves to a ten's place. (The cursor flickers)

1 2 3 4 5 『 』

The cursor moves to a one's place. (The cursor flickers)

1 2 3 4 6 『 』

The value to write increases as 1.

1 2 3 4 5 『 』

The value to write decreases as 1.

1 2 3 4 6 『 』

The value to write increases as 1.

1 2 3 4 6

『ENT』

Writes the value to PLC

12345

Page 85: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 85 -

Text tag ( ) Displays text

< Property of text tag >

1) Location Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) Relocating by mouse drag is available. 2) Effect (1) Small font: Changes the size of character to 6 x 8 dots. Default size is 8 x 16 dots. (2) Double: Changes the size of character to 16 x 32 dots. (3) Reverse: Reverses the tag's color. 3) Text Input the text to display. (It can display up to 24 letters.) 4) Outline The text tag is outlined with the solid-line

Page 86: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 86 -

Message tag ( ) • Displays a registered message according to value of device. • Displays a blank if a registered message for the current Value of device does not exist

< Property of message tag >

1) Location Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) Relocating by mouse drag is available. 2) Effect (1) Small font: Changes the size of character to 6 x 8 dots. Default size is 8 x 16 dots. (2) Double: Changes the size of character to 16 x 32 dots. (3) Reverse: Reverses the tag's color. 3) Address Refer to Ch 5.1.2 Digit tag for details. 4) Edit message Edit the content of a message tag. Click the edit Message button t

o edit contents of message.

Page 87: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 87 -

• Message List (Right grid): Shows content and ID of all messages. - Click a message button, then you can modify this content. - Refer to Ch. 6.8.1 Message Management for details. • Registered Message (Left grid): Shows the messages that are re

gistered for the selected message tag. - Up to fifty messages can be registered to one message tag. - All messages have to contain ID and device value • Add: Registers the message of message list at a selected messa

ge tag. • Sort: Aligns registered messages by [Value]. • Message: Displays a management screen of messages. - Refer to Ch. 6.8.1 Message Management for details • Cancel: Cancels a message editing. • OK: Completes a message editing.

Button tag ( ) Displays and controls a status (on or off) of bit device

Page 88: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 88 -

< Property of a button tag >

1) Location Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) Relocating by mouse drag is available. 2) Effect (1) Double: Changes the size of character to double. 3) Address (1) Channel: Specifies communication channel of digit tag S Area • specifies to a system memory of XGT Panel. • A system memory is the memory to be provided to The user, and allows user to use as user memory or as System flags • The size of system memory is 1,000 Word (0~999), And you can use 900 Word (0~899) as user memory area. • The remains are system flag area. A latch area can be Set in the case of B type. • Refer to 6.8.3 Parameter for details and refer to appendix, for details about system flags. • Click , then the following window appears and can input an address or system flag.

Page 89: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 89 -

• Add the bit position at the back of the word address to Specify a specific bit of a system memory.

(Example) 8th bit of 120th word: 1208 12th bit of 700th word: 700C

Ch 1 • Specify the channel as Ch 1(RS-232C). • Click , then the following window appears and can input

an address to read. Ch 2 • Specify the channel as Ch 2(RS-422/485). • Click , then the following window appears and can input

an address to read.

(2) Station: Specifies a station number to connect. Enabled when channel is specified as Ch.1 or Ch.2

4) Action: Specify the kind of action of button tag when pushed.

Action Description Remark

On Turns on the bit device

Off Turns off the bit device

Toggle Toggles the bit device whenever pushed

Momentary On Turns on the bit device while pushed.

1) Choose tag by "SET" key. 2) Operate by "ENT" key.

5) Use password

If this option is specified to tag, the Write Action is disabled until password is unlocked. 6) On Value & Shape

Page 90: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 90 -

Specifies display format of device status.

Actual value of device

1 0 On Value

Circle Rectangle Circle Rectangle

“0”

“1”

Lamp tag ( ) Display a status (On or off) of bit device.

< Property of a lamp tag >

1) Location Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) Relocating by mouse drag is available. 2) Effect (1) Double: Changes the size of character to double. 3) Address Refer to Ch.5.1.2 to specify the address. 4) On Value & Shape Specifies display format of device status.

Page 91: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 91 -

Actual value of device

1 0 On Value

Circle Rectangle Circle Rectangle

“0”

“1”

Page 92: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 92 -

Bar graph tag ( ) Displays current value of device as a shape of bar-graph

< Property of bar graph tag >

1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Address Refer to Ch.5.1.2 to specify the address. 3) Data (1) Sign: Enables tag to display a negative number (2) Max: Specifies a value which a graph becomes the

maximum. (3) Min: Specifies a value which a graph becomes the

minimum. • When the value of device is out of the specified Min/Max

range, Bar-graph tag displays Min/Max value for each • A minimum value can not be specified as greater value

than a maximum value (4) Word/Long: Specifies data type of digit tag (Word: 2

Bytes, Long: 4 Bytes)

Data Min/Max value

Page 93: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 93 -

Signed Unsigned

Word -32768 ~ 32767 0 ~ 65535

Long -2147483648 ~ 2147483647 0 ~ 4294967295

4) Display format (1) Width & Height • Specifies width and height of bar graph • Width: 8~192, Height: 8~64. • Size adjustment by mouse drag is available. (2) Direction • Specifies a progress direction of the graph according to

the increase of value of device.

<Display format of bar graph tag>

5) Example of bar graph tag • Assume that properties of bar graph are specified as shown

in the below.

Page 94: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 94 -

• A Bar Graph Tag operates as shown below according to the value of D0000 of the station 1.

D0000 = 0 D0000 = 50 D0000 = 75 D0000 >= 100

Trend graph tag ( )

Display current value of device as a shape of trend graph.

< Property of trend graph tag >

1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Address Refer to Ch.5.1.2 to specify the address. 3) Data Refer to Ch 6.7.7 Digit tag for details. 4) Display format (1) Width & Height

Page 95: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 95 -

• Specifies width and height of bar graph • Width: 8~192, Height: 8~64. • Size adjustment by mouse drag is available. 5) Sampling number Specify a maximum number of the section which the X-axis

of trend curve has. 6) Sampling time Specifies a displaying time interval (1~3600 seconds)

7) Examples Assume that the properties of bar graph are specified as

shown below and the value of D0000 of Station 0 increases ten Per every five seconds.

• The total time to display = (Sampling time) x (Sampling

0 5 10 15 20 25 30 35 40 45 50 Time (Sec)

Value 50

40

30

20

10

Page 96: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 96 -

Number) = 5 x 10 = 50seconds

Pie graph tag ( )

• Displays current value of device as a shape of pie graph. • Various starting angle and displaying angle size can be

specified as shown above.

< Property of pie graph tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Effect (1) Reverse: Reverses the tag's color. 3) Address Refer to Ch.5.1.2 to specify the address. 4) Data Refer to Ch 6.7.7 in user manual Bar Graph Tag for details.

Page 97: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 97 -

5) Starting angle & Max. Angle

Angle(degree) Starting Angle (Max. Angle : 180°)

Maximum Angle (Starting Angle : 0°)

0 or 360

45

Page 98: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 98 -

Angle(degree) Starting Angle (Max. Angle : 180°)

Maximum Angle(Starting Angle : 0°)

90

135

180

225

270

315

Page 99: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 99 -

6) Radius • Specifies a radius of tag. • Size adjustment by mouse drag is available 7) Pattern

Fill Needle

8) Example • Assume that properties of pie graph tag are specified as

shown in the below • A pie graph tag operates as shown below according to the

value of D0000 of the station 1

D0000 = 25

D0000 = 50

D0000 = 75

D0000 >= 100

Page 100: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 100 -

Rotate tag ( ) Vary a rotating speed of image of motor according to the

value of device.

< Property of rotate tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Effect (1) Double: Changes the size of character to double. (2) Reverse: Reverses the tag's color. 3) Address Refer to Ch.5.1.2 to specify the address. 4) Data (1) Max. RPM: Specify the maximum speed of device which

makes the rotate tag revolve most fast. (2) Sign, Word/Long: Refer to Ch 6.7.7 Bar graph tag. 5) Direction • Specifies a direction of rotating. • When data is specified as [Sign], the rotate tag revolves to

the reverse direction if a value of device is negative number (Example)

Page 101: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 101 -

Data: Signed, Direction: Clockwise, Current value of device: negative number

Tag revolves to the CCW (counter clockwise) direction. 6) Rotating speed • The speed which the rotate tag revolves the 90degrees is

divided into 20 steps according to the value of a device. • A speed difference of an each step is 20ms. (From 20ms to 400ms) • For example, when a maximum RPM is specified as 100. (Default unit: 100/20 = 5) Move tag ( ) Varies a position of image of tag according to the values of

devices

< Property of move tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Effect (1) Reverse: Reverses the tag's color. 3) X/Y direction

Page 102: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 102 -

(1) Address: Refer to Ch 6.7.2 Digit tag for details. (2) Max. Min, Sign, Word/Long: Refer to Ch 6.7.7 Bar Graph tag for details. (3) Width: specifies the range of the X axis which a move Tag can move. • The range of the X axis has to be smaller than (192-the Location of X axis) • For example, the range of the X axis has to be specified As smaller value than 92 when the location of X axis is 100. • Resizing by mouse drag is available. 4) Y direction (1) Address: Refer to Ch 6.7.2 Digit tag for details. (2) Max. Min, Sign, Word/Long: Refer to Ch 6.7.7 Bar Graph tag for details. (3) Height: specifies the range of the Y axis which a move Tag can move. • The range of the Y axis has to be smaller than (64-the Location of Y axis) • For example, the range of the X axis has to be specified as

smaller value than 54 when the location of Y axis is 10. • Resizing by mouse drag is available. 5) X-axis/Y-axis • Enables or disables X axis and Y axis. • At least. One of them has to be enabled. 6) Outline • The tag is outlined with the solid-line.

Page 103: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 103 -

Example Assume that properties of move tag are specified as Shown in the below

• The unit of movement of X axis: Max value / Width = 1000 / 100 = 10 The tag moves a 1dot per every 10 increment of device • The unit of movement of X axis: Max value / Height = 80 / 40 = 2 The tag moves a 1dot per every 2 increment of device

Page 104: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 104 -

Clock tag ( ) Displays current time and date (Available on XP10BKB/DC

only)

< Property of clock tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Effect (1) Small font: Changes the size of character to 6 x 8 dots. Default size is 8 x 16 dots. (2) Double: Changes the size of character to 16 x 32 dots. (3) Reverse: Reverses the tag's color.

6

5 12

2

(50,40)

(50 (100,20)

0

4

0 10

Page 105: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 105 -

3) Display Specify a display format of a clock tag.

No. Disp

lay format

Description Exam

ple

1 YYYY/mm/DD HH:MM:SS

Year/month/date hour:minute:second

2004/06/03 10:12:24

2 HH:MM:SS hour:minute:second 10:12:24 3 YYYY/mm/DD Year/month/date 2004/06/03 4 HH:MM Hour: minute 10:12 5 mm/DD Month/day 06/03 6 DD/mm/YYYY Date/month/year 03/06/2004 7 DD/mm Date/month 03/06 8 YYYY Year 2004 9 mm Month 06 10 DD Date 03 11 HH Hour 10 12 MM Minute 12 13 SS Second 24 14 WWW Day of the week Wed

Image tag ( ) Display a bitmap image.

Page 106: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 106 -

< Property of image tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Effect (1) Double: Changes the size of character to double. (2) Reverse: Reverses the tag's color 3) Image management Refer to Ch. 6.8.2 in user's manual Image Management for

details 4) Example Choose the image by a mouse. Then, the image to be

selected is displayed in the screen.

Line tag ( ) Draws a line of various shapes..

Page 107: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 107 -

< Property of line tag > 1) Starting point • Specifies an X-Y coordinates of the starting point. (Max X-Axis: 192, Y-Axis: 64) • Relocating by mouse drag is available. 2) Ending point • Specifies an X-Y coordinates of the ending point. (Max X-Axis: 192, Y-Axis: 64) • Relocating by mouse drag is available. 3) Line (1) Kind: Specifies a kind of line. (One of solid line, dotted line, dashed line) (2) Thickness: Specifies a thickness of line. (From 1 to 5 dots)

Page 108: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 108 -

Rectangle tag ( ) Draw a rectangle of various shapes.

< Property of a rectangle tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Line (1) Kind: Specifies a kind of outline. (One of solid line, dotted line, dashed line) (2) Thickness: Specifies a thickness of outline. (From 1 to 5 dots) 3) Fill It fills the inside of rectangle. 4) Width, Height It specifies width and height of rectangle.

Page 109: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 109 -

Circle tag ( ) It draws a circle of various shapes.

< Property of circle tag > 1) Location • Indicates tag’s location (X-Axis:0~191, Y-Axis:0~63) • Relocating by mouse drag is available. 2) Line (1) Kind: Specifies a kind of outline. (One of solid line,

dotted line, dashed line) (2) Thickness: Specifies a thickness of outline. (From 1 to 5 dots) 3) Fill Fill the inside of circle. 4) Width, Height Specify width and height of rectangle. 5) Radius Specify a radius of circle.

Page 110: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 110 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Page 111: LG master k Training 2

Electro Hydraulic Automation (EHA)

℡ (+202) 4941760 – 4990377 Fax. (+202) 49192896

- 111 -

Memo: .................................................................................................................................................... ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................