LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding hardware automatically in a vi

Hi all,

I am working with simulated NI 9188 with NI 9214 and NI 9203 modules. When I plug the real devices to my PC, the vi could not show the real device in physical channel control box. But when I opened the MAX, I can see the real one in physical channel control box. I looked some examples to find automatically hardware but I could not utilize them for my vi. How could I find hardwares automatically? And also, I am wondering that how to code a vi when it run wait to setup in it and then pass to the acquisition. I mean wait to setup and completed it then pass to acquisition. 

Egemen
0 Kudos
Message 1 of 5
(2,655 Views)

HI newbieeng,

 

cDAQ-9188 Channels

 

The 9188 is an ethernet chassis - have you reserved it for use by your PC?

 

You can do this by navigated to Network Items in MAX and hitting Reserve Chassis.  Alternatively, if you would like to automate in software, you can use some of the functions of DAQmx (Palette: DAQmx » Advanced » System Setup):

 

SystemSetup.png

 

Reserving the device should allow you to see the physical channels in the DAQmx Channel Constant.

 

Code Architecture

 

The VI you attached is missing several dependancies and has a locked block diagram, so there is no way to see your code.

 


And also, I am wondering that how to code a vi when it run wait to setup in it and then pass to the acquisition. I mean wait to setup and completed it then pass to acquisition.


 

This sounds like you need a state machine.  Here you would have a 'state' to run your setup code, when that is complete you then move to your acquisition state.


Regards,

Peter D

0 Kudos
Message 2 of 5
(2,647 Views)

I am sorry Peter, I have forgotten to write the password. It is 4987. The code has a lot of subVIs but I dont think that they are essantial for this subject. After I opened MAX and run self-test command, the vi can see the device otherwise it only sees simulated ones. I will look for state machine structure. Thank you.

Egemen
0 Kudos
Message 3 of 5
(2,640 Views)

I am trying to reserve my compact daq 9188 to acquire signal by use of DAQmx Reserve Network Device.vi but I was not able to succed it. How could I do that? Whenever I opened the CDaq I have to open MAX and reserve the device and self test to work with it 😞 Please help me...

Egemen
0 Kudos
Message 4 of 5
(2,567 Views)

Hi Egemen,

 

Try connecting the error wire between the DAQmx Reserve Network Device VI and the DAQmx Create Virtual Channel VI. This will force the reservation to occur before DAQmx tries to create the channel. Otherwise, there is nothing dictating which function is called first.

 

If this doesn't work please provide additional information as to what is not working (i.e. error codes, screenshots of the error, etc.)

 

Hopefully this helps,

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,533 Views)