MitsushiPLC

I need a way to open multiple files on a PC from a Mitsubishi PLC

5 posts in this topic

So I need to find a way for a Mitsubishi PLC to communicate with a PC - ideally sending a binary number through ethernet to a PC program that reads it and tells the PC which files to open.

I think I can create the PC program with C++ or Visual Basic without too much struggle. But I am unsure of how to get that binary ID from the PLC and into the PC program. I have done a little bit of research on MX Component and MX Sheet, and also MC Protocol but all seem a bit outdated and/or just over my head and I need some better explanation - I'm pretty new to PLC and programming. I feel like it shouldn't be terribly difficult to get 1 external binary number into a PC program. I'm sure someone has done essentially the same transfer and I just want some ideas.

-What kind of connection support do I need to transfer data (Likely just a D-bit) from a PLC to PC?

-How would that/those bit(s) be accessed in Visual Basic or C++? I'm assuming some type of library function that will call the value

Share this post


Link to post
Share on other sites

This is not hard to do actually. From the PLC side all you do if execute a command to open a port on the PC and then send some data.

This can be done via fixed buffer com. or pre-defined protocol.

All the MX components MC protocol and such you have read about is the Mitsubishi protocol. This is so a PC, HMI, SCADA  would talk to a PLC and request data.

If I understand you correctly the PLC will should initiate comms and send data.

Which PLC will you be using ?

 

Edited by Gambit

Share this post


Link to post
Share on other sites

@Gambit 

You understand correctly, the PLC needs to send data to a PC when a button is pressed (likely just a binary number and placed in an excel sheet).

So then what is the command to open a port on the PLC send the data to a PC?

What I'm imagining at the most basic level is a MOV[ D1 ____ ] where the blank is the ethernet port on the PLC, and D1 holds my binary number. What would that blank be? How does the protocol stuff play into this? Where does the data go once on the PC? How can I then get that data into an excel sheet?

Then from there the PC program I write can pull the binary number from the excel sheet and use it to pull up my corresponding files with another program.

I'm using a Q-series Mitsubishi PLC, not sure on exact model I'll have yet but it will have ethernet.

Share this post


Link to post
Share on other sites

Read the Manual for MX component version 3 i think. In the manual have many examples 

when you install the component you have many sample code, include for excell.

https://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080272/sh080272o.pdf

sign into Mitsubishi Factory Automation site, they have huge material, libraries, sample code, e-learning, simulators.

you dont need to buy anything to sign here in Japan, i think is the same in the rest of the locations.

in japanese have more stuff, simulator, code, manuals...but you can use the code in japanese (just the comments and the explanation is in japanese).

sign in dude!

Edited by Copyleft

Share this post


Link to post
Share on other sites
On 6/5/2019 at 7:58 PM, MitsushiPLC said:

@Gambit 

You understand correctly, the PLC needs to send data to a PC when a button is pressed (likely just a binary number and placed in an excel sheet).

So then what is the command to open a port on the PLC send the data to a PC?

What I'm imagining at the most basic level is a MOV[ D1 ____ ] where the blank is the ethernet port on the PLC, and D1 holds my binary number. What would that blank be? How does the protocol stuff play into this? Where does the data go once on the PC? How can I then get that data into an excel sheet?

Then from there the PC program I write can pull the binary number from the excel sheet and use it to pull up my corresponding files with another program.

I'm using a Q-series Mitsubishi PLC, not sure on exact model I'll have yet but it will have ethernet.

First you need to make a connection between the PLC and our PC. (Which Mitsubishi PLC are you using ) Depending on your PLC type this could be ZP.open .

After you have a connection you can send the data with bufsend. There are examples in the manual how to use these instructions.

However if you like @copyleft mentioned if a constant connection is also possible than you can use MX sheet as this will directly read your controller data from the PLC.
But if the initiative needs to come from the PLC than you will need to do it as I explained

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now