AdvancedHMI Software

General Category => Support Questions => Topic started by: Boushard on August 19, 2016, 08:40:03 AM

Title: Address format Mitsubishi PLC
Post by: Boushard on August 19, 2016, 08:40:03 AM
Hi,

I'm new with Advance HMI and I try to use it with Mitsubishi PLC and I just wonder what is the correct "PLCAddress" format should I use!

I know this is a very basic use but can't find the correct format!

Thanks guys!
Title: Re: Address format Mitsubishi PLC
Post by: rbelknap on August 19, 2016, 02:08:43 PM
Which driver are you using?
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on August 19, 2016, 02:41:05 PM
ModbusTCPcom

Try couple address found on the web and receive "Com Error -999. No values returned from driver".   I can see in the PLC programming software that my application communicate with the PLC.

Title: Re: Address format Mitsubishi PLC
Post by: Godra on August 19, 2016, 03:17:58 PM
I am not sure if this might help, but take a look at it:

http://www.automationsystemsandcontrols.net.au/PDF's%20Mitsubishi/Manuals/FPLC/Mitsubishi%20FX-PLC%20Addressing,%20Instruction%20&%20Device%20List%20Quick%20Ref.pdf
Title: Re: Address format Mitsubishi PLC
Post by: bachphi on August 19, 2016, 05:03:43 PM
What addresses did you try? 40000, 40001, L40000, or (400000,63)

Store something in D300, and do a read on 400500
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on August 22, 2016, 08:05:54 AM
Try every adresses you gave and no go.

The 400500 seem to work, but I have a "No value returned from driver". I put the address in PLCAddressValue!

I also have a "No Response from PLC(21)" error.
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on August 22, 2016, 08:38:27 AM
I've just tried "0001030".  Now I only have a "No Response from PLC(21)" error on read!

And when I try write instruction, I have a "WRITE FAILED, No Data Return" error.  I think I'm on my way to succed!! :P
Title: Re: Address format Mitsubishi PLC
Post by: Godra on August 22, 2016, 09:53:09 AM
Your errors should indicate that there is no proper communication between the application and the plc.

Check your plc programming software to see what parameters it is using to communicate with the plc.


For the addressing part, sections 3 and 4 of this manual seem to indicate standard Modbus addressing for this particular Mitsubishi plc (Archie could confirm whether this is correct):

http://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080446eng/sh080446engh.pdf
Title: Re: Address format Mitsubishi PLC
Post by: rbelknap on August 22, 2016, 09:54:20 AM
Just for the sake of asking.

Is the PLC in Run mode?
Are you sure you have the correct IP Setup in the driver? , ie IPaddress and TcpipPort of the PLC

Also, Which version of AHMI are you using?
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on August 22, 2016, 10:22:20 AM
Just for the sake of asking.

Is the PLC in Run mode?  Yes it is
Are you sure you have the correct IP Setup in the driver? , ie IPaddress and TcpipPort of the PLC  I'm sure about the IP, the port # is 5556 witch is, according to mitsubishi, correct.

Also, Which version of AHMI are you using? Downloaded the last version 3.99N
Title: Re: Address format Mitsubishi PLC
Post by: Godra on August 22, 2016, 10:44:39 AM
What is the exact model of your Mitsubishi plc?

Also, there is an interesting post in the following link suggesting that port numbers are in hex format and also mention some "pairing" feature:

http://forums.mrplc.com/index.php?/topic/20693-tcpip-port-communication-on-mits/

Could you confirm if any of these apply to your plc?
Title: Re: Address format Mitsubishi PLC
Post by: Godra on August 22, 2016, 11:01:09 AM
Eventually, you could do a Wireshark capture of both your plc programming software talking to the plc and AHMI application trying to talk to the plc.

Archie would have to be the one to try and decipher those packets.
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on August 22, 2016, 02:35:07 PM
The setup is:

PLC: FX3U-32MT/DSS
Ethernet Card: FX3U-ENET-ADP
Drive: MR-JE-20A
Servo:HG-KN23JK

Software:

VisualStudio 2013/15
MX-Component V4.09K
GX-Works 2
Title: Re: Address format Mitsubishi PLC
Post by: Godra on August 22, 2016, 05:19:20 PM
Using a web browser, can you access your ethernet card web page?
Title: Re: Address format Mitsubishi PLC
Post by: bachphi on August 22, 2016, 07:26:55 PM
ModBus TCP should be using port 502. Also if using version n, then d/l the patch
Title: Re: Address format Mitsubishi PLC
Post by: Boushard 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
Title: Re: Address format Mitsubishi PLC
Post by: bachphi 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.
Title: Re: Address format Mitsubishi PLC
Post by: Boushard 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.
Title: Re: Address format Mitsubishi PLC
Post by: controls.guy 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
Title: Re: Address format Mitsubishi PLC
Post by: Boushard 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.
Title: Re: Address format Mitsubishi PLC
Post by: Godra 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.
Title: Re: Address format Mitsubishi PLC
Post by: Boushard on September 08, 2016, 03:34:37 PM
Done!

https://drive.google.com/folderview?id=0B18MSGbV_z7RYXlrU2tMd2RsWTg&usp=sharing (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.