diraemon

qj71mt91 com error in QJ71MT91 modbus module

33 posts in this topic

hello everyone,,

I use the QD03UDV PLC and the modbus QJ71MT91 module, I want to test the module using modbus poll but it fails continuously, and when I upload the program to the LED notification PLC "COM.ERR." the module is ON ... but in GX Works2 I have no errors .. why is it like that, can someone help me?

 

 

 

 

 

4.jpg

2.jpg

WhatsApp Image 2019-01-16 at 14.40.34.jpeg

Edited by diraemon

Share this post


Link to post
Share on other sites

For this you will most likely need to extract the error code from the modules buffer memory using FROM_M function.

Otherwise if you have GX Configurator MB- this will give you more detailed error tools.

This is a module specific error and not a direct PLC error which is why it doesnt appear in PLC Diagnostics.

 

Regards

Daniel.

Edited by collinsd70

Share this post


Link to post
Share on other sites

Check these memory areas for codes then feedback the error number(s).

Regards

Daniel.

IMG_3355.PNG

Share this post


Link to post
Share on other sites
12 minutes ago, collinsd70 said:

For this you will most likely need to extract the error code from the modules buffer memory using E_FROM function.

Otherwise if you have GX Configurator MB- this will give you more detailed error tools.

This is a module specific error and not a direct PLC error which is why it doesnt appear in PLC Diagnostics.

 

Regards

Daniel.

I installed GX configuration-MB but it can't be used because I use PLC Q03UDV which doesn't support GX developer? can the configuration-MB GX be used separately?

6.jpg

Share this post


Link to post
Share on other sites
12 minutes ago, collinsd70 said:

Check these memory areas for codes then feedback the error number(s).

Regards

Daniel.

IMG_3355.PNG

can you give me an example program to diagnose it? I still confused to program it sir,,

 

Share this post


Link to post
Share on other sites

You are using GX Works 2 correct?

Create a connection to function FROM_M in LD..

Connect your module head address to the input parameter (K..head number).

Then your module address area as above, so start with 0C10h.

Connect your output to an INTEGER.

Download and go online....read to me the output parameter.

I do not have my laptop with me at the moment so this is purely by memory.....

Regards

Daniel.

 

Edited by collinsd70

Share this post


Link to post
Share on other sites

If you can wait until 6pm (GMT) ill send you some code to extract the error informations..

 

Regards

Daniel.

Share this post


Link to post
Share on other sites

See attached ASCII Source and Image for reading the 5 main error messages from the Modbus TCP Module. I have bench tested this FB but cant test on the real hardware as I dont have this module.

Add this to your project by doing the following.

1. Open your project in GXWorks2.

2. Cick Project --> Open Other Data --> Read ASCII Format File.

3.Point to the .asc file and execute

4.Once import complete, define an instance of the FB in your global variables.

5. Load the FB into your POU and attach instance name, your need to add the head address of the module to the input parameter iHeadAddr.

6. All output error codes will come out as INT's, so either create 5 INTs or just make an array like I did.

7. oNo_Error is a Boolean and is just for indication.

8. Compile and Download then see what errors you get back.

 

 

Regards

Daniel.

 

ModbusTCP FB.asc

ModbusTCP FB.bmp

Share this post


Link to post
Share on other sites
5 hours ago, collinsd70 said:

See attached ASCII Source and Image for reading the 5 main error messages from the Modbus TCP Module. I have bench tested this FB but cant test on the real hardware as I dont have this module.

Add this to your project by doing the following.

1. Open your project in GXWorks2.

2. Cick Project --> Open Other Data --> Read ASCII Format File.

3.Point to the .asc file and execute

4.Once import complete, define an instance of the FB in your global variables.

5. Load the FB into your POU and attach instance name, your need to add the head address of the module to the input parameter iHeadAddr.

6. All output error codes will come out as INT's, so either create 5 INTs or just make an array like I did.

7. oNo_Error is a Boolean and is just for indication.

8. Compile and Download then see what errors you get back.

 

 

Regards

Daniel.

 

ModbusTCP FB.asc

ModbusTCP FB.bmp

thx you mr. daniel.. i try it,,

Share this post


Link to post
Share on other sites
13 hours ago, collinsd70 said:

See attached ASCII Source and Image for reading the 5 main error messages from the Modbus TCP Module. I have bench tested this FB but cant test on the real hardware as I dont have this module.

Add this to your project by doing the following.

1. Open your project in GXWorks2.

2. Cick Project --> Open Other Data --> Read ASCII Format File.

3.Point to the .asc file and execute

4.Once import complete, define an instance of the FB in your global variables.

5. Load the FB into your POU and attach instance name, your need to add the head address of the module to the input parameter iHeadAddr.

6. All output error codes will come out as INT's, so either create 5 INTs or just make an array like I did.

7. oNo_Error is a Boolean and is just for indication.

8. Compile and Download then see what errors you get back.

 

 

Regards

Daniel.

 

ModbusTCP FB.asc

ModbusTCP FB.bmp

its still cant work in gxwork2 sir, i can write the program you give to me to PLC,,
but thx you for reply me mr. daniel

Share this post


Link to post
Share on other sites

but in this time i can write the module QJ71MT91 without error in notif LED module but still cant connect the module to modbus poll,,
i connect the cable like this to connect modbus poll but failed always,,

7.jpg

Share this post


Link to post
Share on other sites

Are you able to ping your module from your computer?, have you established the necessary IP address?

You may need to use a ethernet switch if you are not using a crossover cable.

Send me your current GXW2 project and I will integrate the FB for you...

 

 

Regards

Daniel.

Share this post


Link to post
Share on other sites
33 minutes ago, collinsd70 said:

Are you able to ping your module from your computer?, have you established the necessary IP address?

You may need to use a ethernet switch if you are not using a crossover cable.

Send me your current GXW2 project and I will integrate the FB for you...

 

 

Regards

Daniel.

I use ladder sir for the program,, not familiar with FB,,

this program that I tried and the result was no error but I still failed to try modbus poll,,

17012019.jpg

Share this post


Link to post
Share on other sites

@diraemon If you use GX Works 2 you don't need to create communication ladder program. You can config them by use Intelligent Function Module -> select Modbus module -> MODBUS_Device_Assignment then mapping PLC Address to MODBUS variable. After that you can use Modbus Poll or ModScan to communicate with PLC.

QJ71MT91_Config_01.jpg

Edited by Wasan

Share this post


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

@diraemon If you use GX Works 2 you don't need to create communication ladder program. You can config them by use Intelligent Function Module -> select Modbus module -> MODBUS_Device_Assignment then mapping PLC Address to MODBUS variable. After that you can use Modbus Poll or ModScan to communicate with PLC.

QJ71MT91_Config_01.jpg

mr @Wasan i still failed to connect modbus poll,, is there something I missed?

 

1.jpg

2.jpg

3.jpg

4.jpg

7.jpg

6.jpg

5.jpg

8.jpg

9.jpg

10.jpg

Edited by diraemon
i edited to attact picture

Share this post


Link to post
Share on other sites

@diraemon Please send capture screen for each picture not all in one picture.

Before that you should try setting like this and download parameter to PLC again then restart and connect with Modbus Poll again.

Mitsu_Q_Modbus_Config_01.jpg

Share this post


Link to post
Share on other sites

 

14 minutes ago, Wasan said:

@diraemon Please send capture screen for each picture not all in one picture.

Before that you should try setting like this and download parameter to PLC again then restart and connect with Modbus Poll again.

Mitsu_Q_Modbus_Config_01.jpg

I have reposted my attachment in above,,
already sir but it still fails when connecting with modbus,, ?

Edited by diraemon

Share this post


Link to post
Share on other sites

@diraemon I think you use DHCP on Obtain and IP address automatically that means you receive IP address from router but now you connect with PLC network. You should fix IP address on your computer to communicate with PLC I should seperate into 2 posts for network config and PLC configuration.

First start with network configuration.

1. Open Control Panel.

QJ71MT91_Network_Config_01.jpg.437facaf9

2. Go to View network status ans tasks.

QJ71MT91_Network_Config_02.jpg.287974b20

3. Go to change adapter settings.

QJ71MT91_Network_Config_03.jpg.8bff4c2d8

4. Select your network adapter that connect with QJ71MT91 then right click and select Properties.

QJ71MT91_Network_Config_04.jpg.b576c3a8a

5. Click at Internet Protocol Version 4 (TCP/IP4) then click Properties

QJ71MT91_Network_Config_05.jpg.26aabe049

6. Select at Use the following IP address: then input IP address that in the same group of your PLC network (for information you should learn about basic network configuration)

and input Subnet mask (for starter use 255.255.255.0 if you understand network setting you will know that what it means) then click OK.

QJ71MT91_Network_Config_06.jpg.f0e86c39c

For PLC setting check at next reply.

Share this post


Link to post
Share on other sites

@diraemon After config computer network we will go to config QJ71MT91 now.

1. Open GX Works 2 , create project then go to Inteligent Function Module, right click then select New Module.

QJ71MT91_Config_PLC_01.jpg.d7663fd3ad0d5

2. Select Module type to Modbus and Module Name to QJ71MT91 and adjust Slot No. and start address at you use then click OK.

QJ71MT91_Config_PLC_02.jpg.b9300ce633095

3.Click at module just created and select Switch Setting.

QJ71MT91_Config_PLC_03.jpg.7e167956f455b

4. Config IP Address to same group as computer (For Example use 192.168.3.20) and adjust parameter as image shown below then click OK.

QJ71MT91_Config_PLC_04.jpg.86c948c70844e 

5. Go to Module again and select MODBUS_Device_Assignment to config slave parameter.

QJ71MT91_Config_PLC_05.jpg.3a781509782a5

6. Adjust parameter of device to mapping to Modbus address (in example use D0 to D12288 to Modbus Holding Register 400000 to 412288).

QJ71MT91_Config_PLC_06.thumb.jpg.8d9c38e

7. Go to Online then write to PLC.

QJ71MT91_Config_PLC_07.jpg.faa67ac3c7a92

8. Select Parameter and Program the Execute.

QJ71MT91_Config_PLC_08.jpg.fec158192672b.

9. After successful write Parameter and Program. You should push switch on PLC from Run to Reset hold until LED blinks finish then back to Run position again.

10. Go to Windwows button or Run and type cmd.exe in search field.

QJ71MT91_Config_PLC_09.jpg.0188484c2467d

11. Select cmd.exe or Command Prompt.

QJ71MT91_Config_PLC_10.jpg.01bdc92539dfa

12. We will check basic connection by use command "ping QJ71MT91 IP Address" in example "ping 192.168.3.20" not include " symbols and click enter button.

QJ71MT91_Config_PLC_11.jpg.e51e9a1604ea8

13. If it fails to connect it will shown Request timed out. You should check that there are some missing parameter on computer or PLC or not.

QJ71MT91_Config_PLC_12.jpg.211e5f48b8f51

14. If it success it will shown "Reply from IP Address  bytes=xx time=xxms TTL=xx:".

QJ71MT91_Config_PLC_13.jpg.0c8eb4bb6c9c6

15. Open ModbusPoll go to Setup and select Read/Write Definition.

QJ71MT91_Config_PLC_14.jpg.05045deaabf8d

16. Adjust Modbus Parameter to match with QJ71MT91 slave parameters.

QJ71MT91_Config_PLC_15.jpg.b5aae80b5d3f5

17. Go to Connection after that select Connect.

QJ71MT91_Config_PLC_16.jpg.ee867f4bd5efd

18. Select Connection to Modbus TCP/IP and assign QJ71MT91 IP Address (In Example 192.68.3.20) then click OK. 

QJ71MT91_Config_PLC_17.jpg.5897e18d6be2b

19. If setting all parameter corrcetly it will shown data from PLC.

QJ71MT91_Config_PLC_18.thumb.jpg.af8b8a3

For more information about QJ71MT91. You should check at this link below.

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

Share this post


Link to post
Share on other sites

mr. @Wasan  I have followed the advice of your tutorial but still experience difficulties when pinging use cmd and when trying modbus poll,,

 

this is my configuration :

in IP laptop

5.jpg

in GX works2

1.jpg

 

IP in module QJ71MT91

2.jpg

 

in modbus assignment parameter

3.jpg

 

in modbus poll using IP same as in module QJ71MT91

7.jpg

8.jpg

 

in cmd result the pinging same as IP in module QJ71MT91

9.jpg

i dont know I missing  what?

Edited by diraemon

Share this post


Link to post
Share on other sites

@diraemon First you should not use PLC IP Address that duplicate with PC IP address such as

PC: 192.168.3.10

PLC: 192.168.3.30

QJ71MT91: 192.168.3.20

after Download parameter you should reset PLC by switch or turn off PLC then turn on again.

Then Ping PLC and Module again.

And please send how you connect Ethernet Cable from PLC, PC and QJ71MT91.

Share this post


Link to post
Share on other sites
13 minutes ago, Wasan said:

@diraemon First you should not use PLC IP Address that duplicate with PC IP address such as

PC: 192.168.3.10

PLC: 192.168.3.30

QJ71MT91: 192.168.3.20

after Download parameter you should reset PLC by switch or turn off PLC then turn on again.

Then Ping PLC and Module again.

And please send how you connect Ethernet Cable from PLC, PC and QJ71MT91.

I have changed IP on GXW2 to be different from IP on PC. I want to ask whether in "open settings" I don't need to change anything?
and I've tried pinging again but still like this screenshot.

12.jpg

 

I connected the internet cable from QJ71MT91 port to Ethernet port on PC. Do not connect an ethernet cable to the PLC port Q03UDV. Did I connect it wrong?

13.jpg

Edited by diraemon

Share this post


Link to post
Share on other sites

@diraemon I have remark something do you have connect QJ71MT91 on Expansion board. What module slot no.that you connect with? You should change Module Slot No. to match with Slot No. that you mount QJ71MT91 in.For Specify start XY address if you don't know what XY start you can disable it. After download parameter you should check at Diagnostics -> System Monitor and check that there are errors or warnings on QJ71MT91 slot or not.

QJ71MT91_Config_PLC_02.jpg.b9300ce633095

Share this post


Link to post
Share on other sites
2 minutes ago, Wasan said:
7 minutes ago, Wasan said:

@diraemon I have remark something do you have connect QJ71MT91 on Expansion board. What module slot no.that you connect with? You should change Module Slot No. to match with Slot No. that you mount QJ71MT91 in.For Specify start XY address if you don't know what XY start you can disable it. After download parameter you should check at Diagnostics -> System Monitor and check that there are errors or warnings on QJ71MT91 slot or not.

QJ71MT91_Config_PLC_02.jpg.b9300ce633095

QJ71MT91_Config_PLC_02.jpg.b9300ce633095

yes mr. @Wasan I use the extension module and have adjusted to the number slot and have no errors, but still can't use modbus poll..

16.jpg

Share this post


Link to post
Share on other sites

@diraemon Please connect PLC with QJ71MT91 then go to Network Connections and select Ethernet connection that you connect with QJ71MT91 if it connect with QJ71MT91 module it should shown Enabled. After that try to Ping 192.168.3.20 again. It should be connected now.

QJ71MT91_Network_Config_04.jpg.b576c3a8a

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