avik

modbus communication

21 posts in this topic

Hi all,

i  am using Q series plc Q06UDVCPU and serial card QJ71C24N-R4 and i want it to communicate it with fuzi PXF4 PID i did everything in my knowledge to make it work but failed please share if anybody know about it anything it would be really a great help and also what is the instruction in gx works 2 for modbus communication for q series plc

Share this post


Link to post
Share on other sites

You can use a QJ71MB91 module dedicated for modbus communication or use an FB for modbus on a standard C24 module.

Another option is the pre-defined protocol support function.

 

Share this post


Link to post
Share on other sites
On 10/10/2561 at 5:11 PM, avik said:

Hi all,

i  am using Q series plc Q06UDVCPU and serial card QJ71C24N-R4 and i want it to communicate it with fuzi PXF4 PID i did everything in my knowledge to make it work but failed please share if anybody know about it anything it would be really a great help and also what is the instruction in gx works 2 for modbus communication for q series plc

As @Gambit said you can use QJ71MB91 to communicate with Fuji PXF4 but if you have only QJ71C24N-R4 you need to use predefined protocol as instructions below

1. Use Modbus scanner software (ModScan, Modbus Poll, etc) to read/write data from PXF4 (For PXF4 Modbus Communication check link below)

https://felib.fujielectric.co.jp/download/ContentDownload.htm?dataid=16281277&site=global&lang=en

2. Wiring QJ71C24N on CH2 Only (Cannot use CH1 for Modbus Communication because it not have echo back function for RS-485) to PXF4

3. Use GX Works 2 to create project and add QJ71C24N-R4 to parameter

4. Go to menu on left select Intelligent Function Module -> QJ71C24N-R4 -> Switch Setting and config CH2 parameter to match with PXF4 parameters and use Predefined protocol

Q_Modbus_01.jpg

5. Go to Various_Control_Specification Select Echo Back  to 1:Prohibited (If you use old PLC version you need to manual set this parameter in program as link below)

http://forums.mrplc.com/index.php?/topic/35280-qj71c24n-ch2-echo-back-for-modbus-rtu-predefined-protocol/

Q_Modbus_02.jpg

6. Select tool menu -> Predefined Protocol Support Function -> Serial Communication Module

Q_Modbus_03.jpg

7. Select New then click Add and select protocol Schneider Electric -> MODBUS -> 04: RD IN Registers

Q_Modbus_04.jpg

Q_Modbus_05.jpg

8. Click Variable Unset and config them to match with Modbus communication of PXF4 (I will descibe these later because I don't have module now)

Q_Modbus_06.jpg

9. Save then go to Module Read/Write and select Write to Module

10. Close Predefined protocol and create program to communicate with Predefined protocol as example link below at page 225

http://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080006/sh080006u.pdf

11. If everything OK you should read data from PXF4 correctly

Edited by Wasan
change PXF4 manual link

Share this post


Link to post
Share on other sites
18 hours ago, Gambit said:

You can use a QJ71MB91 module dedicated for modbus communication or use an FB for modbus on a standard C24 module.

Another option is the pre-defined protocol support function.

 

hello Gambit could you please tell me the dedicated name of FB used for Modbus communication

Share this post


Link to post
Share on other sites
4 hours ago, Wasan said:

As @Gambit said you can use QJ71MB91 to communicate with Fuji PXF4 but if you have only QJ71C24N-R4 you need to use predefined protocol as instructions below

1. Use Modbus scanner software (ModScan, Modbus Poll, etc) to read/write data from PXF4 (For PXF4 Modbus Communication check link below)

https://felib.fujielectric.co.jp/docfetch/CustomContentDownload.aspx?sid=A2814533ED4478AE441A9C0ED2DA3182871C3895A581E297&dataid=16281277&version=0&site=global&lang=en

2. Wiring QJ71C24N on CH2 Only (Cannot use CH1 for Modbus Communication because it not have echo back function for RS-485) to PXF4

3. Use GX Works 2 to create project and add QJ71C24N-R4 to parameter

4. Go to menu on left select Intelligent Function Module -> QJ71C24N-R4 -> Switch Setting and config CH2 parameter to match with PXF4 parameters and use Predefined protocol

Q_Modbus_01.jpg

5. Go to Various_Control_Specification Select Echo Back  to 1:Prohibited (If you use old PLC version you need to manual set this parameter in program as link below)

http://forums.mrplc.com/index.php?/topic/35280-qj71c24n-ch2-echo-back-for-modbus-rtu-predefined-protocol/

Q_Modbus_02.jpg

6. Select tool menu -> Predefined Protocol Support Function -> Serial Communication Module

Q_Modbus_03.jpg

7. Select New then click Add and select protocol Schneider Electric -> MODBUS -> 04: RD IN Registers

Q_Modbus_04.jpg

Q_Modbus_05.jpg

8. Click Variable Unset and config them to match with Modbus communication of PXF4 (I will descibe these later because I don't have module now)

Q_Modbus_06.jpg

9. Save then go to Module Read/Write and select Write to Module

10. Close Predefined protocol and create program to communicate with Predefined protocol as example link below at page 225

http://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080006/sh080006u.pdf

11. If everything OK you should read data from PXF4 correctly

thanks a lot Wasan i m going with this way see if i could do it

Share this post


Link to post
Share on other sites

For Step 1 I have to correct that Sum check code is Exist.

Q_C24N_PXF4_Modbus_00.jpg.16c02a2f369d80

I will additional describe in step 8 .

8.1 Set Parameter for 04: RD IN Registers (Read Input Registers).

Q_C24N_PXF4_Modbus_01.jpg.9884e01c66c223

8.2 Set Parameter for NOR/04: RD IN Registers (Normal Response : D31 to D155 used for receive data from PXF4).

Q_C24N_PXF4_Modbus_02.jpg.343ae3511a283e

8.3 Set Parameter for 04: ERR IN Registers (Error Response).

Q_C24N_PXF4_Modbus_03.jpg.4187760b5a145e

Then follow step 9 to write parameter to module.

After that go to step 10 to create example program as shown below.

Q_C24N_PXF4_Modbus_04.jpg.ee02a00eb71209

I will describe about this program.

First is echo back disable on RS-485 that I said in step 5 if your CPU are older.

Q_C24N_PXF4_Modbus_05.thumb.jpg.9987a457

This section are describe Modbus sending parameter as setting on step 8.1 as 

D0 : Slave Address (In this program use address 1)

D10: First input register address (use address 32001 to read PV "3" means Input Register)

D11: Quantity of Register to read  (In this program read 3 addresses)

Q_C24N_PXF4_Modbus_06.thumb.jpg.3519cc62

PXF4 Input Register addresses.

Q_C24N_PXF4_Modbus_Register.jpg.daaf454f

Use GP.CPRTCL to operate Predefined Protocol by D202 used for select which protocol to use.

U0 means Start address 0000 of QJ71C24N-R4 on Slot 0 (You can change to others to match QJ71C24N slot).

Q_C24N_PXF4_Modbus_07.thumb.jpg.8c0dbf87

If communication is complete M0 will on 1 cycle scan and M1 is off then data from D31 to D33 will move to D400 to D402 (because we select 3 addresses from D11).

You can use D400 - D402 to if use in program.If M1 on means there are something error in communication.

Q_C24N_PXF4_Modbus_08.thumb.jpg.a1ad7c56

Edited by Wasan

Share this post


Link to post
Share on other sites
22 hours ago, avik said:

hello Gambit could you please tell me the dedicated name of FB used for Modbus communication

You can download them from eu3a.mitsubishielectric.com but you will need to have/create a mymitsubishi account.

They we're made for GX IEC Developer but you should be able to use them for GX Works 2 aslo

 

 

modbus_C24.JPG

Share this post


Link to post
Share on other sites
16 hours ago, Wasan said:

For Step 1 I have to correct that Sum check code is Exist.

Q_C24N_PXF4_Modbus_00.jpg.16c02a2f369d80

I will additional describe in step 8 .

8.1 Set Parameter for 04: RD IN Registers (Read Input Registers).

Q_C24N_PXF4_Modbus_01.jpg.9884e01c66c223

8.2 Set Parameter for NOR/04: RD IN Registers (Normal Response : D31 to D155 used for receive data from PXF4).

Q_C24N_PXF4_Modbus_02.jpg.343ae3511a283e

8.3 Set Parameter for 04: ERR IN Registers (Error Response).

Q_C24N_PXF4_Modbus_03.jpg.4187760b5a145e

Then follow step 9 to write parameter to module.

After that go to step 10 to create example program as shown below.

Q_C24N_PXF4_Modbus_04.jpg.ee02a00eb71209

I will describe about this program.

First is echo back disable on RS-485 that I said in step 5 if your CPU are older.

Q_C24N_PXF4_Modbus_05.thumb.jpg.9987a457

This section are describe Modbus sending parameter as setting on step 8.1 as 

D0 : Slave Address (In this program use address 1)

D10: First input register address (use address 32001 to read PV "3" means Input Register)

D11: Quantity of Register to read  (In this program read 3 addresses)

Q_C24N_PXF4_Modbus_06.thumb.jpg.3519cc62

PXF4 Input Register addresses.

Q_C24N_PXF4_Modbus_Register.jpg.daaf454f

Use GP.CPRTCL to operate Predefined Protocol by D202 used for select which protocol to use.

U0 means Start address 0000 of QJ71C24N-R4 on Slot 0 (You can change to others to match QJ71C24N slot).

Q_C24N_PXF4_Modbus_07.thumb.jpg.8c0dbf87

If communication is complete M0 will on 1 cycle scan and M1 is off then data from D31 to D33 will move to D400 to D402 (because we select 3 addresses from D11).

You can use D400 - D402 to if use in program.If M1 on means there are something error in communication.

Q_C24N_PXF4_Modbus_08.thumb.jpg.a1ad7c56

thanks Wasan

Share this post


Link to post
Share on other sites
On 10/12/2018 at 11:34 AM, Gambit said:

You can download them from eu3a.mitsubishielectric.com but you will need to have/create a mymitsubishi account.

They we're made for GX IEC Developer but you should be able to use them for GX Works 2 aslo

 

 

modbus_C24.JPG

Dear sir 

Please share the link 

 

Share this post


Link to post
Share on other sites

@MR.VK as @Gambit said you should register at https://eu3a.mitsubishielectric.com/fa/en/mymitsubishi first then go to Downloads -> Program Example and find for Modbus Example function.

After you login please go to these links

QJ71C24N Modbus RTU Master

https://eu3a.mitsubishielectric.com/fa/en/mymitsubishi/download_manager?id=8638

QJ71C24N Modbus RTU Slave

https://eu3a.mitsubishielectric.com/fa/en/mymitsubishi/download_manager?id=8638

QnUDE Modbus TCP Client/Server

https://eu3a.mitsubishielectric.com/fa/en/mymitsubishi/download_manager?id=9097

https://eu3a.mitsubishielectric.com/fa/en/mymitsubishi/download_manager?id=9047

But if this is new project I recommend that you should use QJ71MB91 for Modbus RTU and QJ71MT91 for Modbus TCP for easier configuration.

For QJ71MT91 you can config Modbus TCP by setting parameter as shown in this link at page 116 - 119 for Client(Master) (in GX Works 2 at Automatic_Communication_Parameter)  and at page 120 - 130 for Server(Slave) (in GX Works 2 at MODBUS_Device_Assignment_Parameter).

http://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080446eng/sh080446engh.pdf

Edited by Wasan
1 person likes this

Share this post


Link to post
Share on other sites

Hi Wasan, i commnunication QJ71MT91 as master and Qj71MT91 as Slave, but it is not ok, . Please help me. thank you very much

Share this post


Link to post
Share on other sites

@microiuhvietduc Please send your PLC Master and Slave parameter setting to us for check that are config correct or not?

Share this post


Link to post
Share on other sites

Dear all.
Could you please help me?
I following all instructions and modbus communication working perfect but after disconnect slave unit and connecting again communication of MelsecQ PLC is OFF (SD and RD dont flasing). After reset PLC communication working again. This is not OK for me because I use 3pcs slave units.

Thank you.

 

Share this post


Link to post
Share on other sites

@maarek2 You should change time out in Pre-defined Protocol for recieve from 0 (infinite wait) to any number to change command to next communication whne time out.

QJ71C24N_Modbus_01.jpg

Share this post


Link to post
Share on other sites

Dear Wasan. Thank you very much for quick reply. Everything works.

 
 

 

 

Edited by maarek2

Share this post


Link to post
Share on other sites

hi, i have the same plc function, and the program is running good, i have a plc r series "r04" and im using rj71c24-r4 with rs485 and serial modul with predefined protocol support function in ch2, im using half duplex and my slave modbus rtu has id:1, the problem is when i want to add another device with id:2 and i created another protocol, but only id:1 works the id:2 is no readed, actually my program is based in this example. someone who can guide me how to correctly register the second device 

thanks

Share this post


Link to post
Share on other sites

Hi, I am having problem with QJ71C24N module when doing Modbus RTU communication. When I read or write from the Predefined Protocol Support Function tool, it shows an unsupported message (as shown below). Can anyone help me? Thanks!

 

Capture.PNG

Share this post


Link to post
Share on other sites

Maybe your module is too old to support the function? Is there something in the manual for the card of software that indicates a minimum version?  Features were added to the modules over time, and they have different lot codes that indicate the versions.  The manual should list what lot codes are minimum for the functions.

Pretty clear in that message that your module does not support the function.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks, I replaced another QJ71C24N module with a higher version and it worked. Currently, I want to communicate Modbus between this QJ71C24N module and HMI GOT1000. In which, HMI is Master and PLC is Slave. Is there any library that supports Modbus Slave for this QJ71C24N module? Thank you!

Share this post


Link to post
Share on other sites

Posted (edited)

@NgocQuy If you connect GOT1000 with QJ71C24N you can use Mitsubishi serial driver on HMI for configuration and cable wiring diagram please check on GOt1000 Connect Manual (Mitsubishi Products) at link below on page 263 - 280.

https://dl.mitsubishielectric.com/dl/fa/document/manual/got/sh080868eng/sh080868engag.pdf

But if you need to use PLC to be Modbus Slave with other Modbus Device you should use QJ71MB91 instead of QJ71C24N.

Edited by Wasan
add slave data
1 person likes this

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