LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using PXI DIO

I need to use PXI DIO under CVI. I see that most of the DAQ functions take
BoardNo as the first parameter. Since BoardNo will depend on which slot the
DIO module is installed, I should make that configurable through the front
panel, isn't it?

In addition, I can make define a Virtual Channel using the
Measurement&Automation Explorer. How do I use that virtual channel while
making calls to DAQ library?


vishi
0 Kudos
Message 1 of 3
(2,696 Views)
Vishi,

The device number for any NI data acquisition boards is not dependent on the slot position. If you have an empty computer and install a board, it will be assigned device number 1. Any subsequent boards will have device numbers 2, 3 and so on. Removing boards from the system may cause the device numbers to be reallocated - while developing your application you can always check in MAX to confirm what the device numbers are - you can also manually force a particular board to use a particular device number in MAX rather than use the automatically generated number.

There is a DAQ function that you can call which will return the actual type/model of DAQ board installed (Get DAQ Device Info) - if you call this in a loop and work through all possible device
numbers (1-16 for NI-DAQ < 6.9 and 1-64 for NI-DAQ>6.9) you should be able to automatically identify which device number points to your DIO board - provided there is not more than one installed in the PXI chassis. The NI-DAQ Function Reference Manual has more information on Get DAQ Device Info and a list of codes representing the various NI data acquisition boards. As you suggested, an alternative would be to prompt the user for the device number.

As far as using virtual channels is concerned, most of the CVI DAQ functions found in the Easy I/O library will allow the use of virtual channels. The easiest way to find out whether or not a particular function supports virtual channels is to right click on the parameter box within the function panel window. This will bring up specific help for the channel parameter and should indicate the format/syntax expected by this parameter (including whether or not it supports virtual channels).

Jeremy
0 Kudos
Message 2 of 3
(2,696 Views)
Thanks.

vishi

"JeremyB" wrote in message
news:506500000005000000B2BE0000-1031838699000@exchange.ni.com...
> Vishi,
>
> The device number for any NI data acquisition boards is not dependent
> on the slot position. If you have an empty computer and install a
> board, it will be assigned device number 1. Any subsequent boards
> will have device numbers 2, 3 and so on. Removing boards from the
> system may cause the device numbers to be reallocated - while
> developing your application you can always check in MAX to confirm
> what the device numbers are - you can also manually force a particular
> board to use a particular device number in MAX rather than use the
> automatically generated number.
>
> There is a DAQ function that you can call w
hich will return the actual
> type/model of DAQ board installed (Get DAQ Device Info) - if you call
> this in a loop and work through all possible device numbers (1-16 for
> NI-DAQ < 6.9 and 1-64 for NI-DAQ>6.9) you should be able to
> automatically identify which device number points to your DIO board -
> provided there is not more than one installed in the PXI chassis. The
> NI-DAQ Function Reference Manual has more information on Get DAQ
> Device Info and a list of codes representing the various NI data
> acquisition boards. As you suggested, an alternative would be to
> prompt the user for the device number.
>
> As far as using virtual channels is concerned, most of the CVI DAQ
> functions found in the Easy I/O library will allow the use of virtual
> channels. The easiest way to find out whether or not a particular
> function supports virtual channels is to right click on the parameter
> box within the function panel window. This will bring up specific
> help for the channel pa
rameter and should indicate the format/syntax
> expected by this parameter (including whether or not it supports
> virtual channels).
>
> Jeremy
0 Kudos
Message 3 of 3
(2,696 Views)