Web Based Remote Monitoring Case Study
A typical inquiry was, "I want to receive an email when my CNC machine finishes a long job. How do I hook up an embedded server to do that?"
"Oh, there's one catch: My CNC machine is old. Can I just hook up something across one of the lights on the panel?"
You can handle this with any of the Control Solutions embedded servers that have I/O points, including IB-100, IB-110, AddMe Jr., and AddMe III.
The example shown below uses an IB-100, and illustrates both inputs and outputs. You can apply this same approach to AddMe Jr. You can use just the input part of this example with IB-110. You can use the input part of this example to expand to up to 8x 120VAC inputs on IB-100, or 12x 120VAC inputs on AddMe Jr.
Components required in addition to the IB-100 are: 1 ea. Opto 22 PB4 motherboard (not PB4A), 2 ea. IAC24 solid state input relay, 2 ea. OAC24 solid state output relay.
The '24' in the part numbers IAC24 and OAC24 means 24VDC logic. You only need a single 24VDC power supply if you use the 24V versions of the Opto 22 parts. Other voltages are available. The input and output voltage rating for IAC24 and OAC24 is 90-140VAC. The output rating is 2 amps.
We used 120VAC I/O in our example here just because that is one very common requirement. Opto 22 has DC versions of input and output relays, and other load ratings as well. Furthermore, Opto 22 is not the only brand of solid state relay that could be used in this manner. In fact, some of our customers have even used mechanical relays instead.
You do not need additional I/O modules at all if you are using 24VDC or less. The FET outputs on all Control Solutions devices are rated for 30VDC at 1 amp, and relays are rated even higher. The inputs are all tolerant of inputs to 24VDC and will correctly sense on/off at up to 24VDC. You will only get linear voltage measurements in the range of 0-10VDC, but will get reliable on/off detection to 24VDC due to internal current limiting and voltage clamping.
The exact same wiring diagram shown above works on AddMe Jr, and is readily adaptable to other Control Solutions embedded web servers.
Opto 22 PB4 motherboard with 2x IAC24 input relays and 2x OAC24 output relays, and Opto 22 PB4 motherboard with 4x IAC24 solid state input relays. Click here for information on Opto 22 solid state relays. Click here for ordering information on Opto 22 motherboards.
The screen shots below show how to set up the IB-100 shown in the wiring diagram above to send an email when either of the two AC inputs are "turned on" or have 120VAC applied to the inputs of the solid state relays.
There is no reason you cannot use all 8 inputs of IB-100 to generate email alerts, or even more inputs on AddMe Jr. or AddMe III. This is simply an example and we decided to wire up 2 inputs for sake of discussion.
Start by configuring the input types. You will need to set the jumper positions to configure input types on IB-100. If you are using IB-110, AddMe Jr., or AddMe III, configuration of the input circuit is done electronically under software control.
You need to tell software for any of the above models how you have (or how you want to) configure hardware. In our example, we are using the first 2 analog/universal inputs for solid state input relays. To use the IAC24 input, select Dry contact, Inverted. The "inverted" means voltage from a pullup resistor is present when "off", and we pull the input to ground or logic zero to indicate "on" - thus the inverted logic sense. When 120VAC is applied to the input of the IAC24, its logic output will sink current or pull the signal to ground or logic zero. If we have selected Dry contact, Inverted, applying 120VAC to the IAC24 will result in a data value of "1", while no AC present will result in a data value of "0" in the integer registers beginning at register number one.
Next, set up a Threshold (Action) Rule. The rule template has quite a few optional settings, but to set up a simple rule that will generate an email notification, we can skip most of them. Select the register number that you have connected to an IAC24, and simply set the rule to test for "Greater than zero". This will result in the event testing true when 120VAC is applied to the input of the IAC24, and false when no voltage is present. The name is technically optional, but is handy since it is included in the default email message you will receive.
Once the rules are defined, we need to tell the event notification process that we want to receive emails as a result of these events. Find the Events page under Email Alerts and check the boxes for Notify on True (and optionally Notify on False), and one or more recipient groups. Be sure to click Update when you have made changes since this is what sends the settings from your browser to the IB-100 (or similar device). IMPORTANT: The settings are only temporary in the device until you go to the Config File page and click the Save button to save your configuration to non-volatile memory (Flash file system).
Before your device will actually send emails, you need to configure the email host. The page illustrated below is "typical" of what a host setup may look like. If you do not know your SMTP host name, you will need to consult with your ISP provider or IT department. If the email login name is something other than your email address, enter that as User Name. You must include your email address as System Contact at the bottom of this page even if already entered as User Name. Check the User Authentication box to tell IB-100 (or AddMe) that it should log in with a user name and password. If you do not require any login to send email via your SMTP host, leave the Use Authentication box unchecked.
One last detail... Set up a recipient or two. There are three "recipients" that may be configured, but each may be multiple email addresses separated by semicolons. Check the box for standard or custom message, or both. If including a standard message, select whether full format or cell phone abbreviated format. If you click the Send Test button, you will initiate sending an email immediately regardless of whether there is any activity on the inputs.
That should do the job. But what it things don't seem to be working? Start here:
1) Are the inputs seeing 120VAC? Go to the I/O Data page and see if the register data changes from 0 to 1 when AC is applied to the respective input. You will need to click the Update button to refresh the web page each time you toggle the input. If you do not see the register data change between 0 and 1 when AC is applied, fix this problem before trying to proceed.
2) Are the threshold rules seeing the input transitions? Go to the Thresholds page under System Data and note the TRUE/FALSE indication in the last column. This indication should change from FALSE to TRUE when AC is applied to the AC input. Click refresh to update the page. If you do see data in step 1 above but do not see the threshold result change, go back and double check the rule setup.
3) If you are seeing the rule results change correctly, but not getting any emails, there is a problem with the email setup. The Send Status shown above will eventually come back with some number other than zero if there is a problem with email. (You are not using Recv Status at this point because you are not trying to send email back to the IB-100.) The definition of error codes is shown in the Quick Help section of the page illustrated above (scroll down when viewing this page in the actual device). Double check your email configuration settings, and contact your IT department or ISP provider if you are not familiar with SMTP host configuration issues. Use the Send Test button to generate test emails if applying AC to the IAC24 is inconvenient.