From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically discover real time targets (SbRio). Do what MAX does.

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.

0 Kudos
Message 1 of 6
(2,361 Views)

If nothing else, use Wireshark to record what happens during a MAX discovery.  You can then recreate it with whatever tools you want.


--Using LV8.2, 8.6, 2009, 2012--
0 Kudos
Message 2 of 6
(2,357 Views)

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,

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
Message 3 of 6
(2,351 Views)

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.

 

0 Kudos
Message 4 of 6
(2,349 Views)

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

0 Kudos
Message 5 of 6
(2,345 Views)

Thanks Spex,

 

That's what I'm looking for.

0 Kudos
Message 6 of 6
(2,343 Views)