CSV Data Transfer Tool 2

November 2011

In this section we'll look at using the Data Transfer Tool to format your own CSV file into one that the GT 1000 Series HMI can understand.

Go to the previous page for information on the Data Transfer Tools basic features.

Firstly, let's look at the format of the HMI CSV file...

:DATE,12/11/2011 11:21:14

:GROUP No.,001

:GROUP NAME,Recipe 1

:DEVICE,8

ITEM NAME,VALUE

,1

,3000

,1000

,1

,3

,3000

,110

,8

Observations

From the above you can identify parameters we set up in the GT3 project, and also see that where the text :DEVICE,8 is listed, there is then expected to be the value of 8 devices successively listed after the line ITEM NAME,VALUE

Another observation is that the file must only contain signed or unsigned INTEGER values - NO floating-point numbers, NO text (for the device stores).

User CSV Structure

A user CSV would more typically be a range of lines that contain a comma separated list of variables, perhaps output from some automated manufacturing or tooling program, perhaps the result of someone working with a spread-sheet. For example;

STOCKA,30.00,10.00,1,P7,30.00,115,1,3,+,P4,30.00,120,1,2,+,P1,30.00,150,3,1,+,P11,30.00,2.00,1,4

STOCKB,30.00,12.00,1,P14,30.00,145,1,5,+,P8,30.00,125,2,3,+,P7,30.00,115,7,3,,,,,,

In the above STOCKA and STOCKB are materials to be selected by the machine operator, P7, P4, etc are the part references for that which is to be produced.

All the values have a significance and must be used within the recipe handling system of the machines PLC - but we can only send numbers.

So we'll require these formatting rules to cover all the scenarios in such an example:-

    • Convert TEXT to an enumeration e.g. STOCKA=1, STOCKB=2, etc

    • Remove TEXT attached to numbers e.g. P7, P4 simply become 7 and 4, etc

    • Set any store to numerical 0 if it is not covered by the above rules

    • ROUND up floating-point values or REMOVE the decimal point entirely (any INTEGER numbers can easily be re-floated in the PLC)

    • Compensate for variable lengths of data on each row and null data. Did you notice all those ,,,,,,,,, on the second row? That's null data.

With that last item it should be advised that ideally all rows should be of equal data store lengths, for example 20 stores.

If we don't compensate for varying lengths then we cannot hope to set up the PLC to correctly handle each recipe.

Conversion Rules Dialogue

From the main menu choose Tools > Edit Rules.

From all the preceding discussion the purpose of this dialogue should be self-explanatory.

How It Works

Whenever you refresh the Local Folder pane in the Data Transfer Tool ANY files with an extension of .CSV will be listed.

However, when you select any CSV file for transfer to the HMI the program will first open the file, and examine the first 5 lines to ensure the HMI format is present.

If not, then you will get a prompt to convert the file first then try again.

To convert the file go to main menu then choose Tools > Convert File.

When you do this 2 things will happen:-

1) The original CSV file will be renamed OriginalFilename.SRC

2) The resulting correctly formatted file will be named OriginalFilename.CSV

So now press [ Refresh ] to update the file list. Select the file for transfer, and everything should be fine now.

Restoring TEXT Display on the HMI

Even though you have pulled out TEXT from the CSV file it's a simple matter to regain these for display on the HMI.

Let's say you use an enumeration for all the unique texts, STOCKA=1, STOCKB=2 for example.

Ultimately that 1 or 2 value will end up in a store either in the HMI or the PLC, let's say D100 in the PLC for arguments sake.

In GT3, set up your project as follows:-

Step 10 - New Comment Group

In the project explorer double-click New Comment Group...

Step 11 - Enter Comment Group Title

Enter a meaningful title for this group of comments then press Ok.

Step 12 - Enter Some TEXT Values

Just click into the box and type. As you can see Value 1 will equal STOCKA, Value 2 will equal STOCKB, etc.

Step 13 - Place Comment Display

Go back to one of your screens and choose Comment Display and place it. Once placed, double-click into it to get the settings dialogue.

Step 14 - Configure Comment

Firstly we want to point the comment to D100. On the Device/Style TAB choose Type as Word and then the source store.

Step 15 - Select The Comment Group

On the Comment Tab configure as follows:-

    • Choose "Comment Group"

    • Choose "Fixed" and group number 1

    • Choose "Indirect Device"

    • Choose preview "1"

Once downloaded to the HMI whenever D100 store changes value the associated human meaningful text will be displayed.

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 & Obtainment

There is no installer for the recipe tool program, just extract the file from the supplied Zip and run the MitsubishiEthernetFtpTool.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.