LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I just send the data to NIC's buffer in LV? (how to access data link layer?)

Now, I need to send something over network, yet those are not packed in TCP/IP or IPX packet, them are just some data a device can understand. So the problem I met is seems I cann't send the data into NIC's buffer(I can do that in C, yet I want to use LabVIEW to do that) And I don't want to do that by using a CIN, every time the program call or exit the CIN,there will be a delay, it's would bring me a bad impace to my application. So is there anyone can help me with that? I really need some master can give me a comfirm!
0 Kudos
Message 1 of 9
(4,240 Views)
How about using "Call library node" to do the same as in your C code?
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 9
(4,235 Views)
I would be interested in this as well.  Currently, to write an Ethernet monitor to check traffic between two computers we had to write a wrapper DLL to access WinPCAP functions (unfortunately for your question, this requires external code access).  Now we are being asked to do this action on a real-time target, which won't interface with Windows DLLs...
 
Oh, bother....
 
Dan
0 Kudos
Message 3 of 9
(4,234 Views)
Oh mine.... Why can't LV do such a thing.... I really want to prove that LV is capable of doing most tasks to my boss... And I would just want to ask about the RT issue as well, since I would like to build a calibration station for the digital power staion, and I guess you could imagine when we talk about accuracy, time is a important matter. So, how long would we have to expect LV add/improve these functions? Could it be in next minor update?
0 Kudos
Message 4 of 9
(4,216 Views)
I'm not an expert on network communication, so maybe you can explain how data can travel on an IP based network without being wrapped in some packets from a protocol like TCP or UDP? Maybe it's possible for LabVIEW to do what you want, or maybe compiling your C code into a DLL (no need for a CIN) and calling that will be fast enough for what you want.

In any case, I think I can answer one question:

So, how long would we have to expect LV add/improve these functions? Could it be in next minor update?

Not likely, nor is it likely to be in any other version soon. LabVIEW is not built to handle this sort of thing any more than PHP or perl are and I don't think NI will change it to be able to do so. For that you have C, which you can call through a DLL. Some DLLs are supported on RT targets as well, but I'm not sure what the criteria are. They are probably listed somewhere on this site.

I assume that calling a DLL in an RT target will hurt your determinism, but communication code should not be time-critical code, unless your application is an application which requires high speed data transfers and synchronization between different nodes.


___________________
Try to take over the world!
0 Kudos
Message 5 of 9
(4,174 Views)
On Dec 17, 10:40 pm, jiangliang <x...@no.email> wrote:
> Oh mine....
>
> Why can't LV do such a thing.... I really want to prove that LV is capable of doing most tasks to my boss...
>
> And I would just want to ask about the RT issue as well, since I would like to build a calibration station for the digital power staion, and I guess you could imagine when we talk about accuracy, time is a important matter.
>
> So, how long would we have to expect LV add/improve these functions? Could it be in next minor update?

use winpcap:
At NI http://zone.ni.com/devzone/cda/epd/p/id/2660
0 Kudos
Message 6 of 9
(4,157 Views)
I mean to write some thing to the NIC, instead of just capture the data.
 
I use this function to simulate a IEC 60044 data stream, which will be sent to the meter.
 
So I need to write non-TCP/IP or what-so-ever protocal to the NIC... Really SAD to know that LV is not capabile of doing that...
 
 
0 Kudos
Message 7 of 9
(4,147 Views)
0 Kudos
Message 8 of 9
(4,136 Views)
I agree.  WinPCAP is a pretty powerful module that lets you pretty much do anything you want with your NIC.  It's kinda scary to think about what an industrious hacker could use it for. 
 
Two flaws that have hit us hard, however.
  1. You must load the drivers while logged in as administrator, or you won't be able to access the interfaces.  You can log out and have anyone else take over from there.  Just remember not to restart the computer, or you'll have to have an admin log in again, load the drivers, and log out.
  2. It's a Windows DLL which won't run in the real-time environment.  It doesn't look like they are going to be building the DLL into PharLap or other RTOS's anytime soon, so we're out of luck.  Seems to me that it would be a cool thing to develop an (Gigabit?) Ethernet interface card for PXI whose drivers allow for the user application to sniff or inject traffic at any communication layer.  Any takers?  I've got $20 in my wallet you can have for it...

Dan

0 Kudos
Message 9 of 9
(4,125 Views)