avik

modbus communication

10 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

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