[etherlab-users] Cycle time
Massimo Mancin
Massimo.Mancin at syco.it
Mon Feb 2 16:23:58 CET 2009
Hi all!
After successfully connecting Etherlab master with copley accelnet motor driver, we tested the cycle time of the control chain.
Using the mini.c sample program we configured a set of PDO to send a refence velocity and to read two variables: one is the same reference velocity, the other is the velocity computed by the control of the accelnet device.
>From the log written at the end of the test, we see that the command sent is read back not at the next sample, as we were expecting, but after two samples, no matter which is the sampling period when it is greater than 1 msec, a part this, all sample we write, are read back.
If we reduce the sampling period to less than 1 msec (from 100 microSec to 500 microSec) we read the value several periods after it was written, some value was read several times and some value was lost.
Some one can explain me why we have such a latency and we cannot achieve a sampling period less than 1 millisecond.
The system was installed on a Pentium 4 at 1 Ghz with Linux 2.6.24 and the Etherlab version is 1.4.0 r1611.
Attached to the mail there is the mini.c program used to do the test.
In the follow lines the logs written by the program with a period of 10 Milliseconds, 1 Milliseconds and 100 Micorsecs.
Period = 10 Milliseconds
Counter |Time[microSec]|TargetVelocityWrite|TargetVelocityRead|CommandedVelocity
1000 | 0 | 1000 | 0 | 0
1001 | 9999 | 1001 | 0 | 0
1002 | 20020 | 1002 | 1000 | 1000
1003 | 30001 | 1003 | 1001 | 1001
1004 | 39999 | 1004 | 1002 | 1002
1005 | 49999 | 1005 | 1003 | 1003
1006 | 59999 | 1006 | 1004 | 1004
1007 | 69999 | 1007 | 1005 | 1005
1008 | 79999 | 1008 | 1006 | 1006
1009 | 90000 | 1009 | 1007 | 1007
1010 | 100000 | 1010 | 1008 | 1008
1011 | 109999 | 1011 | 1009 | 1009
1012 | 119999 | 1012 | 1010 | 1010
1013 | 130000 | 1013 | 1011 | 1011
1014 | 139999 | 1014 | 1012 | 1012
1015 | 150000 | 1015 | 1013 | 1013
Period = 1 Milliseconds
Counter |Time[microSec]|TargetVelocityWrite|TargetVelocityRead|CommandedVelocity
1000 | 0 | 1000 | 0 | 0
1001 | 1000 | 1001 | 0 | 0
1002 | 2020 | 1002 | 1000 | 1000
1003 | 3003 | 1003 | 1001 | 1001
1004 | 3999 | 1004 | 1002 | 1002
1005 | 5001 | 1005 | 1003 | 1003
1006 | 5999 | 1006 | 1004 | 1004
1007 | 7000 | 1007 | 1005 | 1005
1008 | 8000 | 1008 | 1006 | 1006
1009 | 8999 | 1009 | 1007 | 1007
1010 | 9999 | 1010 | 1008 | 1008
1011 | 10999 | 1011 | 1009 | 1009
1012 | 11999 | 1012 | 1010 | 1010
1013 | 13001 | 1013 | 1011 | 1011
1014 | 13999 | 1014 | 1012 | 1012
1015 | 14998 | 1015 | 1013 | 1013
1016 | 15999 | 1016 | 1014 | 1014
Period = 100 Microseconds
Counter |Time[microSec]|TargetVelocityWrite|TargetVelocityRead|CommandedVelocity
1000 | 0 | 1000 | 0 | 0
1001 | 100 | 1001 | 0 | 0
1002 | 219 | 1002 | 0 | 0
1003 | 300 | 1003 | 1000 | 0
1004 | 400 | 1004 | 1000 | 0
1005 | 500 | 1005 | 1000 | 0
1006 | 600 | 1006 | 1000 | 0
1007 | 703 | 1007 | 1000 | 0
1008 | 800 | 1008 | 1000 | 0
1009 | 900 | 1009 | 1000 | 0
1010 | 999 | 1010 | 1000 | 0
1011 | 1099 | 1011 | 1008 | 1006
1012 | 1200 | 1012 | 1008 | 1006
1013 | 1300 | 1013 | 1008 | 1006
1014 | 1400 | 1014 | 1008 | 1006
1015 | 1500 | 1015 | 1008 | 1006
1016 | 1600 | 1016 | 1008 | 1006
1017 | 1700 | 1017 | 1008 | 1006
1018 | 1799 | 1018 | 1008 | 1006
1019 | 1900 | 1019 | 1015 | 1014
1020 | 1999 | 1020 | 1015 | 1014
1021 | 2100 | 1021 | 1015 | 1014
1022 | 2200 | 1022 | 1015 | 1014
1023 | 2299 | 1023 | 1015 | 1014
1024 | 2399 | 1024 | 1015 | 1014
1025 | 2499 | 1025 | 1015 | 1014
1026 | 2599 | 1026 | 1023 | 1022
1027 | 2701 | 1027 | 1023 | 1022
1028 | 2800 | 1028 | 1023 | 1022
1029 | 2899 | 1029 | 1023 | 1022
1030 | 3000 | 1030 | 1023 | 1022
1031 | 3100 | 1031 | 1023 | 1022
1032 | 3200 | 1032 | 1023 | 1022
1033 | 3299 | 1033 | 1023 | 1022
1034 | 3400 | 1034 | 1030 | 1029
1035 | 3500 | 1035 | 1030 | 1029
1036 | 3599 | 1036 | 1030 | 1029
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090202/1b09ee1c/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini.c
Type: application/octet-stream
Size: 19344 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090202/1b09ee1c/attachment-0002.obj>
More information about the Etherlab-users
mailing list