Seshan Govender wrote: > Hi Jan > > Firstly, thanks as the system between my two PCs is running > after I configured them as master and slave. From the > rtnet.conf I am using a TDMA_CYCLE of 10ms and a TDMA_OFFSET of > 100us. This is due to the fact that the frame I require is 100ms > long with 100us slots. However with these settings I get round > trip times that flactuate between just below 10000us up to 20000us > when I run the round trip example (addons/examples/round-trip) > with an interval of 10 ms and a packetsize of 512 bytes. Is there > something I am doing incorrectly as these times seem to be quite high? >
Again, nothing wrong here: note that your event generatot, round-trip, is not synchronised on the TDMA cycle. Thus, whenever round-trip decides to send a packet, this transmission as to wait on the next cycle first - up to 10 ms. The receiver may ran into the same situation if there is not enough time left between the packet arrival and its own transmission slot. 100 us offset between sender and replier can be to short, taking the software and hardware latencies into account. When there is enough time for a reply, you should end up with worst-case round trips of about <cycle_time> + <rel_offs_sender_receiver>. The best case would be <rel_offs_sender_receiver>. By synchronising your application's processing cycle on the TDMA cycle dev = rt_dev_open("TDMA<n>", O_RDONLY); rt_dev_ioctl(dev, RTMAC_RTIOC_WAITONCYCLE, TDMA_WAIT_ON_SYNC); // planned: RTMAC_WAIT_ON_XMIT you may optimise your timing - but this depends on the other tasks these apps have to do. > My current system configuration is: > 2 x P4 256MB 750Mhz, RTL 8139D NIC, RTAI 3.0r4, RTnet 0.8.3, > linux adeos kernel 2.4.25. > > Any and all help would be greatly appreciated > > Seshan Govender > Jan
signature.asc
Description: OpenPGP digital signature