filmov
tv
Introduction to PLC Programming with C++
Показать описание
============================
▶ You can read the full post here:
⌚Timestamps:
00:00 - Intro
00:41 - Background information
02:43 - Ladder Diagram program
03:26 - C++ program
06:33 - Integrating the C++ Program with the LD Program
07:26 - Conclusion
=============================
In this video, we're going to program a PLC using both Ladder Diagram (LD) and C++. The LD program will accomplish simple Motor Start and Stop operations. The C++ program will produce logging data of motor activations.
We'll use Phoenix Technology PLCnext Engineer to create the LD program, and Eclipse IDE to create the C++ project. PLCnext Engineer is used to run both the LD and C++ programs.
We will run our project utilizing the hardware and I/O on the PLCnext Starterkit.
The five programming languages specified in the IEC 61131-3 Standard are Ladder Diagram, Instruction List, Function Block Diagram, Structured Text, and Sequential Function Chart.
Most PLC Programming software is capable of programming using two or more of IEC 61131-3 Standard languages.
Generally speaking, PLC Programming software is not capable of higher-level language programming such as C++. C++ programs are created using other programming software.
The resulting C++ program can be added to or work alongside the PLC programming software allowing the IEC 61131-3 program and the C++ program to run together.
C++ programs can be easily created to produce log data to assist with Predictive Maintenance (PdM). A program of that complexity cannot be easily created using IEC 61131-3 languages such as Ladder Diagram.
Creating C++ programs requires an Integrated Development Environment (IDE). An IDE is a complete package that among other things, offers a code editor.
There are lots of C++ IDEs. Microsoft Visual Studio and Eclipse are two very commonly used IDE Editors. Eclipse is one of the simplest and that’s the Editor we use.
- We will use Ladder Diagram for controlling the MOTOR. The ladder diagram tells us that the MOTOR will run when we press the START switch and continue to run until we press the STOP switch.
- We will use C++ for producing logging data of motor activations.
- The C++ project is then added to the LD program in PLCnext Engineer.
- We then run the LD and the C++ programs after we download them to the PLC.
- As we operate the START and STOP switches on the Starterkit, the MOTOR will START, then STOP. Each time the Motor cycles, the Out Port value increments.
- We will use a log file to view the MOTOR activations complete with a Time Stamp. We use WinSCP to extract and view the contents of the log file. WinSCP is a secure file transfer protocol (SFTP) client software.
=============================
=============================
=============================
Missed our most recent videos? Watch them here:
=============================
To stay up to date with our last videos, make sure to subscribe to this YouTube channel:
=============================
=============================
#PLCnext #RealPars #plc
Комментарии