Jump to content
dulu

timing when i use modbus-master RTU

Recommended Posts

Please could you explain how works the timing when i use modbus-master RTU. Right after the end of communication with slave (procedure readcoils), data won't update.In memory (MB1200...) there are data from the previous communication. When i try to load them with delay 10 ms then they are updated. what is the guaranteed period of validity of  data? Or what should i do to guarantee validity of a data?

 
Task is in attachment.
 
target : V1040
visilogic: 9.7.44
 
 

post-23433-0-61405000-1424278404_thumb.png

Share this post


Link to post
Share on other sites

There are a number of factors that impact communication between PLCs.  Some of these factors include the system speed, the type of communication (MODBUS, Ethernet, etc.), the information being communicated, the distance between PLCs, noise from the environment, and so on.  For these reasons, communication is not instantaneous, and there is no real guarantee that the validity of data being sent or received can be confirmed.

One way to help solve this issue is by testing different timing settings to find what delay (if any) works best for your application.

Share this post


Link to post
Share on other sites

Thank you for your reply, but it didn't really help. I need to know in which exact moment are the loaded data valid  in the succesfull end  of procedure readcoil.Meanwhile after the end of every communication master-slave i have to wait some"undefined" time. It's not very  sophisticated solution.

Share this post


Link to post
Share on other sites

Hi dulu,

 

As Will explained - there are many factors impacting communication.

 

Look for MODBUS "Function in Progress" and "Status".

 

To evaluate number of errors, you can check "Total" and "Acknowledged" number of sessions.

 

You can adjust "Retry" and "Timeout" in "MODBUS Configuration".

 

BR

Share this post


Link to post
Share on other sites

Communication task operates without a single error (status == 0), data is not lost, just not in force at the time of registration (NEt 3 in the picture).

Share this post


Link to post
Share on other sites

After activating MODBUS FB, result will be known in the next System Scan, or after number of scans. Dependent of communication speed, collision etc.

What is communication speed?

What is a Slave device?

Share this post


Link to post
Share on other sites

For 9600 bps bitrate time to transmit 1 bit is 1/9600=1.0416666666666666666666666666667e-4 Sec

Top transmitt 1 Byte with all surrounding bits time = 0.00125 Sec.

MODBUS Request for your case have 8 Bytes.

Thansmittion time 0.00125*8=0.010 Sec.

Replay for 64 MBs have 13 Bytes.

Thansmittion time 0.00125*13=0.01625 Sec.

Clean time between activate MODBUS Request and receiving all Bytes of reply is 0.02625 Sec.

Add to this processing time at both sides and other delays.

This is a time from MODBUS request, when data will be updated.

You can change COM port bitrate, if it is applicable.

This will make replay fastest.

Now look for PLC scan time. You cannot read reply fastest that next scan.

This is communication timing for your configuration.

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...