4/27/2016 5:27 AM | |
Joined: 10/7/2005 Last visit: 3/24/2025 Posts: 3042 Rating:
|
Hello ander33 If you call AG_LSEND in a 2ms interrupt OB, the fastest you will be able to trigger a new send will be every 4 ms as you need to supply the ACT parameter with a new rising edge input, for example:
The above assumes though that the Send data is indeed fully send within 2ms and that DONE bit is set by AG_LSEND. This is not necessarily the case as AG_LSEND operates asynchronously and may need longer to send the data to the CP (which depends on how much data you are sending and how busy your CPU is processing other comms request). You could of course invoke other programming tricks to call AG_LSEND twice in the 2ms interrupt OB to try and speed things up, but this won't help you if it hasn't finished sending all the data yet. Anyhow, depending on your CP version and providing you can live with less than 1452 Bytes to send, you can try to speed things up by using AG_SSEND. Have a look at the FAQ What should you pay attention to when using the communication blocks FC53 "AG_SSEND" and FC63 "AG_SRECV"? for more on this. |
Cheers |
|
Follow us on