Friday, June 21, 2013

My first day on the PLC

FINALLY!!! After nearly two weeks, I've gotten the opportunity to work on something that fits my skill set.

Turns out that we had a glitch in the control systems for our #2 generator in Gilman. Apparently, the wicket gate that controls water flow to the turbine would always re-open no matter how often you tried to close it. This meant that our PLC programmer would be coming up to take a look at it and see what might be wrong. I dedicated my whole day to shadowing him in order to learn as much as possible about our control systems.

Turns our there are two parts to the control systems in Gilman. The first part, the most important part, is the PLC or Programmable Logic Control. This is the computer that lives inside the control panel for each machine. It contains all the logic for when to open gates and all the water level, temperature and hydraulic sensors. In general, the PLC is pretty simple and typically very stable.


(This is not our PLC but is a representative picture. I thought I had one of ours. I'll replace this soon)

Each of the vertical pieces is a module that handles inputs or outputs. Inputs would be from sensors, outputs would be to relays. One of these is also the CPU and another is the communication module (Ethernet). I believe the Power supply is separate and there is also a bridge (between horizontal groups of modules).

Our PLC is a PLCDirect DL205 Series. Supposedly we've standardized on this series across all of our sites. There are always new ones coming out but standardizing is also a good idea. I don't expect to be upgrading these for a while.

So in order to program the PLC, you need to connect to the internal machine network. This is a normal ethernet network, but is not connected to the internet (yet...). We then use PLC Direct's DirectSoft 5 programming software. It is programmed using Ladder Logic, which is apparently an electrical engineering thing but seemed straight forward enough.


Not the most informative image, but this is what DirectSoft 5 looks like. This shows relays and what they trigger. The left panels are debugging tools.

So DirectSoft 5 outputs into the PLC so it never produces a UI for anyone to see (OH THE HUMANITY?!?!?). Instead, the physical control panel is the UI, which is kind of novel. So in addition to DirectSoft, there is a remote monitoring tool located in the main office that aggregates information from all the PLCs (one per generator) so the operators can see everything all together. That is the other part of our control system and was created using a tool called InduSoft Web Studio. To be blunt, it sucks.

A screen from indusoft showing the status of the #2 Generator

It's incredibly bare bones in terms of it's look. We're a version behind so maybe it's improved, but I doubt it. It's designed to provide a read-only interface to the PLCs. It has the ability to provide write access to the PLC but we've found it to be buggy as you will find out. 

So, if you look closely at the image you can see two buttons in the middle of the page labeled OPEN WG and CLOSE WG. These buttons were added for unknown reasons in order to allow the operator to open and close the wicket gates without having to leave the office (lazy?). These buttons perform a write operator that closes a virtual relay in the PLC. That virtual relay is a parallel path to the physical relay that will trigger the wicket gates to open. The button in InduSoft is supposed to be an instantaneous button so that when the mouse button is down it closes the relay (on) and when the mouse button is up then it opens the relay (off). The problem, after a good deal of debugging turned out to be that the virtual relay was stuck closed (on). The VIRTUAL BUTTON was stuck... By clicking the button in InduSoft a couple times we were able to get the virtual relay to open (off) but we could not figure out how the relay got stuck in the first place.

One of the problems with InduSoft is that their components are closed. So beyond setting a couple properties in the on-screen button you don't have any control over how the button sets the virtual relay. The best I can come up with is that there's a momentary communication hiccup when the user stops clicking the button and it fails to send the relay open signal. Once that virtual relay is closed, there's no explicit way to open it. This is a bad design as you NEVER want there to be something in the PLC that can only be effected by the computer. We'll need to fix it.





No comments:

Post a Comment