Sign in to follow this  
Followers 0
S7Bruce

FX Communications Question

9 posts in this topic

Hi, How is it possible to communicate with an FX plc over the programming port? What manual do I look in for the information? A friend is going to use an FX plc for a data collection project. The data wll be stored in a series of D values in the plc. We want to be able to periodically upload the data out of the serial port. All the info on FX comms I have seen so far deal with add-on rs232 modules. I know it can be done out of the programming port though. At work we have a bunch of machines with FX plcs and an HMI called an MTA (I've also seen it called a MAC too I think}. The MTA is hooked up to the programming port and is able to read and write to D values(and maybe M too} in the plc. I have looked thru the program but I don't see anything that looks special. Except a couple of odd rungs where they have a normally open contact, M1 for example, followed by a coil of the same name, M1. Those seem to corespond to the F keys on the HMI. How did they do it? What magic codes do I send to the plc to make it send back the contents of D128 for example? Is there some M8000 that I have to set to enable this out of the programming port? Your help would be appreciated. Thanks, Bruce

Share this post


Link to post
Share on other sites
What software is your friend going to use to programme the FX with? How many data registers do you want to collect each time? Reason for asking is that the programming software might just be the best way to interrogate the FX .... just go on line, and read the values in the data registers and write them down with pen and paper. Long winded, but cheap. IEC developer has a DEVICE EDIT function that allows ranges of data registers to be read from the PLC and exported to spreadsheet .... much quicker for large numbers. DOS MEDOC will just display them. Not sure what GX developer does, but would imagine it has a similar function to IEC Developer. Failing that most of the Beijers "E-Terminal" HMIs have the ability to not only interrogate D registers, but, by setting up trends on the screens, will actually save "time and date stamped values" into CSV files which can be read from the HMI using the freely available HMI tools software. Comms from PC to FX are normally RS232 at the PC and RS422/485 at the FX .... and a bit specialised / odd so that a Mitsubishi converter lead is normally needed, or failing that, a Beijers HMI does exactly the same comms conversion for you.

Share this post


Link to post
Share on other sites
Thanks for the reply. Yes, we have Medoc so it would be possible to just display the D registers and write them down. We will be looking at 128 D registers and I thought it would be faster to have a Basic program query the PLC and store them in a text file. I have recently been playing with GX Developer so I will have to check if they have something like the Device Edit function in there. If that doesn't work do you know which Mitsubishi manual would have the comms information on how to interrogate D registers over the 422 port? Thanks Bruce

Share this post


Link to post
Share on other sites
In MEDOC sub-menus: Edit Other Dwrset (Data Write Read Set) or whatever this is Here you can upload, download, save (to 10 different names) and Recall (some that you have saved) *Have a look at this you'll understand better.This was often used for recipes. This type of need is best handled with MelDDE and MSExcel Edited by Pierre

Share this post


Link to post
Share on other sites
Pierre's right .... had a quick look and it seems that you can view at least 128 data registers in that one window. All those years and I never discovered it ................ you learn something every day

Share this post


Link to post
Share on other sites
Thanks, I never knew what Dwrset was for. I never used it. FXGPWin has --Register Data Transfers-- under the PLC menu. I have had that for several years but never used it. I always found Medoc easier to use. I have been trying GX Developer lately. That has something that will work too. Online----PLC user data----Read PLC user data. So, there are plenty of ways to read D register out without doing it the hard way. I need to try new things more often. Thanks to you all for your help, Bruce

Share this post


Link to post
Share on other sites
Furthermore ... here is a complete system for you to study in order to "make" yours. In this file there is a FX1N plc program that logs 2 pumps runtimes during 10 days in 30 minutes periods. Every 30 minutes registers will have a data of 0 to 1800 seconds. So you have 96 data registers per day. These 10 days of data can be uploaded to an Excel Worksheet using MelDDE. On the worksheet you will see 3 buttons. "Write" is to upload each 96 data in 10 consecutive sequences and writing them in there respective cells. "Archive" is to save the newly filled worksheet with its onw name thats is tagged with the actual date "Reset" writes a bit to the PLC and then resets all registers to start loggin again. It might not be exactly what you want but will give you insight on one way to proceed. When you open the Excel worksheet you will be prompted to establish the DDE link, just say NO and have a look at the embeded VB source code. (left click on Sheet1 and vew the VB source) Hope this helps. DDE_FX_Logger.ZIP

Share this post


Link to post
Share on other sites
Thanks Pierre, I will look this over and see if we can use it. Best regards, Bruce

Share this post


Link to post
Share on other sites
Communications are fixed at 9600 baud, 7 data, 1 start, 1 stop and even parity. The protocol is essentially ASCII, with control codes delimiting portions of the messages. The LRC value is the 8-bit SUM of all bytes in a message from after the STX up until and including the ETX. <H3 style="MARGIN: 24pt 0cm 12pt">Read Register</H3>Enquiry/ Ready? ENQ 05 § Acknowledgement: ACK 06 ª Read request (Y0): STX CMD Start Addr Hi Start Addr Lo Number bytes ETX LRC LRC O2 30 30 30 30 3A 30 32 03 36 36 J 0 0 1 0 0 0 2 © 5 4 Read response: STX Data ETX LRC LRC O2 xx xx xx xx 03 xx xx J X X X X © X X <H3 style="MARGIN: 24pt 0cm 12pt">Write Register</H3>Enquiry/ Ready? ENQ 05 § Acknowledgement: ACK 06 ª Write request (Y0): STX CMD Start Addr Hi Start Addr Lo Number bytes Data ETX LRC LRC O2 31 30 30 30 3A 30 32 Xx xx xx xx 03 36 36 Write response: ACK 06 <H3 style="MARGIN: 24pt 0cm 12pt">Write Bit / Device Forcing</H3>Enquiry/ Ready? ENQ 05 § Acknowledgement: ACK 06 ª Write request (Y23): force on STX CMD Start Addr Hi Start Addr Lo Number bytes ETX LRC LRC O2 37 31 33 30 35 00 02 03 xx xx OR Write request (Y23): force off STX CMD Start Addr Hi Start Addr Lo Number bytes ETX LRC LRC O2 38 31 32 30 35 00 02 03 xx Xx Write response: ACK ª 06

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