📜 ⬆️ ⬇️

Wecon LX3V: Chinese PLC with aliexpress

Perhaps, you also go to aliexpress from time to time and look at the assortment of Chinese PLCs with interest.
There are many of them, their prices are low, and the specifications are interesting. One bad information in Russian about them is little or not at all. But a lot of interest.
What is there inside? How is it programmed? What features of work? What are the communication options?
Any programmer of the automated control system will have questions.

I learned one of such interesting controllers and I can tell you a little about it.
We are talking about Wecon PLC LX3V-0806MT-A2:


The Wecon LX3V series PLC is primarily interested in the following:

Model LX3V-0806MT-A2 is the simplest and most inexpensive of the entire family.

All specifications of Wecon LX3V-0806MT-A2


NameWecon LX3V-0806MT-A2
DIeight
Do6, transistor
Communication ports1 RS-422 (Com1)
1 RS-485 (Com2)
+2 RS-485 ports when connecting BD Board
Software download portsMicro usb
Com1 RS-422
Data transfer protocolsModbus ASCII, RTU master / slave
Non-Volatile RTCthere is
Mounton the wall, DIN rail
Nutrition85 ... 264 V AC, 20 W
Expansion Modulesnot
BD Boardthere is
Dimensions75 * 107 * 87 mm
Programming environmentWecon PLC Editor, Melsoft GX Works2
Programming languagesIL, LD, FBD, ST, SFC
Additional featureanalog PLC Mitsubishi FX2N
Priceless than $ 100 + shipping

In total, a full-fledged PLC with 14 points of discrete I / O and an RS-485 port for less than $ 100. Here I will not write the specific cost, that would not be perceived as advertising. Who cares, all the links at the end of the article.
Shipping cost is a separate issue. To Ukraine, for example, a couple of months ago, it was $ 54, right now, $ 39. So the shipping cost may vary. To Russia, perhaps, the delivery costs differently. You can order on aliexpress or through the sales department directly on the Wecon website, all links are at the end of the article.
The controller got to me by DHL for 3 days from the date of order.
')

Design


And here's the PLC in my hands. First you need to carefully examine its structure.


The case is classic, as for a PLC. Mounted on a DIN rail or on the wall through the ears.
Front connection terminals connections and LED alarm status of inputs / outputs and service signals (power, operation, battery failure, error).

If you open the lid on the right and remove the cap on the left, you will see:


1. Connector for connecting the expansion BD Board (not to be confused with the expansion module). Different models of BD Board come with analog I / O or additional communication interfaces.
For example, the LX3V-2RS485-BD board with 2 additional RS-485 ports:


2. Battery for powering the real-time clock. This is the usual CR2032 tablet, which stands in each of our computers.

3. RS-422 Com1 port. Used to download programs. Present here primarily for reasons of compatibility with the Mitsubishi PLC. For programming through this port, you need a special cable, which Wecon costs $ 5.
Or you can solder a homemade cable according to the Trinity scheme, as I did:


For the cable, I took the tail from an old mouse with a DB9F connector and soldered it to the Mini DIN-8 connector. The resistor is set to 750 ohms.
The cable is plugged directly into the computer’s COM port or into a USB / RS232 converter. Everything is working.
Com1 is used for programming via Melsoft GX Works2 (Mitsubishi PLC software), because this program does not see the USB port on the controller.

4. Micro USB port for downloading programs via the Wecon PLC Editor native programming environment. A standard micro USB cable is used.

5. RUN / STOP switch.

The LX3V-0806MT-A2 has no port for connecting expansion modules over an internal bus, as in the more advanced LX3V models.

On the side of the case is a sticker with model parameters:


The most interesting is inside. PLC consists of 3 boards: processor, control and power.

CPU board:


It can be seen that this board is thickly varnished. With the rest of the same.

It uses a 32-bit STM32F103vet6 processor with an ARM Cortex-M3 core and a maximum frequency of 72 MHz.
Is it enough? Probably.
For example, a good domestic OWEN PLC63 (22 I / O points, 2 communication ports) has an AT91SAM7S512 processor with a maximum frequency of 55 MHz and the previous generation ARM7 core.

Power and control boards:




The output in the Wecon LX3V-0806MT-A2 is transistor. A model with relay outputs costs the same.

Programming


From a programming point of view, the Wecon LX3V PLCs are Mitsubishi FX2N clones. Therefore, for programming the LX3V, you can use not only its native Wecon PLC Editor programming environment, but also Melsoft GX Works2 from Mitsubishi controllers.

Melsoft GX Works2 has more features:
Wecon LX3V softwareProgramming languagesStatus
Wecon PLC Editor v.1.2.0IL, LDfree
Melsoft GX Works2 v.1.50IL, LD, ST, SFC, FBDtrial for 60 days

Documentation for programming Wecon LX3V is still in English only. But after all, Wecon LX3V is a software clone of Mitsubishi FX2N, which means you can use their documentation. Russian language documentation programming Mitsubishi FX2N in the network is full. Personally, I studied my LX3V primarily on the Russian manuals for the FX2N.

Each program consists of instructions (commands) and operands (variables).

User Resources:
NameamountNote
Program size16,000 stepsEach instruction consists of a different number of steps.
M, markers3072bit
S, status markers1000bit
D registers8,000int16
T timer25616-bit
C, counters25616 or 32 bit

In addition to the user operands M and D, there are special M and D. They are used for various settings (Com2 communication port, RTC, etc.) and service functions (program start detection, errors, etc.) Addresses of special markers and registers start at 8000.

The LX3V has 138 instructions, of which 136 are similar to the Mitsubishi FX2N and 2 original: RS and PID. The instructions are for all occasions and are grouped into 16 groups: basic, arithmetic, shift and rotation, positioning, etc.
The instructions allow you to perform operations with numbers such as bit, int16, int32, float32, BCD.

The maximum program size is 16000 steps. How many instructions are there? Instructions are long and 1 step and 13, so I think that the maximum size of a real program will be about 2000 instructions, maybe more.

Wecon PLC Editor


Official programming software PLC Wecon. The current version is 1.2.0. Free, easy-installation weighs 28 MB.



Creating and loading a simple program in the Wecon PLC Editor:


Melsoft GX Works2 and Mitsubishi FX2N PLC compatibility


Wecon LX3V is a software clone of Mitsubishi FX2N. Therefore, for its programming, you can use the development environment for Mitsubisev controllers Melsoft GX Works2:


The capabilities of this program are the same as those of Wecon PLC Editor, plus in addition to IL and LD there are programming languages ​​FBD, SFC, ST.
But there is also a minus: GX Works2 sees LX3V as FX2N and works with it only through the round Com1 connector. Therefore, to use GX Works2, you need to get a special cable, which was higher.

Especially here the presence of a C-like language ST is relevant. He is more often preferred by programmers who have just come to the process control system from classical programming, until they have mastered the “LD-style thinking”. By the way, I understood the concept of LD itself only after the Step-7 courses.

Here is an example of programming Wecon LX3V in ST from GX Works2 from Vyacheslav Mezentsev, another data controller enthusiast:


However, a glitch was detected: the program on the ST normally loads into the LX3V, but after loading the PLC freezes. You have to reboot it with the “RUN / STOP” switch and then it works further without problems and there are no hangs when you turn it on again.

GX Works2 v.1.50 can be downloaded after registration from the Mitsubishi website. The trial version runs for 60 days without limitations. I have not found any broken versions in the network. If you buy, it is expensive.

My opinion is, you can do without GX Works2 with ST, programming for free on LD in the native environment of Wecon PLC Editor. Or hardcore in assembler-like IL, as I once had my first program for PLC Vipa. Just kidding, no need in IL.

Modbus communication


In LX3V, the Mod1 port Com1 does not work.
According to Modbas, the Com2 port and an additional 2 ports are working when using the LX3V-2RS485-BD expansion card.
Modbus features in Wecon LX3V PLCs:

To configure the Com2 port, special registers D8120 ... 8129 are used.

Modbus Slave and SCADA communication


The presence of the Modbus Slave mode allows you to connect Wecon LX3V to any modern SCADA. For example, to Simp Light:


In Slave mode, access to all operands of the controller (M, D, T, etc.) is simply opened to the addresses specified in the documentation.

Modbus Master and communication with external modules


Well, the presence of the Modbus Master mode allows you to connect any device working on Modbas to Wecon LX3V. For example, the Adam 4017+ analog input module:


First impressions of the PLC Wecon LX3V


The controller is easy to learn and work. First of all, because there are a lot of documentation, video tutorials and other materials on the Mitsubishi FX2N, which it is a software clone.

No programming glitches have been found so far, except for misunderstandings with loading the ST program from GX Works2.

A large number of user variables, various instructions and a maximum program size of 16,000 steps make it possible to create very complex programs.

The design of the PLC makes a good impression. The boards are made soundly, as far as I can appreciate with my programming eyes.

The question of reliability remains, but only time can answer it.

The certificate is (clickable):


Links


LX3V-0806MT: ru.aliexpress.com/store/product/Wecon-14-Points-Remote-Control-System-LX3V-0806MT-D/632791_32603603891.html
Wecon website: we-con.com.cn/en
Sales Department: sales@we-con.com.cn
Wecon page on Aliexpress: AliExpress.com/store/632791
Wecon forum: wecon.freeforums.net
Those. center (examples of programs): we-con.com.cn/en/support/technical-center/lx-series-plc
Mitsubishi website: ru3a.mitsubishielectric.com

---

Source: https://habr.com/ru/post/304752/


All Articles