LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Write & Transmit Ethernet Frames

I would like to implement GOOSE messageing (per IEC 61850 standard) on a RT Target (PXI controller). From what I understand GOOSE uses the entire 1500 byte payload in the ethernet frame. It does not use all the other layers like TCP & IP.  Therefore I have to contruct the GOOSE message per the standard and send that ethernet frame out a RJ45 jack on a LAN. How can I do this in Labview and subsequently on a RT target. I also have VeriStand 2010. Additonal questions below. 

 

 

1. How can we arbitrarily define the Ethernet payload without using the LabVIEW TCP/IP block (using Gbps Ethernet PXI adapter cards)?

 

2. Does NI have any drivers or libraries that can be installed on an RT Target running Pharlap (not windows) that provides link layer network access to the Ethernet cards. We want to be able to transmit and capture network packets by bypassing the protocol stack, i.e. not using TCP & UDP VI’s.

 

Also, I have looked into WinpCap but I'm not sure how to do this on a RT target. I'm sifting through the documentation on winpcap and see that I can call certain functions on and their are blocks made for packet sniffer. I am looking into making one for writing teh frame instead of reading it but both need help doing that and also finding a way to do this on the RT Target and not only in Windows. 

 

Thanks!

0 Kudos
Message 1 of 16
(6,046 Views)

Dru

 

I am looking more into this. But if this is possible the way to do this in LabVIEW is to use the VISA palette to open a reference to the ethernet port on your Real-Time device:

http://digital.ni.com/public.nsf/allkb/80C28CC795611E4A86256AB100209521?OpenDocument

Without using TCP/IP you must use the SOCKET resource. 

 

You can try using a VISA open vi to programmatically find the ethernet port.

 

In regards to the 2nd question: Not as far as I know of. However you can build and install your own custom installer file and deploy it to the Real-Time target.

 

I believe a good packet sniffer to use is wireshark http://zone.ni.com/devzone/cda/tut/p/id/6746 

 

I hope this gets you going 🙂

Sam S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 16
(6,017 Views)

Dru,

 

I have some more information:

This isn't possible with the currently available software in PXI  RT (PharLap).  VISA does not enable us to do this either.  The difficulty with this problem is to have the ability to send or receive ethernet frames you would have to subvert the entire TCP/IP stack.  While there has been some R&D investigation in this area there is nothing in the shipping product.  If this was absolutely necessary for this customer we would have to provide custom engineering, which isn't cheap.  In some situations like this we could recommend to customer to create their own DLL, but this really isn't possible in this case because we have so heavily modified the OS from base PharLap/ETS the entry points are completely different. 

 

This is the message from R&D on the matter, so it looks like there is no easy way to do this 🙂

Sam S
Applications Engineer
National Instruments
0 Kudos
Message 3 of 16
(6,001 Views)

Hi,

As Dru, we are also struggling with same issue.

If we only want to bypass TCP/IP stack in labview(windows), suggest me how can I acheive this?

0 Kudos
Message 4 of 16
(5,744 Views)

Hey D.S.

 

Why don't you tell me a bit more about what you are trying to do, and what is different than what Dru is trying above.  That way I can see if what you're trying to do is do-able.  

Regards,

Eric L.
Applications Engineering Specialist
National Instruments
0 Kudos
Message 5 of 16
(5,719 Views)

My requirement is same as Dru, I want to send Goose message from sbRIO, to IED's conneted on same LAN with sbRIO. Is there any vi which can help me.

0 Kudos
Message 6 of 16
(5,702 Views)

Hey D.S.

 

I'm afraid nothing has changed since Dru posted so Samuel's answer above still applies.  

Regards,

Eric L.
Applications Engineering Specialist
National Instruments
0 Kudos
Message 7 of 16
(5,691 Views)

Ok..

Can you tell me, how can I get the RAW TCP data.

I want to bypass TCP protocol stack provided in TCP/IP function palet.

I want to see actual TCP frame in labview and hence I would like to write them as RAW frame.

0 Kudos
Message 8 of 16
(5,685 Views)

Hey D.S.

 

The way TCP/IP works in LabVIEW is that Windows receives all the frames from TCP and stores them in that stack.  LabVIEW TCP commands can only read from that stack, LabVIEW has no other way around it.  As the stack is something inherent in how TCP works it is not really feasible for LabVIEW to be able to get around it.  Sorry. 

Regards,

Eric L.
Applications Engineering Specialist
National Instruments
0 Kudos
Message 9 of 16
(5,669 Views)
0 Kudos
Message 10 of 16
(5,641 Views)