Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2018-11-08 09:43:46

rexpeter
Member
Registered: 2016-09-06
Posts: 67

Modbus RTU communication with more than 31 slaves

Hi,
I'm intending to use Modbus RTU communication with multiple slave stations.
However when I was configuring station #1 up to 31, all was fine, but adding one more was giving problems to write configuration file.
I noticed it is written int he User Manual for up to 32 Slave stations. But is there another way to expand this to 50 slave stations?
I already tried adding a second MBM driver I/O block with a second driver file that is using a second comport with RS485 converter, but negative, the same problem.

I thought to understand that communication with Modbus slaves in general can go up to 256 addresses, and might need a signal amplifier when going beyond 32 addresses. But is this maximum of 32 slave stations a limitation caused by REXYGEN software, or is there another reason for it?

Anyway the main thing is that I factually need to be able to expand the number of stations up to 50.
And of course there is always a possibility to use a complete second system to achieve it, but if it is possible with one and the same system, it would be nice.

Looking forward for feedback on this.

Regards,
Peter

Offline

#2 2018-11-08 19:49:54

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus RTU communication with more than 31 slaves

Hi Peter,
can you please upload the project demonstrating this problem?

Because I have tried a project with 40 Modbus stations and it compiles just fine.

Kind regards,
Jaroslav

Offline

#3 2018-11-13 20:58:47

rexpeter
Member
Registered: 2016-09-06
Posts: 67

Re: Modbus RTU communication with more than 31 slaves

Hi Jaroslav,

I did not want to publish the project here because of confidential reasons included in the subsystems, but will send it to you for evaluation.
I indeed noticed it is NOT related to the Modbus limitation, but it appeared to be related to my "Subsystem" that is dealing with all data coming from the Modbus slave.

Message I get during compiling:

List of modules:
    MbDrv
    StdBlk
List of required licences:
    Standard function blocks
    REXLANG programmable function block
    Modbus driver - serial master (RTU)
Fatal error 213: Error writing the configuration to a file!
Error: configuration was not created

Would it be possible that the system is limited to the number of blocks it is processing?

When I used up to 31 modules, it is giving me this information:
Processed 21974 blocks, 1 task(s)

That is still compiling without problems.
However adding one more of my self created complex subsystem is generating the above mentioned error writing the configuration to a file.

Where is that limit for the number of blocks to process?
If this is really the problem that the number of blocks used is too much, I need to simplify my subsystem, making it less complex (less flexible for my intended usage) and created a couple of different subsystems to do the job.

Looking forward for you feedback.

Kind regards,
Peter

Offline

#4 2018-11-15 08:30:00

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus RTU communication with more than 31 slaves

Hi Peter,
there can be 32767 blocks in a single task and there can be up to 255 tasks in your project. From the information you provided it is obvious that neither of these is reached.

Our developers are investigating the root cause of the issue. I'll get back to you once I have some news.

Kind regards,
Jaroslav

Offline

#5 2018-11-21 23:03:39

rexpeter
Member
Registered: 2016-09-06
Posts: 67

Re: Modbus RTU communication with more than 31 slaves

Hi Jaroslav,

Thanks a lot for you feedback by email on my "project".

********************************************************************************************************
Back to the original problem: in your case it's the unconnected SpareInputs of the subsystems, which go into another subsystem, where they go into REXLANG. The RexComp compiler in the current version cannot process it, it is not able to determine the proper data type to use. Please connect e.g. CNS block with an empty string and you should be fine. I agree the error message does not help at all to locate the problem. Moreover, there is an internal threshold for such errors so that it does not bother you in every single occurence as it has no effect on the execution. In larger project like yours, the threshold is exceeded and an error message is issued.
*********************************************************************************************************

Indeed after hooking up signals to these "floating signals", and implementing a couple of "general programming rules" to make the code more easy to read, I could expand the number of ModBus connected SubSystems to over 32 without a problem.

Thanks once more for your valuable feedback!

Best regards,
Peter

Offline

#6 2018-11-22 09:46:33

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: Modbus RTU communication with more than 31 slaves

Hi Peter,
glad I could help. Thanks for the feedback.

Kind regards,
Jaroslav

Offline

Board footer

Powered by FluxBB