Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instrument Control Systems Seminar 2014, 20 th -24 th October 2014 PLC Application Development with TwinCAT 3.1 D.Popovic, ESO/DoE/CSE/ICSSW.

Similar presentations


Presentation on theme: "Instrument Control Systems Seminar 2014, 20 th -24 th October 2014 PLC Application Development with TwinCAT 3.1 D.Popovic, ESO/DoE/CSE/ICSSW."— Presentation transcript:

1 Instrument Control Systems Seminar 2014, 20 th -24 th October 2014 PLC Application Development with TwinCAT 3.1 D.Popovic, ESO/DoE/CSE/ICSSW

2 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 2 Topics PLC Programming Language (ST) OPC UA communication protocol HW access from PLC program Debugging GUI development including templates PLC libraries – creation and usage

3 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 3 IEC 61131 Standard IEC standard for Programmable Controllers Part 3 (IEC 61131-3) defines programming languages Our standard is Structured Text (ST) Program organization units (POU) Functions Function Blocks (FB) Programs We also use C/C++ (code re-use)

4 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 4 Structured Text (ST) vs. C C int i; double d = 0; for (i=0; i<=10; ++i) { d = d + 10.0 * i; } ST i:INT; d:LREAL := 0; FOR i:=0 to 10 DO d := d + 10.0 * i; END_FOR

5 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 5 PLC Cycle

6 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 6 Traditional vs. PLC Programming Traditional for (i=0; i<10000000; ++i) { // Can take a while do_something(); } PLC FOR i:=0 to 99999 DO do_something(); END_FOR FOR i:= 100000 to 199999 DO do_something(); END_FOR FOR i:= 200000 to 299999 DO do_something(); END_FOR Cycle 1 Cycle 2 Cycle 3

7 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 7 OPC UA Communication Interface OPC Unified Architecture Interoperability standard developed by the OPC Foundation. Improved COM/DCOM −OS Platform independent (not only Windows) −Scalability −Security −Configurable time-outs Multi-platform implementations – −ANSI C, −Java, −.NET, −...

8 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 8 UPC UA Client View

9 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 9 Embedded PC (PLC) OS Yet another Windows PC OS is Windows 7 Embedded Remote Desktop Connection to Login −User: “Administrator” −Password: “1” If something goes wrong: 1.Log into PLC 2.Execute “shutdown /r” from command prompt 3.The PLC will reboot

10 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 10 Embedded PC (PLC) – CX2030 PLC Device Control via OPC UA OPC UA Client (e.g. UaExpert) Beckhoff OPC UA Server PLC App (to be developed) HW ADSOPC UA Win7 Embedded EtherCAT TwinCAT 3 PLC Runtime TwinCAT 3 IDE ADS

11 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 11 PLC Demo Program with HW Access Task: IF Temperature > Limit (e.g. 26 degC) Turn lamp ON Intensity proportional to temperature (1 degC = 5000 bit) Inputs: Temperature (analog) Lamp status ON/OFF (digital) Outputs: ON/OFF control signal (digital ) Intensity (analog)

12 Instrument Control System Seminar, 20 th -24 th October 2014, Slide 12 PLC Demo Program Wiring SignalTypeI/O ModuleChNote TemperatureAIES320211 bit = 0.1 degC Status ON/OFFDIES10081 Control ON/OFFDOES20081 IntensityAOES40081 Range [0..10V], [0..32767 bits]


Download ppt "Instrument Control Systems Seminar 2014, 20 th -24 th October 2014 PLC Application Development with TwinCAT 3.1 D.Popovic, ESO/DoE/CSE/ICSSW."

Similar presentations


Ads by Google