05-07-2012 04:30 PM
I'm looking for a method outside of labview as the code on our host machine will be running in .NET. I'd like to be able to enumerate real time devices that exist on the network (similar to what MAX does).
From other posts, MAX sends a UDP broadcast, but the details of the packets are not known. Is there some way via ActiveX/COM that I can do exactly what MAX is going? I'd also like to stay outside of the labview runtime if possible.
Is what is done under MAX a public api that users can consume? I need to be able to dynamically discovery devices, or retrieve the information contained in MAX.
05-07-2012 04:48 PM
If nothing else, use Wireshark to record what happens during a MAX discovery. You can then recreate it with whatever tools you want.
05-07-2012 05:44 PM - edited 05-07-2012 05:46 PM
I think the System Configuration API should provide the access you are looking for. This API should be what MAX is using.
Download here: NI System Configuration 5.0 - Windows 7 32-bit/Vista 32-bit, Real-Time OS/XP/Server 2008 R2 64-bit/V...
The readme indicates it is supported in LabVIEW, LabVIEW RT, and LabWindows™/CVI™
Here is the Function Reference for the API.
Finally, a whitepaper discussing using the System Configuration API for system replication.
Obviously, the driver isn't ported to .NET, but with a little work, I expect you could wrap the C funtions correctly, and you would avoid the LabVIEW RTE, if that is your goal.
Personally, I don't recommend using Wireshark... that might work... until it doesn't. A static string constant written over UDP would be very rigid/brittle method if (when) NI changes anything about the discovery method.
Cheers,
05-07-2012 05:45 PM
Sure, but I'm still going to need to be able to decode what the devices send back. What the underlying structure of the sent and received bytes are so that I can make sense of them. I could probably look at what the labview VIs do and toggle device settings, but I really don't want to go through the effort of reverse engineering this. My time is better spent solving other business related problems.
05-07-2012 05:49 PM
You might be able to extract some useful information about the protocol used to talk to remote real-time targets from this thread: http://forums.ni.com/t5/LabVIEW/RT-Restart-Target-vi-what-is-the-communication-protocol/td-p/1713908
05-07-2012 06:01 PM
Thanks Spex,
That's what I'm looking for.