raffles

Serial Modbus Comms

7 posts in this topic

Hi guys!

I'm sure I'm missing something as I'm not really familiar with Mitsubishis PLC platform, I'm struggling to get Modbus Comms setup.

I'm using a R04CPU, with RJ71C24 serial module.  The info available says I should be able to use predefined protocol support for Modbus.  The error message from the GP/CPRTCL instruction is H7FF2(32754) which in the manual is "Communication protocol setting error" - "The instruction cannot be executed with the current communication protocol".  I have a simple single register write setup to try and prove comms before I actually program the rest of the functionality.5bfaf9ee52d24_ScreenShot2018-11-25at11.35bfaf9f1d05d7_ScreenShot2018-11-25at11.3

I managed to get Modbus/TCP setup correctly through the CPU ethernet port, but this is my next hurdle

Share this post


Link to post
Share on other sites

Hello and welcome!

  1. Did you setup the C24 card with "Predefined Protocol" (under Basic settings)? Default is MELSOFT protocol...
  2. Did you write the Predefined Protocol to the C24 module (in Predefined Protocol Support Function tool, select "Online->Write to module")?

Share this post


Link to post
Share on other sites

Thanks for the response

1) - yes, screenshot attached5bfb023d1c264_ScreenShot2018-11-25at12.1

 

2) - Yes and I confirmed by reading from the PLC back as well.

 

I changed from a single register write to a holding register read and now I don't get the same error.  Instead I now get a timeout error H7D12

Share this post


Link to post
Share on other sites

Great! First of all, set "Sumcheck Code = None". You're sure that the slave device is using 8-E-1 bit settings?

Share this post


Link to post
Share on other sites

Thanks -I changed that, I still get the timeout errors.  Yes I can setting are correct - I can read/write using my laptop over RS232

So I think I have figured out that I need to write to "Intelligent Function Module", not "CPU Built-in Memory", I no longer have the protocol errors at all, just time out errors which means I have to dig into the wiring again I guess...

5bfb0580801d7_ScreenShot2018-11-25at12.2

Share this post


Link to post
Share on other sites

I just noticed in your previous picture:

Change both "Online change" and "Setting change" to "Enable". Regarding memory destination you are correct! But try changing to "Enable" first...

Share this post


Link to post
Share on other sites

Thank you for your help - we have a successful test, now I can finish the programming at least!

I'll need to make some time to invest in some learning for this platform for sure!

 

Cheers

Edited by raffles
typo

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