FX Recipe Tool

June 2011

A simple tool that can upload and download a configurable range of D and R stores from both Serial and Ethernet connected Mitsubishi FX Series PLC's to back up Recipe Data using CSV files.

Preamble

We all love recipes - and it's even better when we can remember the ones we like best... just like for a good homemade pizza... =)

A great garlic and pepperoni pizza by moi.

A recipe is simply a group of data stores that define, for example the quantity, ingredient volumes and temperatures for making a certain product, and by having many recipes in the PLC we can select the one required to make a certain product, then select another recipe to make a different product later. Typically the HMI would be used to input, update and copy recipes within a fixed data array set aside either in the PLC or even in the HMI itself.

Well, I was tasked with creating a simple recipe system within a FX3G PLC, essentially 20 values * 100 menu records - these being selectable recipes used to pre-configure a machine to suit differing process values and control limits. Even though the recipe data would be stored in battery backed memory, once the recipe system was programmed it became apparent that some means to back up and restore those recipes would be desirable.

Given that both Serial and Ethernet communication modules can be had for around £100 for the FX3 series PLC - a PC based CSV storage solution was clearly the answer. Depending upon the target PLC, either D and/or R stores are available to store numerical values. Therefore, the tool should work with any FX series PLC suitably configured - from FX1 through FX3.

FX Recipe Tool Interface

The tool always uploads and downloads 8 Words of -32768 to 32767 values, and the quantity of words is expressed with BlockSize * BlockQuantity. Which is simply a human convenience for expressing that we have for example, a recipe with 12 values, and we have say, 100 entries of that recipe. So 12 times 100 = 1200* Words to be read and written to the CSV file.

(Note: Whilst the data is read/written in Integer values that does not mean that Double Integer or Floating-Point values cannot be handled - your PLC code determines the data type.)

*If the exact quantity of values is not divisible cleanly by 8 then one more chunk of 8 words will also be read/written to ensure that all target stores are collected.

Setting The Recipe Tool

When you first start the tool it will display some basic information about the current configuration...

Basic Configuration Display

From the Main Menu > Edit choose Communication...

Communication Dialogue

If using a Serial connection (either peer to peer RS-232 or Multi drop RS-485) then configure the 01. Serial section settings to suit and ensure that the 03. Selector Switch is set to FALSE.

Serial Setting Notes

Ensure that the target PLC has been properly configured to use the Serial card installed - and that NO OTHER program instructions in the PLC are attempting to use the serial port.

Note! You CANNOT use the FX Recipe Tool with the PLC’s programming port whether it’s the Mini-DIN or USB ports; these ports are fully proprietary to Mitsubishi and The Dedicated Protocol does not work on them.

The Port setting is the Comm-Port on your host PC.

The Station number must be 0 for a peer to peer connection.

If you experience "Response Failed Protocol" type errors, then try increasing the PC Read Back Delay value.

Ethernet Setting Notes

If using a ENET type connection then configure the 02. Ethernet section settings to suit and ensure that the 03. Selector Switch is set to TRUE.

Again, ensure that the ENET module is correctly configured using FX-Configurator-EN, or in GX Works 2 as required.

This might help... FX ENET Setup Example Reference

To save these setting press the [ Save ] button, to cancel any changes press the [ Close ] button.

Next we can test the communication settings via Mani Menu > Actions > Test Communications...

Test Communications Result

To configure the actual data to be collected, choose Main Menu > Edit > Data Range...

Data Range Dialogue

These setting should be self-explanatory. As we are dealing with numerical values only D and R Stores are available for the Data Type. Ensure that you select a BlockSize * BlockQauntity that correctly captures your recipe (or other) data - and that will not interfere with your program control!

Finally, as we are producing a CSV file, we can set some parameters for that via Main Menu > Edit > File Settings...

File Settings Dialogue

If you want to store some relevant information in the CSV file, for example, some useful comment and the author, then enter the required text and set "Add Header" to TRUE.

Whilst you will be prompted for a file save location during the data save process, you can set a default folder with the "Folder Name" text, using the [ ... ] button that appears when you click the text area.

Using The Recipe Tool

Once you have configured the tool either press the [ Upload ] button or choose Main Menu > Actions > Upload.

The tool will first test the connection, and if successful will then prompt you for a file name.

As the tool works it's progress will be displayed...

Upload Progress

You can press the [ Cancel ] button to abort either an Upload or Download process.

For the download process you will see the contents of the CSV file as it's progressed...

Download Process

Other Features

To increase or decrease the font size on any of the above dialogues press the [ + ] or [ - ] buttons as required.

To clear the text displayed on the main form choose Main Menu > Actions > Clear Messages.

To read or write a single store value choose Main Menu > Actions > Quick Read / Write...

Quick Read / Write Dialogue

CAUTION: This dialogue reads and writes values directly to the PLC in live mode - it's purpose is to adjust PLC values without resorting to using any Mitsubishi software engineering tools.

(Note: Only D and R device types are available with the quick read / write dialogue.)

Disclaimer & Conditions

This program is supplied 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.

By downloading, and using this software you expressly agree to be fully liable and responsible for the cause and effect of using such a tool in the real world - bearing in mind both the potential damages that could arise if incorrect data is written to a running PLC, or that is wrongly targeted, as well as the potential disruption. USE WITH EXTREME CAUTION AND CARE - and if you have any doubts - DO NOT USE IT.

You may NOT rent, sell, sub-license or re-distribute the software. If you want to share it - then point folks back to this web site so that they can obtain the latest and best version.

Prerequisites

There is no installer for the recipe tool program, just extract the file from the supplied Zip and run the RecipeTool.Exe file with the required permissions.

Your PC must have the .Net 4.0 Run-time installed, which is a free download from Microsoft - in the event that your PC does not already have that installed.

5th January 2013.