dulu Posted February 18, 2015 Report Posted February 18, 2015 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
Will Posted February 18, 2015 Report Posted February 18, 2015 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.
dulu Posted February 23, 2015 Author Report Posted February 23, 2015 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.
AlexUT Posted February 23, 2015 Report Posted February 23, 2015 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
dulu Posted February 23, 2015 Author Report Posted February 23, 2015 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).
AlexUT Posted February 23, 2015 Report Posted February 23, 2015 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?
dulu Posted February 23, 2015 Author Report Posted February 23, 2015 The communication speed is 9600 Bd, slave: IO modules CREVIS
AlexUT Posted February 23, 2015 Report Posted February 23, 2015 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. 1
MVP 2023 Joe Tauser Posted March 13, 2015 MVP 2023 Report Posted March 13, 2015 Your delay is probably the best way to go. Serial communications can not be counted on to be instantly updated, as Alex explained. Joe T.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now