Better Use Of Remote I/O With CODESYS-programmable Controller HMIs

Transcription

W H I T E PA P E RBetter use of remote I/O withCODESYS-programmablecontroller HMIsMachine automation (MA) and factory automation (FA) benefit fromincreasingly powerful components. Case in point: Some HMIs withPLC functionality (and CODESYS programmability) now supportremote I/O connectivity. m

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsAutomated machines and installations rely on remotesensors, motion axes, switches and actuating devices,and production data to function. Collecting inputs andsending outputs to these peripheral data nodes are I/Omodules. Remote I/O (sometimes abbreviated RIO orRI/O) usually takes the form of standalone hardware thatcollects the signals from field devices to feed back to a PLC(or rack into which a PLC is mounted), PAC, PC, or anothercontroller. But as we’ll explore, some new HMI hardwareintegrates controller functionality and connects directlywith remote I/O modules to simplify integration.The Weintek cMT controller HMIoffers PLC functionality and CODESYSprogrammability. It connects to hundredsof other controllers from dozens ofother manufacturers to simplify systeminstallation. The controller HMI acceptsanalog, digital, and thermal signals fromremote I/O to excel in oil and gas andwastewater applications. Plus users cancreate a cMT CODESYS project in CODESYSsoftware, and then use it within WeintekEasyBuilder Pro (EBPro) 6.0 software forstreamlined programming.S I M P L E R CO N N E C T I V I T YW I T H S O F T - P L C H M I s A N D R E M OT E I /OCA N o p e nT W O S E T S O F A N i R - CO PWITH TWIN iR-DM16 MODULESM O D B U S TC P / I PTWO SETS OF AN iR-ETNWITH TWIN iR-DM16 MODULEST H E H M I I N CO R P O R AT E S P L CF U N C T I O N A L I T Y A N D ACC E P T SCO N N E C T I O N S TO R E M OT E I /O.T H E H M I A L S O R U N S P R OG R A M SW R I T T E N I N CO D E S Y S L A N G UAG E S .E A S Y B U I L D E R P R O 6 . 0 A L L OW SA L L - I N - O N E P R OG R A M M I N G .PAGE 2F I E L D CO M P O N E N T SCO N N E C T TO T H ER E M OT E I /O.

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIs1Basics of remote I/O — and the Weintek offeringRemote I/O modules are cost-effective pieces ofhardware for system control and monitoring. Manywork even in hazardous locations, and most havebasic processing capabilities to run communicationsand transmit and receive data to and from a maincontroller. The controller in turn accepts this dataand executes higher-level application software.Because remote I/O brings connectivity closerto operations, it enables otherwise impossibleinstallations while minimizing wiring and itsassociated labor. In fact, use of remote I/O issometimes required by sprawling operationswith extensive arrays of I/O nodes or plants withexpansive physical layouts. Remote I/O systemssupport distributed machine design (where systemsare built on multiple frames) by consolidating HMIsand software. Some remote I/O module assembliesalso run much faster than local I/O and softwareand quick-connecting hardware for remote I/Osetups can make expansion simple should plantoperations need to grow.Remote I/O installations can reduce programming requirements becausethey complete simple tasks while letting main controls handle advanced(or high-speed) processing, measurement, and output commands.Such I/O functionality paired with controls programmed with CODESYSstandard languages serve factory, energy, process, mobile, embedded,and building automation.PAGE 3

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsIn many cases, remote I/O installations includeDIN-rail-mounted modules ganged with a buscoupler. This assembly then connects to thecontroller to share signals to and from mechanicalcontacts, valve positioners, flow and pressuretransducers, temperature transmitters, 4-to-20 mAdevices, thermocouples, visual and audible safetysignaling devices, and even drives to run electricmotors, pumps, and fans.Where remote I/O includes modules connectdirectly to controls via cables, throughput ofdata associated with configuration, diagnostics,and normal operations is fast and secure. Inanother departure from distributed I/O (whichusually includes multiple processors controllingShown here is an Ethernetcoupler that works withthe Weintek controller HMI.It’s a MODBUS TCP/IP slavewith dual Ethernet supportand Ethernet cascading —as well as direct supportof drivers generated byWeintek EBPro software.one operation’s various sections and physicallydistributed bus-connected I/O cards) remote I/Ousually relies on a single processor collecting allthe I/O signals.Where fieldbus interfaces are pre-Shown here is an iR-COP CANopen bus couplerwith an iR-DM16 module. The bus couplersupports baud rates of 5 kbps to 1Mbps and allowsquick node and baud-rate changes. The coupleralso allows remote changes to communicationsettings — and direct EBPro driver supportwithout the need to import code. Shown here(lower right) are plug-in modules that installwithout a screwdriver; only a flathead screwdriveris needed to remove cables. Up to 16 digital I/Oare possible per module (including transistor andrelay outputs); up to four analog I/O are possiblewith 16-bit resolution and configurable voltageranges including temperature RTD and TC.PAGE 4

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsintegrated into the hardware, they’re fixed. In contrast, modular I/Omodules let design engineers select from several options. No matterthe format, open fieldbus interfaces impart more flexibility thanproprietary interfaces (which may limit how many system and fieldcomponents are compatible). Case in point: Weintek Ethernet MODBUScouplers can daisy-chain to connect diffuse Ethernet devices, and thenthe last Ethernet port in the series can be used as a diagnosis port.Taking flexibility still further are software-based (soft) PLCs. As we’llexplore, these controllers are spurring more remote I/O use and evendisplacing local rack-mounted PLCs and I/O in some cases.2Controller HMIs (cMTs with PLC functionality)and bus couplers with the I/OWeintek’s cMT controller HMIs run high-performance operating systems.They use remote I/O modules and Weintek’s MODBUS TCP/IP andCANopen couplers for networking. The cMT HMIs have dual processors— one strictly for HMI functions and the other for soft PLC functions. TheHMI logic includes Weintek’s industry-recognized cMT HMI, which allowsremote monitoring and an array of other features. The control logiccomplies with IEC 61131-3 for open-source programming and works asa performance real-time system — with fault tolerance and dedicatedsystem memory, processing power, and other resources.Control logic runs on a real-time operation system to guarantee realtime performance. HMI logic and control logic can be treated likeseparated devices, as they have their own memories, storage space, andprocess control. Heavy processing demand from either doesn’t affectthe other. That means the control logic maintains its high-efficiencyreal-time operation system while the HMI logic can help process batchprocessing, data collection, and display.PAGE 5

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsIn fact, the Weintek design runs an asymmetric multi-processing(AMP) architecture. Compared with symmetric multiprocessing (SMP)found on the majority of today’s computers (which run a single OSsuch as Windows across all cores of the CPU) AMP lets Weintek usedifferent combinations of OSs on one CPU chip. That is what allowsone general-purpose HMI logic running on one core and one realtime control logic on another core. Again, the systems can be treatedas separate devices, so each has its own Ethernet port — and toconnect to both, the user will need two RJ45 cables.Another piece of the automation-network puzzle is the buscommunication system. Many installations require an internalIn traditional componentswith soft PLCs, symmetricmultiprocessing (SMP) meanssystem resources are shared— which degrades real-timeperformance. The WeintekcMT CODESYS HMI with softlogic outperforms even sometraditional standalone PLCs onthe market.HMI with SOFT PLC HAS ARCHITECTURETO O U T P E R F O R M A L T E R N AT I V E SA T W O - CO R E C P U R U N ST W O O P E R AT I N G S Y S T E M S .HMILINUXSOFT PLC( CO D E S Y S )CO N T R O LCA N B U SETHERNETARMCO R T E X A 9CO M 3CO M 2CO M 1C M T CO D E S Y SS O F T - L O G I C A P P R OAC HETHERNETARMCO R T E X A 9T H E S O F T P L C G E T S A D E D I CAT E DCA N B U S A N D E T H E R N E T F O RREAL-TIME PERFORMANCE.R TO ST R A D I T I O N A L A P P R OAC HCO R E 1CO R E 2M U L T I - CO R E P R OC E S S O RSHARED RESOURCES DEGRADESREAL-TIME PERFORMANCE.CO N T R O LHMIO P E R AT I N G S Y S T E MCO R E 1CO R E 2M U L T I - CO R E P R OC E S S O RPAGE 6

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsbus — sometimes called an iBus, memory bus or (in installations with standalonehardware) local bus — to connect internal system components. Shown below are thespecifications of four versions of the Weintek iR-series iBus.MODULESMODELINPUTSOUTPUTSCYCLE TIMECOMPETITORCYCLE TIME4iR-DM16 x 432320.6 msec3.2 msec32iR-DQ16 x 3205120.9 msec25.6 msec32iRDl16 x 3251203.3 msec25.6 msec32iR-Dl16 x 16 iRDQ16 x 162562562.1 msec12.8 msecThe bus modules get higher speeds than competitor offerings because the latter usesslow one-by-one SPI — and series connections to the coupler. In contrast, parallel I/Oconnections in the iR-series iBus to the coupler is efficient without incurring highercosts. These offerings have strong noise resistance as well.3Control with a soft PLC (on the HMI)Soft PLCs are software programs that run real-time tasks on computers — multitasking functions normally associated with traditional PLCs. Chief among these areI/O and discrete and PID control with networking, data handling, and computationalcapabilities.PAGE 7

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsConsider the Weintek cMT CODESYS controller HMI with soft-PLC functionality.This option delivers dependable and deterministic program execution. In terms ofspeed, its execution of LoaD (LD) instructions —to load information from memory —and MOVe (MOV) instructions — to move information from operand to register — iscomparable to that of traditional industrial PLCs:CMT CODESYSLD10 nsecMOV16 nsecMITSUBISHI FX5 MID-LEVEL MARKET OFFERINGLD40 nsec maximumMOV100 nsecMITSUBISHI Q100UDEHCPU 1000K STEPS, 4K I/OLD9.5 nsecKEYANCE KV5000LD10 nsecOmission of the separate PLC makes for a more compact design. There’s also internalcommunication between the controller HMI’s dedicated display logic and dedicatedcontrol logic, which makes for faster display of data — and the ability to monitorcontrols directly from the display.Of course, soft PLCs require implementation on suitable hardware with sufficientprocessing and memory capacity, as well as Ethernet, I/O, COM, and other modes ofconnectivity. They also require programming. In the last section of this white paper,we’ll share how to create and download a CODESYS project to a Weintek HMI PLCprogram; monitor a project running on the soft PLC; and visualize PLC informationwith EBPro.PAGE 8

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIs4CODESYS and its application inHMI PLC componentsIEC 61131-3 defines thesemantics, syntax, and displaysof common languages forcontroller programming.CODESYS is a programmingenvironment that supportsdevelopment of code in allfive 61131-3 languages and Weintek cMT HMIs withCODESYS allow efficient setupand operation of the controllerportion of the hardware.Recall that CODESYS (Controller Development System) is a leading IEC61131-3 programming tool. CODESYS is widely used because it supports61131-3’s five programming languages — those based on ladder diagrams,function-block diagrams, sequential function charts, instruction lists,and structured text. Because CODESYS output is machine code nativeto common processors, it also makes for control that’s faster and morereliable than that based on interpreted code.In fact, CODESYS is a proven and easy-to-use IEC 61131-3 platform; theopen standard works for programmable logic controller (PLC) setup. Theprogramming environment generates well-proven code for factory, energy,process, mobile, embedded, and building automation. Features includedata monitoring, scanning, tracing, and debugging. There is a variety ofadd-on modules and libraries. Plus there’s subversion and version control and MATLAB integration is also an option.PAGE 9

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsEasyBuilder Pro 6.0 is the latest versionof regularly updated design softwarefrom Weintek. The visual projectediting tool supports communicationprotocols that include Ethernet/IP andModbus TCP for easy connection ofperipheral (field) devices.Because IEC 61131-3 and CODESYS let system programmers mix programminglanguages for projects, there’s optimization of code — so a programmermight use ladder-diagram logic for basic interdependent machine functionsalongside structured text to run interpolated tasks that are more complicated(to give one example).5Programming language of EasyBuilderPro (EBPro)Consider the Weintek cMT HMI with built-in CODESYS. It lets users visualizeprojects using EasyBuilder Pro (EBPro) — the manufacturer’s ownprogramming tool. The cMT communicates with hundreds of PLCs fromdozens of manufacturers.PAGE 10

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsThe cMT communicates with hundreds of PLCs and devices fromdozens of manufacturers, enabling seamless data exchangebetween different systems. The cMT also connects directly withhandy components like barcode readers or Ethernet printers,removing the hassles when integrating different components. cMTruns various IIoT protocols including MQTT and OPC UA. Remotemonitoring with cMT Viewer and VNC is fast and easy, even on aWi-Fi connection.How does EasyBuilder Pro accept code imported fromCODESYS?Users need to export the symbol configuration from a CODESYSproject as XML file. Then, users import the XML file into EBPro togive EBPro the symbols (tags) for assigning to different screencomponents such as buttons and lamps. Again, cMT HMI logicinterfaces with the control logic via internal communications fornetworking that’s far faster and simpler than that through RJ45 wires in traditional setups. cMT HMI logic is also capable ofmonitoring CODESYS program status.PAGE 11Click on the hotlinked thumbnails towatch videos showing the creationof a simple CODESYS project in justa couple minutes; how to importtags into Weintek EasyBuilderPro (EBPro) 6.0 software; and ademonstration of the PLC control.

WHITEPAPER Better use of remote I/O with CODESYS-programmable controller HMIsAlthough they are treated as separatedevices, users can even monitor controllogic from the HMI. What’s more, it’s is adefault option so users don’t have todesign a project to do this.WEINTEK develops, designs, andmanufactures practical HMI solutionsin the new IIoT era. WEINTEK’s missionis to provide quality, customizable HMIsolutions that fulfill industrial automationrequirements while maintaining customersatisfaction by providing on-demandcustomer service. To learn more aboutWeintek’s HMI products as well as smartfactory automation and IIoT solutions,please visit www.weintek.com.Click on the hotlinked thumbnails to watch videos showing ademonstration of the trace function within CODESYS; how toadd a module in CODESYS (which in turn imports into EBPro forcontrol); and a demonstration of direct control through a cMTwithout a PLC. It shows how it’s possible to directly control aremote I/O with all Weintek product series having CANopenconnectivity — including eMT, MT8092XE, and cMT products.PAGE 12

The control logic complies with IEC 61131-3 for open-source programming and works as a performance real-time system — with fault tolerance and dedicated system memory, processing power, and other resources. Control logic runs on a real-time operation system to guarantee real-time performance. HMI logic and control logic can be treated like