Hello! I'm building an ethernet based IO board to be used with LinuxCNC. I wrote a short webpage about my project on www.pekka.eu/cnc
Everything is working quite well, except for the write and read operations being too slow. I have two functions exported to HAL, read and write. The .time pin which is automatically exported to HAL for each function states that the execution time of the read and write functions are about 450000ns and 40000ns respectively. For debugging, I generated my own pins for both functions to measure the execution time of the function itself. I measure the execution time by calling rtapi_get_time() in the very beginning of the function and in the end. I calculate the difference and pass it to a HAL pin. By examining the values of these pins, I see that the execution times according to rtapi_get_time() are about 220000ns and 18000ns for read and write. So it seems that the execution time stated by HAL is a bit more than double the execution time of the function itself. The 220us execution time for the read would be something that I'd expect from my hardware, but when it's doubled it starts to be too much for running servo thread with 1kHz. Is this expected behavior? It sounds a bit strange to me, especially as the ratio between the two measurements is quite close to two. I have checked like million times that I don't have the functions added to the treads twice or something other stupid things, but I cannot seem to find anything like that. Does anyone have any hints? I have tested my software with Debian Wheezy, kernel 3.2.0-4-rt-686-pae and with LinuxCNC versions 2.7.0~pre6 and 2.7.0. Thank you for any comments. Regards, Pekka Roivainen PS. This being my first post ever to this list, I want to express my greatest gratitude to all the developers of LinuxCNC. This is a fantastic piece of software. ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
