Stefan009

Modbus timeout "on desk" setup

6 posts in this topic

Hi, i have this  NX1P2 cpu with 2 CIF105's.

On one of them i have 6 modbus sensors, i talk to each and one of them in a cycle.
Occationally i get a timeout error on a random device.
They are connected via a Murr Elektronik M12 signal-splitter

Each sensor is connected by a 5 meter cable from the splitter.

The timeout seems to happen to random device at random interval, and it can be really long time between the timeouts.

I have looked around in the sysmac project to see if i could change the timout setting to something sligthly higher than current (default?)
Is there any timeout defaults that can be changed on modbus timeout?

Share this post


Link to post
Share on other sites

The option parameter on the Modbus RTU function block contains a timeout variable.

Share this post


Link to post
Share on other sites

Capture.JPG

Share this post


Link to post
Share on other sites

Almost worked.

I delclared a variable as _sSERIAL_SEND_OPTION (According to the help time).

TimeOut is not part of this struct. Only sendDelay shows up

 

EDIT: we are using NX_SerialSend NX_SerialRcv NX_SerialBufClear for the modbus.

Edited by Stefan009

Share this post


Link to post
Share on other sites

Well, I see 2 options:

1) Switch to the Modbus function blocks.

2) Monitor the time between a successful NX_SerialSend and something coming into the card's buffer. If the elapsed time is >= a value then assume a timeout.

Edited by photovoltaic

Share this post


Link to post
Share on other sites
25 minutes ago, photovoltaic said:

Well, I see 2 options:

1) Switch to the Modbus function blocks.

2) Monitor the time between a successful NX_SerialSend and something coming into the card's buffer. If the elapsed time is >= a value then assume a timeout.

Aa i understood the "other guy" with these units from this manufacturer, it talks modbus-ish, but its on way, so i believe the NX_Send/Recv is the only way to talk to these devices because the send package has to be formatted in a certain way.

 

The Recive option had timeout which i set to 3 seconds instead of default 2(?), and the NX_SerialBufClear default was 2 seconds, changed to 3, lets see if this reduces and/or removes the timeouts since in the logs its often clear or recv that times out.

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