Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to reserve an Ethernet cDAQ device in the software?

I am using an Ethernet device, but there will only be one PC connecting to it.  It is possible to reserve this device in software so I can eliminate that step for my clients.

 

Thanks.

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 8
(6,660 Views)

Have you checked out the DAQmx Reserve Network Device.vi, under Measurement I/O -> DAQmx - Data Acquisition -> DAQmx Advanced -> System Setup? The detailed help on this VI says 'Adds a Network cDAQ device to the system and, if specified, attempts to reserve it.'

 

Palette.pngAdd NetowrkDevice.png

- Regards,

Beutlich
0 Kudos
Message 2 of 8
(6,654 Views)

I'm using VB.NET.  I'm assuming a function exists, however, since LabVIEW has something.

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 8
(6,652 Views)

Greetings,

what language are you programming in? Visual Basic, C#, etc?

Product Support Engineer
National Instruments
0 Kudos
Message 4 of 8
(6,637 Views)

VB.NET

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 5 of 8
(6,635 Views)

Oh, whoops, sorry about that. I misread what you'd originally said. I looked around in the object browser in Visual Studio 2010 and found a few methods that look like they're exactly what you're looking for.

 

NationalInstruments.DAQmx.DaqSystem.AddNetworkDevice()

 

Adds a Network cDAQ device to the system. This method does not attempt to reserve the device after the device is successfully added.

 

 

This can be followed up with

 

NationalInstruments.DAQmx.Device.ReserveNetworkDevice()

 

 

Reserves the Network DAQ device for the current host. Reservation is required to run NI-DAQmx tasks, and the device must be added in MAX before it can be reserved. This method does not override any existing reservations on the device.

 

 

Please take a look at these and let me know if you have any further questions.

 

Thanks,

James Duvall

Applications Engineer

National Instruments

Product Support Engineer
National Instruments
0 Kudos
Message 6 of 8
(6,620 Views)

Hey! I`m creating a c++ application and I have a simillar problem. I already included the NIDAQmx.h in the application, but after compile it says "DAQmxReserveNetworkDevice" was not declared in this scope. Do you guys know how to implement this function in a c

++ application?

 

*Others functions, such as createTask,createDIchannel are working perfectly

0 Kudos
Message 7 of 8
(5,521 Views)

I got it. I just added the function in the header and now the function is available. I`m sending the header in attatchement.

0 Kudos
Message 8 of 8
(5,507 Views)