AlphaWebFX Help
October 2011
Welcome to the on-line help for AlphaWebFX. Let's get started! (todo - useful photo's and images to follow)
What it is and does
AlphaWebFX is a Windows based PC application that connects to a Mitsubishi Alpha 2 (XL) or FX Series Programmable Logic Controller (PLC). The application generally gets raw data from the target device and re-formats that data into meaningful real world values and engineering units, for example OutsideAirTemperature 21.5 DegC, and GarageDoorStatus OPEN. AlphaWebFX then generates a standard XML file (for your own data tools), a simple web page (HTML) file for serving off the host PC, and a Comma Separated Value (CSV) file which can be opened in a spread-sheet application and be used to create a pretty graph. AlphaWebFX can send the daily CSV file to you via email.
Most usefully, AlphaWebFX tests each formatted value for alarm conditions that you set up. For example, you may want to create an alarm when a room temperature, like a server suite, goes above a certain value. AlphaWebFX can send alarms to your email (and CC to other users), and also can send "reset" notices to advise that a previously alarmed value has returned to a normal condition.
In conjunction with a modest PC, a low cost Mitsubishi Alpha or FX PLC, a serial communications board, a few sensors and an Internet connection - AlphaWebFX has a great number of potential uses from remote site telemetry to server suite monitoring, in many application scenarios from home automation to commercial plant controls.
AlphaWebFX runs from the System Tray
Unlike previous versions of AlphaWeb - AlphaWebFX runs from the system tray. So hover over the icon; right-click; then choose "Show" to open the new interface.
Get a PC connected
To begin with you will of course need a host Windows PC. The intention of AlphaWebFX is that you're taking advantage of a PC which is already running for some other purpose - whether it be a server blade, a desktop at work or an old laptop you have shoved in a broom cupboard at home which is acting as a file server. In any event - anything that can run Microsoft .Net Framework 2.0 is enough - recommended though is Win Xp / Win 7 - 1 Ghz processor - 1 Gig RAM. You will need either an inbuilt Serial Port on the PC, or a USB to Serial adapter connected.
Next up you will need a connection to the target controller. If you are using an Alpha 2 (XL) then you will need a CAB-GSM adapter fitted under the expansion slot of an AL14 or AL24 device (AL10 devices are NOT capable of this). Connect a Null-Modem cable between the DB9 connector and your Serial Port. If you are using a FX Series PLC (FX1S thru FX3G) then you will need an appropriate RS-232-BD or RS-485-BD communications adapter fitted. As the range of options here are truly huge then consult your PLC hardware manual for the options. Again, connect your module to your serial port with a null-modem cable.
Get your PLC Setup
The AlphaWebFX Alpha Driver will poll these default device ranges:- DI1-8, AI1-8, DO1-6, CB1-8 and CW1-8. Importantly, CB (user Bits) and CW (user Words) must be configured using the AL-VLS software - otherwise your Alpha will return an error code - and AlphaWebFX will not update any points in these ranges.
The AlphaWebFX FX Driver will poll these default device ranges:- X0-7, Y0-7, M0-7, D0-7. Importantly, you must NOT configure "CheckSum" and "CRLF" in your PLC options when programming your serial communications adapter in GX IEC Developer or GX Works 2.
For both Alpha and FX ensure the communication settings for the serial port are "9600, 8, N, 1". Now let's look at the PLC Setup tab on AlphaWebFX:-
Mitsubishi PLC Type
With regards to an Alpha you must set the Station # to 0 (As RS-232 is a 1-to-1 channel). Otherwise the communication will fail. The FX PLC if connected via RS-232 should also be set at Station # 0, however as the FX can be used in a multi-drop RS-485 situation, you may select a Station # of 0 through 15. With the FX you may also set the PLC Response Delay - never had to set it above zero personally - but it's configurable if you need it!
Communication Settings
For either device you must specify the PC Serial Port to use; and super importantly the PC Read Delay interval value. This value sets how long AlphaWebFX waits for after sending a command to the target device before checking the device response. The device may be connected directly to the PC, in which case 100mS may be fine, however the device may be connected via an Ethernet to Serial device server, 150 meters away, in which case 350mS may be required! In any event, press the [Test Connection] button and if everything else is set correctly (communication settings, baud, etc) and you get a "Response Failed Protocol" error then increase the PC Read Delay value until the error goes away.
Get your Data Points Setup
On the Data Points tab you can configure how AlphaWebFX formats the raw data returned from the device and what constitutes an alarm condition (optional).
To add a new point to the grid Right Click your mouse over the grid and choose New...
On the blank line that appears click into the Point box and enter the relevant point of the target device; for example "ai1" for an Alpha's first analogue input. Tab across to the next box and enter a meaningful user label. Tab twice to Units and enter the formatted values' unit of measurement. LowDef and HiDef are the upper and lower formatting values to use. For example, for any binary point value (DI, DO, X, M, Y, etc) the device will return a 0 or 1. Set the LowDef value to reflect the 0 state user definition and HiDef value to reflect the 1 state user definition.
The only exception to this rule is the Alpha's Analogue Inputs. With these we know the AI has a resolution of 9 Bits - therefore LowDef can be the 0 Volts range value and HiDef can be the 10V range value; as specified by the actual sensors range of measurement. For example an indoor air temperature sensor may have a range of -10 DegC at 0V and +40 DegC at 10V output...
Note: As the FX Series PLC analogues are derived from expansion modules with varying resolutions there is no support to reformat those values using LowDef and HiDef. It is assumed that the final value of any D Store is already formatted by your code in the device.
You can configure up to 32 data points on the grid.
New Features! (Alpha Driver Only)
Updated November 2013 (Version 1.0.0.8 of AlphaWebFX)
Thermistor Scaling
As the Alpha supports 0-10 VDC analogue inputs I got to tinkering with various thermistor sensor input ideas, as these devices are so inexpensive and perfectly suited to environmental monitoring - if you can harness their non-linear response to temperature change. As a result, various algorithms were experimented with, from the full Steinhart-Hart equation to my personal favorite - the "econo-sense voltage divider and man-fridge solution" for around a quid.
From the Tools Menu choose Thermistor Setup...
(If you do proper electronics and want the detail behind how the Thermistor options work then email me - although there is NO assurance these options are accurate!)
Meanwhile, for the rest of us, "Opt 7. Volts @ Temp" is the simplest option. Choose a Thermistor of say 100 K @ 25 Degrees C, then complete this circuit:- apply 24 VDC onto a 120 K Ohm resistor then connect that to the Thermistor then wire the Thermistor into an Alpha analogue input. Stick the Thermistor into the fridge for a while, measure the temperature with another thermometer, measure the voltage at the Alpha. Record those readings. Now hold the Thermistor in your hand for a while, again measure the voltage at the Alpha input. Record those readings.
Finally, enter HighTemp and corresponding VoltsHigh voltage, then enter the LowTemp and corresponding VoltsLow voltage into the dialogue shown above. Essentially we now have a linear voltage scale between your high and low temperatures. It's crude, but effective, and over such a short range, is pretty accurate in real life. =)
Weather Service (using the Where On Earth ID)
You can spend £40 plus on an outside air temperature sensor with a 0-10 V output, OR if your AlphaWebFX host PC is Internet connected, you could instead use an online weather service to determine the current ambient for your location. Yahoo! have a RSS feed to get the temperature for any valid location that maps to a WOEID (Where On Earth ID). To utilise this feature choose Tools > Weather Setup...
Select [ ] Fetch Weather Data if you wan the Internet service to be polled every periodic cycle, then punch in the WOEID (to get this just Google WOEID codes, and do the necessary). Finally, select whether you want the returned temperature value in Deg C or Deg F as required. To utilise the weather values just enter "ws" into the LowDef of any Integer type data-point. (If an AI point, then the AI value will be replaced with the provided temperature.)
To test your WOEID setup choose Tools > Weather Now. If successful, you'll actually get the whole response text...
Get your Alarms Setup
For any point in the Data Points grid you can configure an alarm threshold value or change of state, depending upon whether the point is binary or integer. For an integer point just enter a value to compare against, and choose the evaluation from the drop down list as shown:-
For a binary point you must enter either the LowDef or HiDef value as the CompareValue, then again choose the required evaluation from the list. For example:-
To DELETE any data point select the entire row by clicking on the arrow on the left most column then press the DEL button on your keyboard.
Save Configuration
Once you have done any editing on the AlphaWebFX interface, for example added any data points or changed a setting always choose File > Save from the main menu.
All the configuration settings are saved to a file named appConfig.xml - and this is stored in the same folder that AlphaWebFX.exe is started from.
Client Setup
On this tab you set what the program generates as output and how the installation is uniquely identified in the output files AlphaWebFX produces.
Standard Output - select what files are to be produced at the end of each successful PLC Polling and Processing Interval. The interval minutes are 1, 5, 10, 15, 30 or 60.
You MUST set the target output folder, a meaningful Identifying Label and a MAC Address. To choose a MAC address click on any of the adapters that are in the list.
Files that are generated will include the details set here - as a form of validation that the data is from the device you think it's from. For example:-
If you want to configure AlphaWebFX to automatically connect to the target device when the program starts then check the box. For this to be useful you might consider adding a link to AlphaWebFX.exe in your Windows Startup folder too.
When you're done - Save the configuration.
Email Setup
AlphaWebFX can send you emails to include ALARMs, RESETs and the CSV Datalog file each day. You can choose to Carbon Copy those emails by entering a list of emails separated by comma's. There is a limit to the CC input box of 240 Characters, so that's around 8 CC's maximum. You MUST enter a Subject, and optionally you can enter some meaningful preamble, such as site reference or location in the Message box. Any generated emails will append the relevant data into the Message.
SMTP Server Settings
In order to send automated emails you must give AlphaWebFX access to a dedicated email account. As shown above Google's gmail has been used, however any of the major online email providers should be suitable. Importantly, be sure to use a service that uses SSL - whilst it's optional on the form above - non SSL has never been tried; so best stick with SSL!
When you enter the email account username, for example; myPLCDataServer@gmail.com and a password these values will remain in plain text in the input boxes (although the password will be obscured by asterisk's). However when you save the configuration they are encrypted to disc. To display the encrypted text close the program then restart it.
Enter the SMTP and server port number as given by your email service. Press the [Send Test Email] button to check all your settings are correct.
Snapshot & Daily CSV Files
The intention of emailing the snapshot CSV file is to provide an update of how your controlled system and it's values are trending. In other words you will only get the data up to the point the file is sent, for example from just after midnight until say 10pm - if you choose 22:00 Hrs as the send time. With this information you can make informed decisions that may impact tomorrows actions - for example if your data shows that not enough products were produced this day, or that a holding tank is getting close to full capacity.
The CSV file will be sent ONCE only per day, however, for testing purposes you can reset the flag that AlphaWebFX uses to signal this by going to Tools > Reset CSV Sent.
The data-logging will actually continue until midnight - so you will always have the full days data available from the host PC and by checking the Send Complete Daily CSV File box you will get the finished data log file for the previous day around 2am.
The CSV files are only sent to the primary email recipient(s) NOT to the CC addresses. The CC recipients only get the ALARM and RESET notices.
When you're done - Save the configuration.
Using AlphaWebFX
To hide the program interface and send it back to the System Tray choose File > Hide or click the [ X ] in the top right hand corner. To exit the program fully and terminate it choose File > Exit, or if the program is already in the System Tray hover over it's icon, right-click then choose Exit.
To validate the entire AlphaWebFX configuration choose Tools > Validate Settings. This will check everything from point data to client settings. For any errors that are found there will be a comment on the message center to indicate where the problem is. Before AlphaWebFX attempts to connect to the target device this check is made automatically, and if there is an error the connection will be stopped.
To set the program into device polling operation from the main menu choose File > Connect. The status bar at the bottom of the form will indicate the connection state, the polling interval and when the last good data read took place.
In the example above, Active 1 / 0:22 means the control is connected and out of a 1 minute polling interval 22 seconds have elapsed. The last good read time stamp is useful because not every read might be successful, particularly if the device is over an Ethernet connection, and for whatever reason a data packet doesn't get back within the response time allowed for.
Use the message center on the Control Status tab to check how the control is getting on and what errors may have occurred.
All files generated by the control will remain in the Target Output Folder until you choose to delete or move them.
Disclaimer & Warranty
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You install and use it entirely at your own risk. By installing the program you agree to indemnify XML Control (and all it's contributors) from any all conceivable forms of costs, damages and claims. As the program is associated with the monitoring and control of electro-mechanical equipment you accept total responsibility for the use of the software in any real world application.
You will not be able to use the software without accepting the above (or similar) terms of agreement.
Privacy Statement
The program does not collect or re-transmit any personal data or configuration settings, nor copies in on any generated output or emails.
Bug Fixes / Known Issues / Observations
16/10/11 Supported Operating Systems
AlphaWebFX has been tested to work correctly on Windows Xp Pro SP3 (32 Bit) and Windows 7 Home Premium (64 Bit).
28/10/11 "Error - response failed protocol"
A contributor found that the AlphaWebFX connected to the target Mitsubishi Alpha the first time but always failed afterwards.
It turned out the inbuilt serial port on the host PC was defective. We installed a USB / Serial Port adapter and the problem was resolved.
Last updated 07/11/2013