Sign in to follow this  
Followers 0
Vasa

Mitsubishi Q-Series to PC Interface

58 posts in this topic

Hey guys, Was wondering if you guys could help me out with one dilemma. I need to interface a Mitsubishi PLC (Q-series) with a Desktop Computer. The PLC is running a machine, which produces parts. Once the machine produces say 50 parts, the PLC needs to give a signal to the Computer (through a serial connection), and then the Computer would Print a specific label. First of all, I’m wondering if such interfacing is even possible with Mitsubishi PLCs and if it is, how can it be achieved. Does Mitsubishi have software for such task? Thank you. Note: I can get my hands on GT Works 2 if I need to accomplish this task but I usually use GxDeveloper. The Q-Series CPU is the basic one with 1 USB and 1 Rx-232, no Ethernet connections. All expansion slots on the PLC rack might be occupied already (not 100% on this).

Share this post


Link to post
Share on other sites
There are numerous data collection or access softwares out there, like OPC servers and ActiveX controls. You will need to come up with a program on the PC to do what you ask, but an OPC server (like MX OPC Server) or ActiveX (like MX Component) would handle the communication for you. And it's GX Works2 for the PLC, GT Works2 is the old software for the HMI. But the programming software has nothing to do with data collection on a PC.

Share this post


Link to post
Share on other sites
In addition to Crossbow's post, if you can add an expansion board and a new module (serial/ethernet or similar) your label printer most likely can handle a serial or ethernet signal that automatically prints the label. Maybe you can even send the text itself over serial/ethernet. When it comes to printers I always use direct connections from the PLC to the printer, but note that the PLC will not have drivers for a standard office printer. Label printers most often have a serial ascii interface or similar. Since you will have to purchase equipment/software in any way I would also consider to simply upgrade the PLC system with a new expansion board and a new hardware module. That way you can also remove the computer from the system...

Share this post


Link to post
Share on other sites
Thanks a lot you guys! I'll take a look at the stuff you've mentioned.

Share this post


Link to post
Share on other sites
your problem description says that only task done on Desktop PC is to print a label, in that case why use PC at all? label printers should have RS232 interface so send the data from PLC straight to the printer. if PLC sends something over RS232, and you want PC in a loop, you don't need OPC server or ActiveX, just a simple terminal will do (any programming language on a PC end will easily interface to RS232). you would need OPC/ActiveX only if PLC does nothing and your PC needs to access PLCs memory (like an HMI).

Share this post


Link to post
Share on other sites
Hey panic mode, thank you for the suggestion. The thing is, the PC is already on the line, and the operator is manually inputting the label parameters, but the customer requested that we remove this potential for operator error by having PLC do this operation. Removing the PC does not really effect anything at this point and it would be better to have a PC so we can get back to the manual mode at any moment. Now if you say we do not need any software, how exactly do we tell the PLC WHAT to send and WHEN??? We don't really have anyone on our team with real programming skills - I don't consider ladder logic to be a programming language :o) Thanks.

Share this post


Link to post
Share on other sites
Agree, however in this case the topic starter doesn't have a RS232 or Ethernet card. If he/she is to use the system serial port he/she will need to program the protocol which in essence will take more time than simply purchasing a RS232 card (oir ethernet card) and program a simple command/text control

Share this post


Link to post
Share on other sites
Hey kaare_t, Thanks for a response. I've actually just came here to ask if I can use the RS232 Port that is built into the CPU unit of the PLC, or do I need a Smart Module for Serial Connection - QJ71C24. Only now I realize what you were talking about in your original post. I'm worried that there are no more expansion slots for the Serial Module and expanding the rack is not an option either. Also I can already feel that I'll be asked to do the same procedure with another machine which is using FX series PLC. So, using software would be Plan A and adding Serial Modules and replacing the FX series PLC with a Q series PLC would be Plan B. Downloading IQ Works Demo right now (it includes MX Component). We'll see what happens. Edited by Vasa

Share this post


Link to post
Share on other sites
@kaare_t now that you mention it, you are probably right. i have no time to dig through manuals. built in port probably may not handle anything but MC protocol in which case using OPC or ActiveX like MX Components will be much more practical. it would allow you to talk to CPU through any port (including one on CPU - we did just that on occasion). note that using ActiveX such as MX-Components means developing own application using something like VisualStudio etc. (last time I used it, we did it on VB6). the MX components disc includes manuals, code samples and utilities. @Vasa, can you confirm if you have a spare slot and if printer has RS232? also how about exact part number of the CPU?

Share this post


Link to post
Share on other sites
I am planning to, just couldn't get to the machines they are not at the same plant I work at. Tomorrow will get the info, should also be able to download the software by tomorrow heh. Big thanks guys!!!

Share this post


Link to post
Share on other sites
Here's a possible solution: Could you upgrade the CPU to a newer QnUE CPU with built in Ethernet? That way you could build a simple client/server application on the PC side that handles e.g. "GET" from the PC which returns "ACK" or "NAK" from the PLC? That would be very easy, just like panic mode suggests.... They are not very expensive and would be a direct replacement of the PLC you use today except the serial programming port is replaced by an Ethernet port. You can program the Ethernet port like you wish. You can even send commands directly to the printer if it supports Ethernet...

Share this post


Link to post
Share on other sites
I've never seen a demo version of iQ Works. Where are you getting this? Not from their US website. And I've never heard of a demo version including MX Component. That software must be licensed for each PC it is run on. No you cannot use the built-in RS232 port to connect a serial printer. Must be the C24 module for that. And there's no reason to pull an FX to do this. There are serial options for the FX products as well.

Share this post


Link to post
Share on other sites
Dang it... You're right Crossbow. Yes, I'm getting the demo from their website (http://www.mitsubishi-automation.com/productframe.php?filename=mysoftware/demo.php) but it doesn't have Mx Component. They just had a link in the description of the MxComponent so I assumed its bundled in their somewhere. Ok, so that just leaves one option, I guess that's good.

Share this post


Link to post
Share on other sites
What kind of options are you talking about?

Share this post


Link to post
Share on other sites
FXnn-232BD, FX2N-32IF... What FX PLC do you have?

Share this post


Link to post
Share on other sites
Good Morning Fellas, Ok, the Q series PLCs are Q00UCPU, both of them have 2 slots available on the rack so I think we are OK with those. The FX PLC is a FX0N-60MR. Not sure, but FX0N-232ADP seems to be thing I need here. The printers are Datamax O'Neil I-Class Mark 2, they have serial connection. Apparently the Labels to be printed are complex in nature that's why we need the PC, but I'll research this further, may be these printers just need to have the label design uploaded and then the PC can be removed, I don't know. Anyway, thanks a lot guys, I think I've learned more from you here than in my Mitsubishi PLC Training Class.

Share this post


Link to post
Share on other sites
Vasa, that website isn't for North America. That's Mitsubishi Europe. I am shocked the download was available before creating an account. What Mitsubishi PLC class are you talking about? They have a few.

Share this post


Link to post
Share on other sites
Hey Crossbow, I did create an account... I'm talking about the very basic class, its a 1 week class. The class is pretty good actually, the problem is that I did not get to experiment much with what they've taught because my job usually involves troubleshooting and improving equipment - not building it. As a result I am clueless as to the different smart modules and communication options. As for the project itself... I've talked to our IT guy and he mentioned that another company is writing the application for us to communicate with the PLC through the built-in RS232 port so there's a good chance I won't have to do anything. I'm still hoping though that these guys won't be able to do it and I will get to play with the Rs232 Smart Module hehehe.

Share this post


Link to post
Share on other sites
Hey Guys Quick Update: I had the IT guy set up all the communication and then he tells - "Ok, Make the PLC output some Data to the PC". I tell him that I cannot do it with the built-in RS232 Port, that I assumed they were writing the software to Read the PLC Registers. They said that's not what they were doing... so I guess I'm not even sure what they were doing. Anyway, I've just ordered one QJ71C24N-R2 module. Any tips on how to use it, I'm looking through manuals and it mentions some Switch configurations, and Modbus settings... I've never done this before, so any input to steer me in the right direction would be very helpful. Thank you. - VaSA

Share this post


Link to post
Share on other sites
Hey kaarte_t, Can you please describe how you do the PLC directly to Printer communication, this is the route I'd like to go if it is possible to not have a PC by the line. Thanks.

Share this post


Link to post
Share on other sites
A manual for the printer would be a good start.... Note that I've written "... most likely can handle a serial or ethernet signal ..." and we haven't seen the manual yet so it's a bit hard to point you in any direction... Send us a link or upload it and we'll take a look.

Share this post


Link to post
Share on other sites
The manual for the printer is here: http://www.datamax-oneil.com/do/com/en-us/home/printers-software/stationary-printers/industrial-barcode-printers/i-class-mark-ii Really appreciate this guys!

Share this post


Link to post
Share on other sites
The manual states that it is possible for external devices to communicate using RS232 but there's no documentation that I can find that specifies the format and content of the communication. You should contact them and get a protocol specification, then post it again.

Share this post


Link to post
Share on other sites
Hey kaare_t, Alright, I've called the company, apparently there is another programming manual. It can be found here: http://www.datamax-oneil.com/do/com/en-us/file.cfm/88-2341-01_K.pdf?contentID=5694 Its a bit long, I'll probably have to sit on the john for a week to go through it. But anyway, what are the things I should be looking for, from what I understand I will need to send ASCII code from the PLC. But I'm wondering, do you set up the printer with a Laptop and then just call the program using a simple command from PLC, or do you have to do everything from the PLC? Thanks. Edited by Vasa

Share this post


Link to post
Share on other sites
A bit more information about what you want to print would be helpful. E.g. are you printing similar texts with different values, or are the texts different each time? I took a very brief look and I didn't see anything indicating that you can pre-program texts and then call them with variables inside. The easiest would be to call predefined texts, but will they contain variables that you want to set, or are all the texts static all the time? You can also program the basics in the PLC and reuse whatever texts you would like using a function block or similar. A bit more info would be helpful. You could also ask the manufacturer if it is possible to call predefined texts using ascii, or if you really have to send the complete text using ascii each time you want to print...

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
Sign in to follow this  
Followers 0