Example Code

Communicating with an FX series Mitsubishi PLC

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
Included is an example that should communicate with an FX series (I tested on FX1S series) Mitsubishi PLC.


Description
The included example is HEAVILY documented.

Included is working examples of read, and write commands to single bit registers (no words sorry), and documented instructions on how to set up a correct CRC check at the end of your packet.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip “PLC example 2012 NIVerified.zip”
  2. Open " Mitsubishi PLC example 2012 NIVerified.vi"
  3. Configure the port settings
  4. Run the program

 

Additional Information or References
VI Block Diagram

 5-75.png

To elbroate communicaiton with the PLC is conducted via handshakes to and from the PLC to the host computer via RS232.

This looks like in 8 bit ASCII

(carriage return) 05 (PLC address) FF  (FF is filler) BR (Bit Read) 0M0 XXXX (reg number) 0X (number of registers to read) XX

so it looks like ignoring header symbold

05FFBR0M012305FR (CRC check not correct)

which means, read M 123 to M 127 (123,124,125,126,127)

The response will look like

05FF00110CR (CR for CRC, also not correct)

Which means M 123 0 (off), M 124 0, M 125 1, M 126 1, M 127 0

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
tohami
Member
Member
on

Hello  Valarauca

can you help me?

i need to build cable between pc (it is lab top but i already make usb to com converter) and fx1-64mr.

please if you can support me by diagram

i will appreciate that

regards

Tohami

Valarauca
Member
Member
on

I can't help you with the physical hardware connection. Likely contact Mitsubishi directly they have an excellent technical support department (one in each nation they sell in so you'll always get a native speaker of your language on the phone).

I can tell you that you'll need a USB to serial convert. USB doesn't communicate the same as RS-232/485/422 (Grouping those together isn't proper but possible). You'll need something similiar too

http://www.bb-elec.com/Products/USB-Connectivity/USB-to-Serial-Converter/Isolated-USB-to-Serial-Conv...

Then the only problem will be then determining the pin out from the PLC to the Converter, which can be determined from literature from Mitsubishi.

Pujacontrols
Member
Member
on

Hi,

I have worked withh all these stuffs earlier

i hope this connection may work

http://www.rakurs.su/files/AutomationSystems/V042-E1-01+PC_Connection+Operation_Manual.pdf

Please reply with the status.

popac
Member
Member
on

Hello you can try FX-USB-AW for Mitsubishi FX 3UC usb/rs422 PLC probraming cable.

suresh1989
Member
Member
on

Hello Valarauca,

can please share the above fx(1s) series PLC code with the above ni labview example.