Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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).

Posted

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?

Posted

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
  • 3 weeks later...

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.