LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP- Need to send packets faster

I'm going to be testing a product that can read 4 simultaneous GigE Vision streams. In order to do this, I plan on using the NI PCIe 8235. I will be simulating a GigE Vision camera with specified image for deterministic testing. I currently have a StarTech gigabit ethernet card and a 3.33GHz pentium and I'm trying simulate one stream on one processing core. Hopefully if I can accomplish this, 4 cores and 4 ports should work.

 

The product I'm testing will not be using jumbo frames (I know, I know), so I'm limited to the standard ethernet size. During my testing (attached VI), I saw that I could only accomplish one HD frame in 87ms. I need to find a way to bring this down to a 30Hz frame-rate.

 

The ideas I'm currently tossing around are

  • Finding a way to speed up the code
  • Seperate real-time computer or other dedicated equipment
  • Buying a top-of-the line computer and pray
  • Custom drivers (I would rather not)

 

Any experiences or ideas?

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 1 of 8
(4,336 Views)

You need to check to make sure that the gigabit ethernet can support the speed. Ethernet cards are not all created equal. The drivers and implementation can have big differences.

 

Are you connecting to the ethernet card directly? Are you using a switch? If there is an intermediate item, you need to ensure that it is capable of handling the rate.

0 Kudos
Message 2 of 8
(4,332 Views)

Thanks for the reply

 

There shouldn't be any intermediate items. I only a GigE camera connected to the port. I'm sending UDP packets without a relevant port so I assumed the camera would ignore them and the port would go as fast as it could.

 

Now that I'm writing this, would Wireshark (ethernet bus monitor software) count as an intermediate item? I closed it down and get this error:

Error 55 occurred at UDP Write in Bandwidth Test.vi
Possible reason(s):
LabVIEW:  The network operation is in progress.

The VI only seems to get between 50-100 packet sending iterations before it dies. Did closing down wireshark speed it up too much for the card to handle?

 

 

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 3 of 8
(4,328 Views)

Are connected directly to the computer? If so, you have no intermediate device. Wire shark will definitely slow the operation down. Try rebooting the computer with the wire shark not enable.

0 Kudos
Message 4 of 8
(4,322 Views)

The computer I am coding/running on has the PCIe Ethernet port. The ethernet cord from that port is connected to a camera. So no intermediate device.

 

Rebooted without the wireshark service.

 

I also looked into the error code 55 that I was receiving. It appears that you receive the error, you have to wait and try again. I didn't want to add a 1ms wait so I just went directly to trying again. The code is attached.

 

I tried again and got a frame duration of 90 (which should be 90ms given the 1kHz timing).

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 5 of 8
(4,317 Views)

If your camera is 1 mega pixel (1 byte) at 30 frames a second it will need 30 MBytes /second.

If you have 16 bits per pixel, it will be 60 Mbytes per second.

If you have color 8 bits per color, you will need 90 Mbytes per second.

If you have 16 bit color, you will need 180 MBytes persecond.

 

Gigabit ethernet as a rule of thumb is about 100 MBytes per second.

 

What is your camera requirements?

0 Kudos
Message 6 of 8
(4,309 Views)

As of now we are using YUV422, so the equivalent of 16bits per pixel. Since you said that is roughly 60Mbyte/sec, it should handle it. That being said, I might be losing bandwidth due to the "no jumbo frames" requirement.

 

I accounted for this in the VI. Given 1920*1280, 2 bytes/pixel, and roughy 1444bytes/packet, I was sending 3403 packets.

 

 

Thanks for the responses so far.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 7 of 8
(4,307 Views)

You are exceeding the data rate for the gigabit ethernet. Remember, a packet has a bunch of overhead bytes by themselves. I compute you require 147417960 bytes /sec. or 147 Mbytes per second. Gigabit ethernet has about 100 MBytes /sec transfer rate as a rule of thumbs. If you want to exceed this, you will be needing to bond multiple ethernet lines together.

0 Kudos
Message 8 of 8
(4,300 Views)