Mitsubishi MELSEC Q ethernet questions

Picho

Member
Join Date
Dec 2004
Posts
5
Hi guys, Im new here and in the PLC world.
doing some very simple stuff with mitubishi alpha for a while now and want to move on.
I have a lot of experience in network programming (I am a software engineer - .NET C# mainly).

I have this project that needs a PC to control a 3D crane using 3 stepper motors. a software on the PC is supposed to gather information from the PLC inpot ports (sensors) and isuue instructions in order to move the crane around.

my question is simple: leave out all the tcp/ip communication issues, is ther a set of instructions somewhere that i can read and learn in order to accomplish this? (specificaly, I want the plc to send a packet if Input#1 is on or off, and me to tell a stepper motor to move a certain distance, or turn on an output).

I have some manuals from mitsubishi but these are too technical and less productive. Im looking for a simple table...
 
thank you for the reply Ken, but to my understanding, OPC handles the communication protocol. what I am actually looking for is the set of instructions I can issue to this specific plc in tcp/ip packets.
 
it is common to write PLC program and let PLC react to inputs.
Q is pretty arn powerfull PLC, why do you need PC anyway?
Or let me put it the other way: If you need PC to do the controls
why do you need PLC? Just attach I/O directly to PC...
there are situation where it's better to have both PC and PLC.
in that case you use some sort of OPC on your PC. PLC doesn't
know anything about it. then you simply let PC read from one
block of registers and write to another. If PLC needs to tell
something to PC, you simply toggle bit or change value of a
register within block that is read by PC.
When PC has something to tell to PLC, it's the same thing - your C#
program (or whatever you use) is changing a bit or value of a
registers withing block that's written by PC into PLC memory.
All reading and writing is done by PC by use of OPC. The one we
use for Mitsubishi is called MX Components and it's also Mitsubishi
product.
Instructions to read and write plc memory will be defined in
your OPC documentation. to make things simple (and fast enough)
we try to keep size of both read and write block at minimum
(10-50 words each is common).
it is also common to create heartbit signal so that PLC have
independent indication of succesfull connection. since you have
some sort of OPC talking to PLC, PC will be able to know if
access to PLC is possible and if it all went ok.
PLC in this case has no clue what is going on (if the cable is
cut or disconnected, if PC is shut down or everything is ok but
PC simply has nothing new to tell).
That's where the heartbit comes in. Every time PC is accessing
PLC memory (using OPC as we mentioned), we toggle one bit in block
that PC writes to.
Now it's easy for PLC to monitor that signal and when it stops
changing, you can cet alarm etc.
If you DON'T want to use OPC to both read and write from PLC,
you can setup PLC to send unsolicited message on certain events.
This is of course much less efficient, much slower, much more
complicated since it requires some PLC programming and it's
pretty much limited to fewer messages - but it can be done.
I didn't do it on Q yet but did on A and QnA. This is something we
do only if customer is really insisting on and of course only if
there are few responses we have to implement.
In all other cases we use OPC to do all communication. If you what
to send message from PLC, check 'dedicated' instruction manuals.
They should keep things shorter and simpler because if you plan on
using 'common' instructions be prepared for reading some heavy manuals.
If i remember correctly, they ware all in order of 18-36Mb each
and not very easy to follow...
 
Last edited:
thanx panic.

so this mx opc thingy is like an adapter software element that lets me issue instructions to the plc?

it uses ethernet or rs-232?

ofcourse I dont realy care anymore if the opc controls the plc.

as i said, i want the PC (C#) to control the algorithm, respond to input changes on the plc, and issue instructions to move the stepper motors.

to your knowledge, is this scenario a common one nad is this deployment scenario (pc->opc->ethernet->plc) a common one?
 
you can use ethernet, USB or ethernet (or anything else you like)
we have found some problems with USB so USB is always left only
for service, never for PC connection.

AS said before, idea is to make 1:1 block transfer so for example
PC writes to say D100-D150 and reads from D151-D200.
You can choose any type of memory, i'm just using D as example.
In such case we would normally let OPC read and write every 250-1000ms.
PC for example keeps toggleing D100.0 bit (heartbit) and that's the
address PLC will monitor to see if connection with PC is still ok.
if connection drops for whatever reason, D100-D150 will all stay
in whatever last write did.

now it's simple for PLC to use two timers to check if heartbit is stuck
in either ON or OFF state. normally we use PLC timers ca 3x
longer than update time used by OPC so let's say it's 0.75-3.0 sec.
this whole setup is dead simple because only two OPC instructions
are used (block_write, to write D100-D150, and block_read to read
from D151-D200).

PC would have array of integers to match the PLC blocks, something like:
DIM PLC_MEM AS INTEGER(1..100) ' we normally use VB

All the rest of your program has to do is put values into array
and background tast (timer event or whatever) will do the transfer.
This is the simplest way to share bunch of bits, or registers.
It is not always the best but it does the job in 99% of cases.
Sometimes there are larger blocks of data and update time is critical
so fancier solutions are required and only changed portions are
transfered (for example). i suggest to stick with this one until you
get it all sorted out.

MX components is not the greatest OPC but it's simple to use and included
wizards will let you create just about any connection you want including
pass through (maybe through CC-link or MelsecNet network).
If you go for it just make sure not to get the old version (it happened
to us before...). Check www.meau.com for any manuals you need and
latest software versions.
 
Last edited:
Why are you trying to re-invent the wheel?

If you are planning to control a crane with a PC via a PLC, but the PLC will not contain the "Algorithm", why use a PLC in the first place?

The Q series was designed to cover a multitude of applications, including motion control. It can have multiple CPU modules (up to 4). There are basic, high performance, process, motion control, and PC CPU modules available. It has ethernet modules as well as webserver modules (I even saw a Modbus TCP/IP module recently) and modules for various other communication types. The Alpha is a dinosaur in comparison. If I were you I would have a chat with the local Mitsubishi rep first. They should be able to explain in more detail and give you some examples of real projects.

If you need some programming advice on the Q series please post again.

Sorry this post is a bit biased. Allen Bradley make a good PLC too (have a chat with them as well)
 
Last edited:
thank you for the reply.

I must admit I do not know yet what I should do.
the local mitsubishi guys are clueles and can offer no help but manuals.

my task is simple:

I must build an application that would control the crane.
control the crane means: move 1 meter right, 50 cm left and 20cm down.
that is basicly it.
i also need to get input from the plc: when a specific input goes high or low etc. whether i do this by probing the plc from the pc at a certain interval, or the plc would trigger an event (send a tcp/ip message) i still do not know since I have never worked with the Q plc before.

if you could get me started on how to issue command for moving stepper motors a certain distance that would be a good start.

I could not find any samples/tutorials on the web, just basic communication test applications...

again, thank you.
 
It sounds quite simple doesn't it

Perhaps you could give a bit more detail about the project, maybe then people reading this thread will be able to help you more.

Could you answer these questions for me?

1. What will the crane be moving? and how much will it weigh?
2. Where will the crane be located?
3. Will the crane be operated by a control panel located nearby?
4. Is there any need to exchange data with a remote system? (e.g. office network)
5. Are you building the crane yourself?

Best Regards
 
sure:

1. What will the crane be moving? and how much will it weigh?
--->30 kg of cables rolled over a plastic drum
2. Where will the crane be located?
---> hmm.. in a hanger? above an array of moveable plates (maybe 2X5). each plate can stack 4 drums side by side and a total height of 10 drums. there are 5 machines producing the drums (hence 2X5). every time a drum is out, a sensor connected to the plc will hopefuly make the plc inform the pc.
3. Will the crane be operated by a control panel located nearby?
---> the crane is stupid - that is, the pc will control how many drums are stacked on each plate and will instruct the crane.
4. Is there any need to exchange data with a remote system? (e.g. office network)
--->only the fact that a drum is ready for locating by the crane. that is, a sensor->plc->pc
5. Are you building the crane yourself?
--->not me personnaly. the implementation is not yet clear. since precision is not so important they might not even use stepper-motors, but regular motors with an array of sensor on each possible stoip location above and across the array.


I must admit that i am not so sure this particular problem is important. since the pc has an algorithm for managing the storing and location of the drums, it's merely a problem of collecting data from the plc (high input on drum ready from machine #n) and issuing commands (setting output #m high).
if there is a better hardware solution for this (preferably by mitsubishi) and i can/should avoid using the plc, this is ok by me.
 
Last edited:
Well, I'll come clean, I'm not a motion control specialist. But there are plenty of people here who are. Though, you might need to create a new thread with a suitable title to get their attention.

There is a saying "horses for courses" in other words use the right tool for the job. I'm guessing here, but will your PC software also do some sort of warehousing function? If it is, then that is great, that is what PC's are good at. But as for controlling a crane (in a safe manner) the horse for this course is a PLC.

Also what about safety? 30kg cable reels will hurt very much when travelling at speed. How about preventing harm to people and equipment?

If my assumptions above are correct. I would advise you to separate the crane control from the "warehousing" functions. i.e. PC for warehousing, PLC for crane control. Also, it may be worth thinking about sub-contracting out the crane control software/electrical part of the project. It is a specialized field and requires a great deal of knowledge.

Best Regards
 
Mitsubish Q Series PLC's are very powerful, contain most instructions & mitsubishi also do motion control equipment.
I know they do a card for the FX range for stepper/servo drives drives so handle the communication over the system bus.
The ethernet card or 232 cards are easy to use & if you use an OPC server or MX component (mitsubishi's own in your pc) then comms is transparent.
If the packet is sent direct to a servo drive then I'm not sure if this is possible from the ethernet card, but 232/485 is very easy in mitsubishi plc's.
Using an OPC/DDE server, you would poll the data on a continuous basis then set bits in the polled data within your pc program to initiate the required control.
i.e. if you polled a set of registers & Bits containing distance, Slowdown etc + a bit array that contained the triggers (in PLC registers D200-D220) + ( digital Bits in memory bits M100-M131)
then the data in the "D" areas would contain movement values & the Bits in "B" area would contain info like a bit for Data valid, a bit for 'go' & any other digital info you wish to send.
I suggest you also have some handshaking bits back to plc like got data, reached position etc.
I have used servo/stepper on many PLC's, usually in the following manner:
digital outputs (binary pattern = 0-255) to the servo drives to tell it what program to run, a trigger output to tell it to go, digital outputs from the drive back to plc inputs for running, fault, position reached etc.
Also using 232 comms from plc to drive to download position information (programs), the use of comms is not ideal for commands like go, stop etc. as it can be too slow for the application so a combination is ideal.
Hope this info is of some use
 
I am one begin give the PLC

I am one begin give the PLC, I need for assistance for configurator of PLC Mutsibushi For the series fx, the shema of the cable, am the software of configuration
 
Can anyone help me to built a Conductance Sensor Adaptor module for 1V to 10V DC

Can anyone help me to built a Conductance Sensor Adaptor module for 1V to 10V DC for input of Analog Voltage Input.

Thank You
 
dear new members,

it would be better if you start new topics instead of hijacking someone else's.
please help us keep it clean better organized and easier to follow.

as for FX plc, you can use SC09 and either MEDOC or GX Developer.
there are some simpler cables for FX that use no electronics (see www.mrplc.com). note that this is not guarantied to work so use it at own risk. MEDOC was circulating on web as free download but i'm not sure if that was Mitsubishi's intention. GX can be downloaded from www.meau.com and it will work for up to 14 days without registering.

as for coductivity test, i'm not sure what is requirement. just to detect if circuit is open or not? you could use digital input for that. if conductance would vary, you could use voltage divider to create 10V potential. tested circuit could be wired in parallel with lower half of the divider so it puls the voltage down as conductance increases. change can be measured with analog input and scaled to proper units. you could also use proper transducer. low resistance can be measured with RTD transducer. depending on model they will offer ranges like 0-4000 Ohms or 0-8000 Ohms. without knowing application it is hard to help more.
 
Last edited:

Similar Topics

Hello! First time poster and a big PLC newbie so I am looking for some backup here. I have an old Mitsubishi FX-48MR that lost its program...
Replies
15
Views
413
I've worked on one Mitsubishi PLC in the past 40 years. Now, it looks like I get to tackle another one...using GX-WORKS3-C1 software which I...
Replies
3
Views
918
I have been asked to work on a Mitsubishi Melsec FX2N-80MR PLC but have no experience with Mitsubishi at all. The hope is to get online to find...
Replies
4
Views
1,276
I have an 80's PLC, Mitsubishi K2NCPU that needs replacing. Is there a software / cable available to upload and print the current PLC program? Thanks
Replies
3
Views
925
We received a cell that has a MELSEC Mitsubishi FX 2N-80MR PLC installed. We need to access the PLC program for troubleshooting and additional...
Replies
4
Views
1,962
Back
Top Bottom