LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NISysCfgInitializeSession and IP Addresses

CVI 2017, Win7, two different computers.

 

Trying to get the CalibrationAudit example to work with my cDAQ hardware. 

 

The first function call passes the target char pointer, to obtain a session handle:  NISysCfgInitializeSession(target, NULL, NULL, NISysCfgLocaleDefault, NISysCfgBoolTrue, 10000, NULL, &session)

 

As long as target is equal to "localhost" the app gets the calibration information for cDAQ assembly and displays it.  See figure below.

 

Snap1.png

But when I use an IP address, the function call returns an error, as shown below:

Snap2.png

 

This does not make sense, since "localhost" works, I can ping the chassis, I can connect to its web server, etc.

 

I must be able to connect with IP addresses, because this capability is needed on a system with four distributed cDAQ chassis.

 

What have I set wrong, or what other thing needs to be done to get this function call to work with IP addresses?

 

I even tried doing leading zeros for the last two fields, and got this:

Snap3.png

 

 

0 Kudos
Message 1 of 8
(4,185 Views)

Are your two computers on the same subnet?

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,123 Views)

computer 1 is at 192.168.41.10, second is at 192.168.41.11, cDAQ at .91.

 

I am going by this, which says it should use IP address or hostname, neither of which works.

snap4.png

0 Kudos
Message 3 of 8
(4,121 Views)

Have you tried pointing it at the computer's IP address instead of the cDAQ?

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 4 of 8
(4,102 Views)

No.  I'm confused.  I'm trying to get the module calibration information for the cDAQ units, all four of them on my network.  Are you saying that these NiSysCfg calls are obtaining this information from Max or saved Max information, and not from the actual units? 

 

If that is the case, I guess I need to filter the returned information by cDAQ hostname, in order to separate them by unit.

0 Kudos
Message 5 of 8
(4,100 Views)

Would it be possible to try the MAC address to connect?

Can you run this example on other computers and connect to your targets via ip addresses?

 

There is a chance this could be a bug, in which case you might be best served creating a service request.

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 6 of 8
(4,066 Views)

Dane,

 

I am sure learning this NiSysCfg stuff by trial and error.  The documentation says what function calls are, and what parameters are, but so far I have not seen anything that gives some detail on what NiSysCfg does.

 

I need to talk to a NiSysCfg expert.  I don't have a lot of questions, but they are down in the weeds questions, like these:

 

Starting a session using localhost seems to be the only thing that works, I suspect because the session is an NiSysCfg session on t he computer running it, and has nothing to do with hardware on the LAN.  This is not starting a session with an actual cDAQ unit.

 

When I filter for resources on my cDAQ unit, why are the resources returned in some arbitrary order, not slot order.  Using CalibrationAudit, there is no sorting order that I can figure.

 

I think (not know) that starting a session, creating a filter and executing the filter does not entirely go out on the LAN to find information in hardware, like a cDAQ chassis.  I suspect this because if I disconnect the chassis I get some resource parsing successes with real data, and some failures.  Not consistent.

 

In particular, if I want last cal date and next cal date, are these values coming from the Max database, or are they coming from the actual modules in a cDAQ chassis on the LAN?  I need real information, not outdated information.

 

I am working it out, and should be able to incorporate what I need in my CVI/cDAQ projects.  Having 4 cDAQ units on the LAN, the approach will be a little brute force.

0 Kudos
Message 7 of 8
(4,064 Views)

Some of these questions seem like they may best be answered through a Service Request where an AE can reach out to R&D and try and get you answers to some of these questions.

Dane S.
Product Support Engineer
National Instruments
0 Kudos
Message 8 of 8
(4,040 Views)