Author Topic: Address format Mitsubishi PLC  (Read 7922 times)

Boushard

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #15 on: August 23, 2016, 08:52:00 AM »
ModBus TCP should be using port 502.Try with this port no communication on the Diagnostic utility of GX-Works 2 Also if using version n, then d/l the patch Already applied

bachphi

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #16 on: August 23, 2016, 12:15:57 PM »
How about getting the right module to begin with?  FX3U-ENET-P502

FX3U-ENET-ADP - Mounted on the left side. Ethernet ADP module, MELSOFT, MC protocols, direct connection & data monitor. You can't do Modbus.
« Last Edit: August 23, 2016, 12:27:03 PM by bachphi »
===================================================
This is NOT alt.read.my.mind.
No such thing is sh^t-for-brains unless you are posting to alt.read.my.mind.
===================================================

Boushard

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #17 on: August 23, 2016, 12:58:31 PM »
How about getting the right module to begin with?  FX3U-ENET-P502

FX3U-ENET-ADP - Mounted on the left side. Ethernet ADP module, MELSOFT, MC protocols, direct connection & data monitor. You can't do Modbus.

Only because the damn MX-Component software was supposed to make an "easy" transition between VB.NET and the PLC and make Melsoft connection correctly! Even the shop who sold me this software have never used it to communicate with a PLC, so no support from there side.

Since I'm not a programmer, I'm not that familiar with the language and how to write fonction code to make it work properly.

Finally, you probably already see, I'm not perfectly bilingual, so communication with you or Mitsu Tech pretty difficult.
« Last Edit: August 23, 2016, 03:33:23 PM by Boushard »

controls.guy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #18 on: August 26, 2016, 08:53:19 PM »
As correctly noted, the FX3U-ENET-ADP does NOT support ModbusTCP, however, you do not need to use the -P502 version either... in any event your ADP version isn't going to work, so you will need to acquire either a FX3U-ENET or FX3U-ENET-P502.

The standard FX3U-ENET (the module that connects on the RHS Bus, not ADP version) has a limitation in that you cannot specify Ports below 1024... I guess this is why the came up with the -P502 version, so you could use the default Port 502.

As an aside, FX3G-E PLC's with built-in Ethernet (in effect a built-in FX3U-ENET-ADP) also do NOT support ModbusTCP, however the FX3U-232MB-ADP Serial card does support ModbusRTU if you want a much lower cost alternative.

When using a FX3U-ENET, you connect the module, then must use FX-Configurator-EN to set it up. And in setting up, you are only actually going to give the module its IP Address and open 2 of it's 8 channels with TCP Support for reading/writing on the Port you specify.

After this has been done, the ModbusTCP functionality is handled by function block code running in the PLC that you edit and download with GX Works2.

To get started, log in to your MyMitsubishi account, search for "ModbusTCP" in the software downloads and download the correct version of sample code depending on the type of FX3 you are using... for example, FX3G_ModbusTCPServer_V100.zip or FX3U_ModbusTCPServer_V100.zip... you must get the correct sample for the hardware in use... or the code will not work! The download includes a Compiled Helpfile, a Power-Point presentation and a GX Works2 example code project in compressed format that can be un-packed. (See Image #1)

You are setting up your FX3 to act as a ModbusTCP "Server" when using Ethernet.

Using FX-Configurator-EN, setup the Initial (See Image #2) and Open Settings (See Image #3) as shown, then download the configuration via USB into the PLC target.

When you read the supplied helpfile, you see that the listening Port is set by a function block... change this to an address above 1024... in my experiment, I changed this to 1502 (See Image #4). Compile and download the project in GX Works2 via USB. Cycle the power to the PLC/ENET just to be sure all settings are updated.

In GX Works2 use the Online > Monitor > Device/Buffer Memory Batch feature to write a value to a D Store, for example, 123 into D0.

Over in AdvancedHMI set up your form to use a ModbusTCPCom driver. Enter the IP Address of your ENET module, enter the Port you set, eg 1502.

Add a gauge, for example, and set its ComComponent to use your ModbusTCPCom1 (default name), then set the PLCAddressValue to 40001. 40001 actually maps to D0 (you need to add 1 to the target D Store address you are interested in).

Hope helps. C.G

Boushard

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #19 on: September 08, 2016, 02:09:10 PM »
Sorry for the next familiarity, but, DAMN son that's a f?%$" clear answer!!

If I make another project like this one I'll take a look at your suggestion for sure!!

Anyway, I've just finished my App with "standard" communication and coding.  Everything work as it should. 

The code is probably not pretty but all fonction work correctly so...

I've achieve the communication correctly using the MX-Component software called "Communication Setup Utility".

If someone want the VB.NET app, just let me know and I'll upload it somewhere.

Again, thank you all for your time and suggestion.

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #20 on: September 08, 2016, 02:51:58 PM »
If the size of your app meets the requirements of uploading to this forum then definitely post it here (if not then post it on dropbox and share the link).

Somebody might eventually be trying to do the same as you did.

Boushard

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Address format Mitsubishi PLC
« Reply #21 on: September 08, 2016, 03:34:37 PM »
Done!

https://drive.google.com/folderview?id=0B18MSGbV_z7RYXlrU2tMd2RsWTg&usp=sharing

Just to be sure.  All the coding and term are in french since I'm in Québec, Canada!!

If someone want to suggest modification to make the code lighter I'm open to some improvement.

I've also add the plc program.