omron — Setting the Inter-Packet Delay

Chapter 2 System Components The inter-packet delay is the parameter that will allow us to control the rate of data from the camera. Let’s assume that we are using a camera transmitting bayer data. This camera is capable of running at 91 fps with an 8 millisecond exposure time. With a 9000 byte packet size one frame of data (656 x 494 = 324,064 bytes + a small overhead) can be transmitted in 38 packets. The actual data from the camera will be sent over the network at the clock rate which, for gigabit Ethernet, is 125MHz. This is 8 nanoseconds per clock. Assuming no overhead and no delays between packets our frame of data from the camera would take 324,064 clocks, which is 2.59 milliseconds.

There is nothing we can do to change this time to transfer the data. With the InterPacketDelay (IPD) set to zero the camera sends one packet of data and then immediately sends the next (actually there is a minimum delay of approximately 96 nanoseconds). This process repeats until all the packets that make up an image have been transmitted. Increasing the IPD tells the camera to take a short break between sending each packet, which might give other devices a chance to send some of their data. We can put a delay between each packet. The inter-packet delay is set in “ticks”, where there are 31,250,000 ticks in one second. From this we know that 1 tick is 32 nanoseconds.

Let’s assume that we want our camera to run at 33 fps. In this case 1 frame is equal to 30.3 milliseconds. We can take off the fixed data transmission time of 2.59 milliseconds and that leaves us 27.71 milliseconds. With 38 packets per image that means that every packet needs to take 729 microseconds. Dividing 729,000 nanoseconds by 32 nanoseconds gives us a tick count of 22,781. This is the inter-packet delay we need to put in the Visionscape registry entry. The following calculations show how this works in reverse: – 22,781 ticks is 729 microseconds. – A 2MB image is approximately 38 9k packets. – 38 * 729 microseconds = 27.71 milliseconds. 2-34 Visionscape GigE Camera Guide