Summer Internship at Gerber Technology

Beckhoff PLCs and my experience working with them

Posted on September 12, 2019


It has been a couple weeks since my last post, but in that time a lot has been going on as I have finished up my summer internship and started school. I hope to delve into that a little more closely in this post, and I would like to cover the upcoming details of my projects in future posts. I haven’t talked too much about what I have done this summer at my job as a Software Controls Intern this summer at Gerber Technology. I can’t specify too closely about what I have worked on due to NDAs, but I will go over the gist of what I have accomplished. Gerber Technology makes CNC cutting and spreading machines that are used for a variety of industries like the textiles and aerospace industries. At Gerber, I worked as a part of the Electrical Engineering and Software Engineering groups and was tasked with controls engineering projects. During the first couple weeks of my internship, I was introduced to Beckhoff PLCs and Structured Text and was told to explore building testing rigs. Initially that involved toggling outputs and displaying input data through an HMI module, but I soon began delving into the advanced capabilities of the Beckhoff PLC. I grew quite familiar with TwinCAT 3 and EtherCAT which the Beckhoff PLCs are built upon. TwinCAT 3 is essentially a program that runs on top of Windows 10 PCs that utilizes Windows PC hardware to run a PLC control system. As a result, TwinCAT3 can be downloaded onto any Windows 10 PC to run PLC software either locally or as a master controlling another PLC running TwinCAT 3. EtherCAT is a fieldbus protocol through which various nodes communicate with the Beckhoff PLC and pass data to the PLC. The flexibility of the EtherCAT protocol really allows for a large variety of things to be a part of the EtherCAT network, and among these various nodes include motor controllers for driving DC motors.

Part of Beckhoff’s product line is a fantastic tool called Beckoff Motion that allows users to program and control motor controllers through the use of Beckhoff PLCs. Beckhoff achieves this by implementing an open source, device independent standard called PLCopen that provides useful functions for driving motors like MoveVelocity, Home, and Stop. So, all I had to do was include the relevant PLCopen libraries that Beckhoff had implemented into Structured Text project and incorporate my motor controller settings into the project to drive my motor at a projected velocity and position. The video below shows me controlling the velocity of a motor using Beckhoff Motion through an HMI:







Once I was able to implement motion control with a Beckhoff PLC, I was tasked with prototyping a control system for a CNC spreader using a Beckhoff PLC. The CNC spreader relied on outdated technology to control the various AC and DC motors on the machine and was overall much harder to debug, but the rest of the electronics system and the mechanical components were still very much up to spec. So, I began my task by realizing the existing energy sources on the machine and routed them through my new control system. In addition, I traced where all the sensor inputs and limit switch inputs were going into the old control system and simply hooked them up to my new Beckhoff PLC control system. In addition, I configured a couple of motor controllers to interface with the preexisting DC motors on the CNC spreader and configured the motor controllers as nodes on the EtherCAT bus. So, the PLC would be able to control the motors through the motor controller. As a result, I was able to get some semblance of control over the CNC machine and I was able to configure it through my Structured Text program.

In addition to my work at Gerber Technology, I have kept busy outside of work with working through The C Programming Language. I have worked through Chapters 3 and 4 completely and I am part way through Chapter 5. I have also been spending quite some time with the CloudandCard project and have made some significant design changes. I have decided that I should write the PC to ESP8266 code in C as opposed to implementing it with a Bash script because my check sum operation can be more easily implemented in C. I would simply have to add up the ASCII values of the characters that I am passing in a buffer and have the ESP8266 simply compute the same sum. This way, I will be able to verify that my buffer has been transmitted correctly. From C, transmitting on a serial port works the same way as it would through a command on the shell, but instead of invoking a shell command, I use system calls to open, read, and write to special files referring to the serial port. The code that I have worked upon is now on my GitHub repository called CloudandCard.

As for what I want the blog to look like in the future… I am not quite sure what it will include in the near future, but I will certainly keep posting. I would like to make a post on EtherCAT and explain how it works because I could not find a clear explanation of EtherCAT anywhere in the future. Maybe, I will continue posting neat about neat new technologies like that on this blog because I will be learning about a lot of them in my classes this semester. Also, I am taking a lot of design based courses this semester at college and I would like to post about the neat discoveries I make, but I do not want to breach academic integrity. I will try to be careful about what I will publish and I will certainly make a large post at the end of the semester about my projects.