We recently had the opportunity to create a furnace control system for a customer. We built the system using an Omron CJ2M Programmable Logic Controller and a Parker IPX series Human Machine Interface touchscreen computer running Windows XP Pro. Part of the sales pitch was the system's ability to send email and text message alerts if the furnace had a problem. A few lines of VBA code running on the HMI perform this function nicely. However, when I traveled out-of-state to help our customer with the start-up at their customer site, we ran into some trouble.
The VBA code executed flawlessly on my laptop at the hotel and at the customer site if I connected to the Internet using my phone, but if I connected to the Internet using the customer's Internet Service Provider, the emails would not go through! Of course, this start-up was taking place over a weekend and there was no IT support help available on Sunday. I was scheduled to fly home Monday afternoon, but resolved to stay longer and get this issue fixed. I was not going to tell the customer "The problem is your ISP. You need to contact them and get it worked out." That is NOT how we do things!
It turns out the ISP (I don't want to mention names, but it rhymes with AP&P) scans all the traffic through their system and blocks emails sent by scripts like the one we were using. Apparently, these types of scripts can be used by evil-doers to send out spam without leaving a copy of anything on a server anywhere. It was obvious we were not going to get them to change their policy... A work around was needed.
A quick trip to the local T-Mobile store secured us a mobile hotspot device that could be USB tethered to the HMI to provide unfettered Internet access and then the real fun began. I could not believe the hurdles that kept popping up! Here are the gory details:
- The USB tethering only worked if you first connected wirelessly and turned it on. It turned off with every power cycle. No good!
- A trip to Best Buy produced a WIFI USB dongle since the HMI did not have wireless built-in.
- Of course the HMI did not have a CD drive either, so the software CD had to be copied to a USB stick to get it installed.
- Wireless software installed, WIFI connected to T-Mobile Hotspot, and email messages started flowing. Hooray!!
I thought we were done and was planning my flight home when I remembered that it's always a good idea to re-boot and make sure everything still works. After the mandatory power-cycle test, the HMI would no longer talk to the PLC! Turns out the HMI software was now trying to route through the wireless ethernet connection to get to the PLC instead of using the wired one. So I pulled out the wifi USB dongle and saw the HMI and PLC start talking again. When I re-inserted the wifi dongle, everything stayed peachy.
The final piece of the puzzle was a batch file that runs at start-up to momentarily disable the wifi and allow the HMI to connect to the PLC first. We finally had a system that got the customer what they wanted: email and text messages every time the system had an alarm.
The customer was very happy and excited to see it finally working. But then they wanted more... Can we get another round of messages when the alarm goes away so that everyone knows it was fixed? What about automatic messages at 9am and 7pm every day just to say everything is OK? Can the OK message include the furnace temperature?
There was only one possible answer: "Of Course!" After some additional coding, it was done. They got everything they wanted and we did not let anything stand in our way to give it to them. Just another day at I-IDM.
— Jack Marsh