Tag Archives: plc tutorial

What is the meaning of PLC constant?

PLC constant is that we set a good time in the program, after running in the process does not change the number, as we set a timer time is 10s, then 10 is constant, relatively constant is variable, The variable can change the value.

For example, we can set the time of a certain timer to be the PLC’s memory channel DM100, and then we can give the DM100 different values during the running process. The constant has a decimal number (that is, every ten in one), and the binary number (the two used in the machine) is octal, hexadecimal, etc. There are 32 more digits you should ask, like 1111 is 4 digits.

What is the meaning of Mitsubishi PLC constant H?

The Mitsubishi PLC constant H represents a hexadecimal number and is mainly used to indicate the operational value of the application function instruction.

[extension]
K is a symbol indicating a decimal integer. It is mainly used to specify the set value of the timer or counter and the value in the operand of the application function instruction. H is a hexadecimal number, which is mainly used to indicate the operation value of the application function instruction. For example, 20 is expressed as K20 in decimal and H14 in hexadecimal.

Omron PLC data type

Omron PLC data type

BOOL
Address of a binary bit – a logical Boolean on or off state. This type is typically used for contacts or coils.

CHANNEL
This is a special data type, for backward compatibility. It is an address (non-bit) to data of any type (unsigned or signed, one or more words), so can be used in place of any of the above data-types except NUMBER and BOOL. The data type is weak, and so checking is limited (e.g. CX-Programmer cannot check if the address is being used for BCD or binary values).

DINT
Address of a signed, double binary word.

INT
Address of a signed, single binary word.

LINT
Address of a signed, quad binary word.

NUMBER
A literal numeric value. Not an address. The value can be signed, or floating point. NUMBERs are used for any literal value or for timer/counter identifiers (in this case, only unsigned integer values are allowed). Floating point values are only suitable within IEEE REAL type operands.

Note: when used as BCD number operands, the value is treated as a hexadecimal value (e.g. using a NUMBER E234Eis equivalent to typing E1234Eas the operand, so that the decimal interpretation is made of the value). The value of a NUMBER data type is assumed to be decimal, unless it is prefixed with ‘#’ for a hexadecimal value.

REAL
Address of a double word floating point value (IEEE format – use the UDINT type for the BCD, FDIV format).

LREAL
Address of a long word floating point value (IEEE format – use the ULINT type for the BCD format).

UDINT
Address of an unsigned, double binary word.

UDINT_BCD
Address of an unsigned, double BCD word.

UINT
Address of an unsigned, single binary word.

UINT_BCD
Address of an unsigned, single BCD word

ULINT
Address of an unsigned, quad binary word.

ULINT_BCD
Address of an unsigned, quad BCD word.

WORD
Address of a bit string of 16 bits.

DWORD
Address of a bit string of 32 bits.

LWORD
Address of a bit string of 64 bits.

GX Developer Correct installation method

1, Download GX Developer 8.86

2, enter the registry, delete HKEY_CURRENT_USER\Software\MITSUBISHI HKEY_LOCAL_MACHINE\SOFTWARE\MITSUBISHI

3, the installation package should be located in the D disk, unpack the file to the “886” folder

4, close all antivirus software, firewall these two software will affect the installation process of reading and writing files, first shut down the best

5, open the task manager, check whether there is a wowexec.exe process, and put it to an end

6, execute D:\886\Developer\Update\AXDIST.EXE

7, execute D:\886\ENVMEL\SETUP.EXE

8, D:\886\Developer\SETUP.EXE now has 3 points to note: 1, input and company name, with English or number 2, serial number 570-9868184103, the installation process all hook don’t strictly follow the instructions to create a new project can solve the problem of failure,

9, after installation, all anti-virus software can be opened

10, 119 alarm processing method, 360 alarm! Reinstall the SW8D5C-GPPW-C\EnvMEL setup; when the first 360 firewall alarm occurs, check all the programs that allow the program. If the check allowed, this operation will appear this alarm!

OYES PLC applied using a small wave soldering machine design

I. Overview
Usually large wave soldering machines, production lines, but some customers such as laboratories, schools, small factories need a small lead-free wave soldering machine. Certain electronic equipment factory developed this product, using the Austrian letter OYES series PLC and touch screen. The device requires three temperature control, a total of three PID, the Austrian letter OYES series PLC to achieve 8-channel PID, to meet the equipment requirements. Matched on the touch screen with a high price.
II. Process Description
Dual-wave soldering machine is first necessary to solder temperature, preheat temperature, preheat temperature compensation temperature value added to a total of three temperature settings. When the condition is satisfied, the machine can be produced. The PCB board placed on the track, press the start button, the transmission motor running, start the pump, spray flux, PCB board flux coating is completed, the delay pump stops. When the PCB board to the left after the preheat zone, the transport motor is stopped, parked in the PCB board preheat zone, preheat countdown, after the time to transfer the motor starts, the right to run the PCB, tin pump motor start HAL, PCB board after preheat temperature compensation zone into the HAL area, after HAL zone, tin pump stops when the PCB to the right, the motor stops transmission, cold start the motor. Such a complete cycle is over.
III. Hardware Configuration
Input: detection switch, the operating switch.
Switch detection are: the right point switch, left switch point.
Switch operation are: start switch, emergency stop switch.
Output point: heating solid state relay three regions, the transmission motors, two motors tin pump, exhaust motors, pump motors, motor cooling, the power to protect themselves point.
Analog inputs: three zones of temperature detection.
Motor transport and tin pump motor speed is required, using a frequency converter, the speed required communication settings.
Hardware Configuration:
Model Number Function
FBS-32MA 1 master controller, AC 220V input, relay output
FBS-16EYT 1 8x24V, transistor output module
FBS-6TC 1 4-channel thermocouple input module
Panelvisa PV057TST 1 Touchscreen HMI
IV. Programming
Including programming PLC program and touch screen program includes four major functions: Device parameters, manual debugging, production screen, alarm queries.
The following are some of the features: each movement device can be done manually debug screen is very useful when you start debugging and maintenance of equipment.
Device parameters can be set from the touch screen, including temperature, time, PID coefficients.
Alarm query, you can quickly find the cause of the malfunction.
Production data display screen is used in the production, buttons are placed in this picture, and user-friendly in this screen monitors three temperature zones, process instructions and operating in these images.
Transmission speed motor and pump motor tin set is set to the touch screen PLC, and then passed by the PLC via PORT1 each motor drive. Function uses the PLC MODBUS master station, very convenient.

PLC conduction delay timer instruction (TON)

When the limit switch 1 is set, the indicator 2 ON 180ms (timer clocked). When the accumulated value of the timer 1 (.ACC) reaches 180, 2 lights off, the indicator 3 is turned on, and remains on until the TON instruction is disabled. If you disconnect the timer is timing the limit switch 1, then turn off light 2.

Ladder Diagram


S7-200 addressing method in PLC programming

       In the S7-200 series, addressing modes are divided into two kinds: direct addressing, and indirection. Direct addressing mode is used directly in the instruction memory or registers the component name and address number, direct to find the data. Indirect addressing is the address pointer is used to access data in the memory, before use, first memory address into the address of the unit where the data pointer register, then, according to this address to access the data. This book only direct addressing.
 
When addressed directly, the address of the operand shall be in the specified format. Data type should match the consistent instruction in the instruction.
 
In the S7-200 series, can be bit, byte, Word and double word address of the storage unit. When addressing, data address begins with a letter representing the storage type, followed by a tag that represents the data length, then the memory cell number; for-bit addressing, you also need to refer to position number after the separator.
 
Represents the data length, respectively with the letters b, w and d as byte, Word and double word identifier.

WinCC Siemens S7 300 and 400 PLC OPC configuration

1. Configuration software: 
 

1. SIMATIC STEP 7 5.4
2. SIMATIC NET 5.4
3. SIMATIC STEP 7 SIMATIC NET and 5.4 5.4 authorization
Installation of SIMATIC STEP 7 SIMATIC NET and 5.4 5.4
II. Configure the OPC STATION
1. open the STEP 7 software

Figure 1


2. Insert a SIMATIC PC Station

Figure 2


3. renamed PC2

Figure 3


4. configuration of SIMATIC PC STATIONG, double-click the configuration

Figure 4


5. in the first slot Insert the OPC SW V6.3

Figure 5


6. Insert the OPC completed

Figure 6


7. Insert IE General SW V6.2 SP1

Figure 7


8. set the network adapter IP address and network mask

Figure 8


9. IE General NIC configuration is complete

Figure 9


10. Click on network architecture, network configuration

Figure 10


11. set the CPU 414-4H and OPC connection

Figure 11


12 set the OPC and CPU 414-4H (1) edit

Figure 12


13. OPC Connections tab, double-click PC2 OPC, open the OPC Server window


Figure 13


14. Select S7 option


Figure 14


15 select the options Configured in the S7


Figure 15


16 click on Configure


Figure 16


17 into the Configure option Symbols


Figure 17


18 select CPU 414-4 h


Figure 18


19 click OK” and enter the OPC Server dialog box, select the S7 ALL”, and click OK” to complete the configuration.


Figure 19


20. view the symbolic under SIMATIC NET, file empty.


Figure 20


III. Configuration Station NET
1. click on the bottomleft corner of the computer the computer, open the Station Configuration.


Figure 1


2 in the first slot Insert the OPC Server
Figure 2


3. In the third slot Insert IE General


Figure 3


4. Insert complete


Figure 4


5 the Station Name name “PC2 and SMATIC PC STATION have the same name.


Figure 5


6. the download path is set to a local path local

Figure 6


7. PC2 appeared yellow arrow

Figure 7


8. PC2 Download SIMATIC NET

Figure 8


9. See symbolic file generates 2 OPC configuration file


Figure 9


IV. OPC Server test
1 to open the OPC OPC Client connection Simatic NET


Figure 1


2. connecting OPC SimaticNET


Figure 2


3 right click Select AUTO CREATE TAGS”


Figure 3


4. OPC connection

Figure 4


When you reconfigure your new OPC server, simply symbolic copy 2 files in the files directory to the new configuration of the machine.


S7-200 PLC Data area

A) digital input and output image area


1. Enter mapping registers (digital input image areas) (I)


Digital input image is S7-200CPU for the input signal state opened up a store. Register identifier for the input image I, at the beginning of each scan cycle, CPU to sample the input points and registers the sample values in the input image.


Enter image register is the digital signals of PLC receives external input window.


Can be bit, byte, Word, double word four ways to access.


(1) press the bits: from I0.0~I15.7, a total of 128 points


(2) press the bytes: from IB0~IB15, a total of 16 bytes


(3) press character: from IW0~IW14, a total of 8 characters


(4) press the double-word: from ID0~ID12, a total of 4 double word


2. The output image register (Q)


Digital output image area is the S7-200CPU for the signal at the output state of a storage area. Register the output image‘s identifier is Q (from Q0.0~Q15.7, a total of 128 points), at the end of each scan cycle, CPU registers of the output image data to output module, which then drive the external load.


Can be bit, byte, Word, double word four ways to access.


(1) press the bits: from Q0.0~I15.7, a total of 128 points


(2) press the bytes: from QB0~QB15, a total of 16 bytes


(3) press character: from QW0~QW14, a total of 8 characters


(4) press the double-word: from QD0~QD12, a total of 4 double word


Note: practically no use of input and output image area of the storage unit can be used as relay.


(B) analog input images and output image area


1. Analog input image areas (AI)


Analog input image area is the S7-200CPU analog input signal opens a store. S7-200 measurement of analog (such as temperature and pressure) into a 1length (2 bytes) of digital, analog input registers with the image identifier (AI), the length of the data (w) and the bytes of the start address.


From AIW0~AIW30, a total of 16 characters, a total of 16 analog input is allowed.


Description: analog input values for readonly data.


2. Analog output image area (AQ)


Analog output image area is the S7-200CPU analog output signal to open a store. S7-200 1Word (2 byte, 16-bit) converts the digital proportional current or voltage. Analog output registers with the image identifier (AQ), the length of the data (w) and the bytes of the start address.


From AQW0~AQW30, a total of 16 characters, allowed a total of 16 analog outputs.


(C) the memory variable (v) (the equivalent of auxiliary relays)


PLC program execution process, there will be some intermediate results of the control process, these intermediate also need memory to save the data. Variable storage is designed according to the actual requirements. Variable storage is one of the S7-200CPU set up to save the intermediate variable data stores, represented by v.


Can be bit, byte, Word, double word four ways to access.


(1) press the bits: from V0.0~I5119.7, a total of 40,960 points. CPU221, CPU222, memory only 2048 bytes of the variable, its variable store only to V2047.7.


(2) press the bytes: from VB0~VB5119, a total of 5,120 bytes


(3) press character: from VW0~VW5118, a total of 2,560 words


(4) press the double-word: from VD0~VD5116, a total of 1280 double word


(D) information technology(m)


PLC program execution process, some flags may be used, which also use memory to storage. Memory is designed according to the requirements. Memory is one of the S7-200CPU set up to keep flag data store represented by m. Although the area is called memory, but the data can not only be, but also can be a byte, Word or double word.


(1) press the bits: from M0.0~M31.7, a total of 256 points.


(2) press the bytes: from MB0~MB31, a total of 32 bytes


(3) press character: from MW0~MW30, a total of 16 characters


(4) press the double-word: from MD0~MD28, a total of 8 double word


(E) the control relays in the order (s)


PLC program execution process, the sequence may be used. Sequence control relays are designed according to the characteristics of sequential control and. Control relay is S7-200CPU in order to control relays in the order established a store of data, denoted by s. Control process in order for the organization step process control.


Can be bit, byte, Word, double word four ways to access.


(1) press the bits: from S0.0~S31.7, a total of 256 points.


(2) press the bytes: from SB0~SB31, a total of 32 bytes


(3) press character: from SW0~SW30, a total of 16 characters


(4) press the double-word: from SD0~SD28, a total of 8 double word


(F) local storage area (l) (the equivalent of auxiliary relays)


S7-200PLC 64 bytes of local storage, which can be used as a temporary store for the 60 and passing parameters to the subroutine.


Local and variable storage is very similar, the main difference is that the variable memory is of global and local storage is partially valid. Global refers to the same memory can be accessed by any program (for example, the main program, subroutine, or interrupt). Local guide memory areas associated with specific programs.


Several programs between visits.


Local storage area is a store set up S7-200CPU as a local variable data, represented by l. Data in the region can be bit, byte, Word, double word four ways to access.


(1) press the bits: from L0.0~L63.7, a total of 512 points.


(2) press the bytes: from LB0~LB63, a total of 64 bytes


(3) press character: from LW0~LW62, a total of 32 characters


(4) press the double-word: from LD0~LD60, a total of 16 doubleword


(G) the timer memory area (t)


PLC at work and ultimately need timing, the timer is the realization of PLC timer function of timing equipment. Timer number:


T0、T1、……、T255


S7-200 has 256 timers.


(VIII) counter memory area (c)


PLC at work sometimes requires not only time count may also be required. Counter is counting device of PLC with counting function.


Counter ID:


C0、C1、……、C255


(H) high speed counter (HSC)


Today high speed counter is used to scan faster than CPU events. S7-200 high speed counters not only count the frequency of up to 30kHz.


S7-200 high speed counter there is a 32-bit signed integer to the current value of the counter. To access high-speed counter values, you must give high speed counter address, namely, high speed counter number.


High speed counter number: HSC0, HSC1, … …, HSC5.


S7-200 6 high-speed counters. Where CPU221 and CPU222 only have 4 high-speed counters (HSC0, HSC3, HSC4, HSC5)


(I) the accumulator (AC)


Accumulators can be read/write device like a memory. For example, you can use the accumulator parameters passed to a subroutine, or return from the subroutine parameters and is used to store intermediate data are calculated.


S7-200CPU provides 4 32-bit accumulator (AC0, AC1, AC2, AC3).


Can be byte, Word or double word accumulator to access data in the data. However, as bytes when reading/writing data in the accumulator, read/write only the lowest 8 bits of the accumulator in the 32-bit data data. If it is read/write in Word forms the accumulator data can only read/write in 32-bit accumulator data the low 16 bits of data. Only take the form of double words when reading/writing data in the accumulator, can read and write all 32 bits of data at once.


Because operation of PLC function is separated from the accumulator. Not as occupied as the other memory accumulators.


(J) special storage areas (SM)


Special memory is S7-200PLC the media for passing information between the CPU and the user program. They can reflect the CPU running the various status information, users can use this information to determine the machine‘s operating status, to determine the user what to do, what not to do. These special information storage to storage. Special memory is designed according to the requirements.


1. Special storage areas


It is S7-200PLC to save its State data and established a store, SM said. Special memory data is read write, some are readonly. Special memory data can be a bit or a byte, Word or double word.


(1) press the bits: from SM0.0~SM179.7, a total of 1440 points.


(2) press the bytes: from SM0~SM179, a total of 180 bytes


(3) press character: from SMW0~SMW178, a total of 90 characters


(4) press the double-word: from SMD0~SMD176, a total of 45 double word


Description: special the first 30 bytes of the memory area is readonly.


2. Commonly used special relay and its function


Special storage for CPU and the exchange of information between users, for example, SM0.0 has been the 1 State, SM0.1 only the first scan of the execution of the userprocess cycle for the 1 State. SM0.4 and SM0.5 provide a period of 1min and 1s of the clock pulse. SM1.0, SM1.1 and SM1.2 respectively zero flag, overflow flag and negative signs.

Siemens S7-300/400 PLC Closed-loop control module

1, FM 355 closedloop control module
 
FM 355 closedloop control channel 4, used for pressure, flow, liquid level control, optimum temperature control and PID algorithms. FM 355C analog output is 4 fracture of continuous controller, FM 355 s is 8 digital output point step controllers or pulse. CPU FM 355 people after a disruption or failure will continue to operate, control procedure stored in a module.
FM 355 4 analog input is used to collect analog values and feed-forward control value, additional analog inputs for thermocouple temperature compensation. Can use a variety of sensors such as thermocouples, Pt100, thermal resistance, voltage and current sensors. FM 355 closedloop control of 4 separate channels, you can implement a custom control, cascade control, proportional control and 3component control, using several controllers can be integrated into one system. Automatic, manual, safety, follow, back this way. 12 for the resolution of the sampling time of 20~100ms,14 for 100~500ms resolution.
Self-tuning temperature control algorithm in m fast, starts automatically when the set point change is greater than 12% liberalization; configuration software package can be used to optimize PID control algorithm.
Defective CPU or CPU to stop working is controller can control independently. In: backup function set adjustable security settings or security control variables. You can read and modify all the parameters of fuzzy temperature controller, or online to modify other parameters.


2, FM 355-2 closed-loop control module
 
FM 355-2 is suitable for temperaturecontrolled 4channel closedloop control module, you can easily realize online automatic temperature control, including control of heating and cooling, and combination control of heating and cooling. FM 355-2C is continuous controller has 4 analog outputs, FM 355-2S is 8 digital output of the step or pulse controller. CPU FM 355-2 after a disruption or failure is still able to run.


3, FM 455 closedloop control module
 
12-bit resolution sampling time for 20~180ms,14 100~1700ms (associated with the number of actual use of the analog input), there are 16 digital inputs.


4, FM 458-1DP application module
 
FM 458-1DP is designed for a free closedloop attitude control, and 300 block of library functions and CFC continuous function chart graphical configuration software, with a PROFIBUS-DP interface.
FM 458-1DP basic modules can perform a calculation, the openloop and closedloop control, I/O and communication modules can be extended by extension.
EXM 438-1 I/O expansion module is an optional plug-in for FM458-1DP extension module for reading signals and output requirements. Digital/analog input/output module, incremental and absolute encoders can be connected, there are 4 two 12-bit analog output.
EXM 448 communications is the optional FM 458-1DP insert the expansion module expansion module. You can use PROFIBUS-DP or SIMOLINK for high speed communication, with a spare slot, you can insert MASTERDRIVES optional modes, used to establish a SIMOLINK optical fiber communication.
FM 458-1DP and some attachment interface modules, including digital input, digital output and program storage modules.

Siemens 200 PLC analog input/output

Analog input/output universal conversion formula you can use the following conversion:
Ov = [(Osh – Osl)*(Iv – Isl)/(Ish – Isl)] + Osl


Of which:
Ov: conversion results
Iv: conversion objects
Osh: conversion result limit
Osl: conversion results lower limit
Ish: conversion limit
Isl: conversion of lower limit


STEP 7-Micro/WIN Programming Tips (Micro/WIN programming skills) Tip38 about how to achieve the conversion routines.
For convenience of users, are now exporting it as custom orders in the Micro/WIN programming software that users can add to their application.


Note: this instruction library/the author and owner of the software‘s functionality and compatibility does not take any responsibility. Risk of using the software by the user themselves. Because it is free, so it does not provide any warranty, error correction and hotline support, users do not have to contact Siemens technical support and services.


In this library, analog input to the subroutine Scale_I_to_R can be used to S7-200 internal data conversion subroutine Scale_R_I can be used for internal data conversion to analog output.
Add instruction library


Note: adding custom commands library, you need to close the Edit Library instruction project, established a new project. If you are adding a library instruction, don’t need no different from other sources.


The first step: in the Micro/WIN File (file) menu, select Add/Remove Libraries (Adding/removing instructions) commands or Libraries in the command tree (repertoire) branch, click the right mouse button, select the Add/Remove Libraries
Appears in the Add/Remove dialog box has been integrated in the native Micro/WIN of userdefined instructions.


Second step: Add (add) button, select the newly defined library file path. Userdefined library is automatically added to the Micro/WIN command Libraries under the branches of a tree.
By default, Micro/WIN to find directive file under the path in Figure 8. Users can also specify a different path. But note that libraries should be maintained in a non-removable media, if you specified a removable hard disk, the hard disk is not library not found error occurs when. Users are advised to use the default settings.

Siemens PLC analog module usage questions

S7-200 analog input module (EM231,EM235) addressing


Each analog expansion module, sorted by extension modules in the order, in which the analog input and output according to different sorting, respectively. Analog data format is one word, so the address must begin with an even number of bytes, precision 12-bit; analog values with the value 0-32000. Input format: AIW[a starting byte address] AIW0 output formats: AQW[a starting byte address] AQW0 each analog input module, module address is fixed in the order, the order to the rear. Example:: AIW0,AIW2,AIW4……, AQW0,AQW2 … ….


At least two channels per analog expansion module, even if the first module has only one output (AQW0 EM235 has only an analog output), the second analog output modules address should also AQW4 to start addressing, and so on.

2. connect the sensor to S7-200 analog input module (EM231,EM235) what are the points for attention?


Analog input module can set the dip switches to different ways of measuring (voltage and current). Module switch settings apply to the entire module, a module can only be set to a measuring range and switch to take effect only after the electricity back on. Input at the same time can only be set to a range and the format, that is, the same input range and resolution.


EM235 is the most commonly used analog expansion module, it implements 4channel analog input and 1 analog output. EM235 analog expansion module wiring method for voltage signals, by positive and negative direct access to X+ and X-; for the current signal, RX and X+ after the short access current input signal + side; channel X+ and X-are not connected sensor shorted.


Note: in order to avoid the commonmode voltage, m end with all signals end to be connected, not connected sensor channels to be shorted. When analog input PLC received a change in very unstable when, for one reason: you may use a self-powered sensor power supply or isolated, both power supply not connected to each other, so the resulting bounce of a high commonmode voltage, affects the analog input value. The second reason: analog input module wiring may be too long or bad insulation. Solution: 1. connect sensor input negative terminal with modules on the public m-side to compensate such fluctuations. (Note: prior to determine if this is the only connection between the two power supplies. If a connection already exists, when added public connection may have an extra compensating current.


When the analog input PLC receives a signal change is slow, this could be you use filters, can be reduced by filtering samples, or cancel the analog filtering solution.

3. EM235 can be used for heat resistance temperature measurement problem?


EM235 module is not used in connection with the thermal resistance measurement temperature, barely used risk failure.

4. EM235 input to calibrate:


Analog input module input calibration before use. Enter calibration prior to shipment, if the OFFSET and GAIN potentiometer is readjusted input calibration is required. The steps are as follows:


A, cut off the power supply module, select the desired input range.


B, connect CPU and power supply modules, the module stability for 15 minutes.


C, a transmitter, a voltage source or current source, the zero value signal applied to an input terminal.


D, read the appropriate input channel measurement value in the CPU.


E and adjust the OFFSET (offset) potentiometers until it reads zero, or need numeric data values.


F, received a full scale signal input terminals, read out the value sent to the CPU.


G, adjust GAIN (gain) potentiometers until reads 32000 or need numeric data values.


H and, if necessary, repeat the offset and gain calibration process.

5. the conversion of the analog values, and the a/d conversion:


Assuming that analog standard signals are A0-Am (such as 4-20mA), after a/d conversion values for D0-Dm (such as 6400-32000), analog standard signals are A,A/D after the corresponding value of d, because it is a linear, function A=f (d) can be expressed as a mathematical equation:


A=(D-D0)×(Am-A0)/(Dm-D0)+A0。


According to the formula d value can be easy to calculate a value. This equation inverse transform, D=f draw function (a) mathematical equation can be expressed as:


D=(A-A0)×(Dm-D0)/(Am-A0)+D0。


To quote an example, a case study of S7-200 and 4-20mA, a/d conversion, we get a value of 6400-32000, the A0=4,Am=20,D0=6400,Dm=32000, into the equation is obtained:


A=(D-6400)×(20-4)/(32000-6400)+4


Hypothesis corresponds to the analog and AIW0, when the value of AIW0 is 12800, the corresponding analog signal is 6400×16/25600+4=8mA.


As another example, a temperature sensor,10-60 corresponds to 4-20mA, and t represents the temperature value, AIW0 PLC analog sampled values according to type directly into the draw:


T=70×(AIW0-6400)/25600-10


Can t displayed temperature value.


Conversion of the analog values, and the a/d conversion more difficult to understand, that paragraph several times, combined with the examples, you will understand. To make it easy for you to understand, let me give you an example:


A pressure transmitter, when the pressure reaches full scale 5MPa, pressure transmitter 20mA,AIW0 is the output current value is 32000. Visible/MA A/D that corresponds to the value of 32000/20, when measuring the pressure 0.1MPa, pressure transmitter should be current as of 4mA,A/D (32000/20) X4=6400. It follows that the AIW0 value to the actual pressure value (units KPa) is calculated as:


The value of VW0 = (value of AIW06400) (5000-100)/(32000-6400) +100 (units: KPa)

Programming examples


Instance demo that you can form a small analog programming. CPU in this instance is CPU222, with only an analog extension EM235 module, the first channel of the module to connect a 4-20mA transmitter output temperatures display instrument, the instrument‘s range is set to 0-100, or 0 degrees when output 4mA,100 20mA output. Platinum resistance temperature display instrument input connect a 220 Ohm variable potentiometer, simple programming are as follows:


Temperature display value = (AIW0-6400)/256


Compile and run the program, the watcher, the VW30 temperature value is displayed, control instrument display values are the same.

PLC Timer delay time extension

Timer has a maximum time of the time, such as 100ms timer maximum timer time is 32767.7s. As in the project delay time is greater than the value that you want to do, one of the most simple method is to use a timer relay, that is to start a timer time, time time to time, with a first timer normally open start second timer, and then use the second timer starts the third one, and so on. Remember to use a timer contact to control final control objects can be. The ladder diagram in Figure 4-5 is one such example.
 
Above using the timer timer time the long delay. In addition also can use of timer with registers with the long delay, as shown in Figure 6. Normally open X1 is in the working condition of this circuit, when X1 connected circuit.
 
The timer T1 timer T1 in the coil circuit normally closed contact, it makes the timer T1 every 10s through time, the ontime for a scan cycle. Every time the timer T1 C1 to remember one number connected to remember. And when you remember to register value and make its working object Y0, and begins from the X1 connected point set the delay time for the timer value registers on the set value. X2 registers the reset condition C1.

FX series PLC N:N network

FX1N series PLC respectively above the programming port cover plate removed, insert FX1N-485-BD Communications Board seats, according to the following diagram wiring N:N network.


· N:N FX series network features, among the PLC network communication without programming, can be realized through simple settings between each PLC status or the value of shares.
 


When wiring note shielded twisted-pair cable, at 300 meters without matching resistor.


The following three FX1N series PLC, for example, briefly the N:N FX series network usage.

Connect 1# from X0, the main station Y0 absorbs


Connect 1# from X1, 2# from Y0 absorbs


Connect 2# enter X0, then the stand Y1


Connect 2# from X1, 1# from Y0 absorbs

Mitsubishi FX2N PLC instructions- four-storey elevator control system

1~4 the stairs outside the request button, FU, FD;
1~4 floor SQ1~SQ4 floor signals;
In the boot button on the control panel signals;
Elevator door opening and closing limit switch.
Output signal:
Lifting light,
Elevator lift AC contactor KM1~KM2,
Elevator door AC contactor KM3~KM4,
The Bell.
1. upon the request 1-4 outside staircase and elevator operation status timely response:
Increase process, floor upstairs along the request, stop and open the door, otherwise no action;
Descent, floors downstairs along the request, stop and open the door, if not action.
2. Upon request of the compartments on the Control Panel, lift passengers to the appropriate layer.
3. Elevator travel time less than 10S, otherwise stop the ladder and alarms, notify maintenance personnel to economically disadvantaged.
4. Lifts open and close time of less than 3S.
5. Ladder on the door waiting for passengers, 5S closes automatically after.
6. If passengers open 5S press close button, the elevator door.
7. Request button to reset.

Mitsubishi PLC PLS sum PLF directive

PLS (Pulse): rising differential output directive.
PLF: falling edge of differential output directive.
PLS and PLF command can only be used for the output relays and auxiliary relays (does not include special auxiliary relays). M0 in the figure only in the X0 normally open from open to close (X0 rising edge) when a scan cycle for ON,M1 only on X0 normally open contact connected become disconnected (X0 the falling edge) _ when a scan cycle is ON.
When the PLC from RUN to STOP, and then from STOP to RUN when its input signal still is ON,PLS M0 instruction will output a pulse. However, if you use the battery backup (latches) the auxiliary relays instead of M0, PLS order in this case no output pulses.

PLC pulse differential instruction using examples

Impulsive differential instruction can be used to test the rising and falling edge of the input pulse, when conditions are met, a narrow pulse signal output. PLS, PLF two instructions.
1 PLS instructions
PLS order known as the rising edge of impulsive differential instruction. Its functions are: when a rising edge of the input pulse signal is detected, so the coil element y or m a scanning cycle, resulting in a pulse signal output width for a scanning cycle.
The operation of this directive elements for the output relay y m and auxiliary relays, but no special relays.
PLS order used is shown in Figure 2.
2 PLF instructions
PLF pulse instruction directive, also known as falling edge. Its function is when a falling edge of the input pulse signal is detected, so the coil element y or m a scanning cycle, resulting in a pulse signal output width for a scanning cycle.
The operation of this directive elements for the output relay y m and auxiliary relays, but no special relays.