Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Serial Port base address (PXI-8420)

Solved!
Go to solution

I have an application that requires control a serial port at low level.

I need to retrieve (pragmatically) the address for the COMX, that typically is 0xXXXX.

The card is PXI-8420, 2 ports RS232.

 

Thanks,

German.

0 Kudos
Message 1 of 5
(4,187 Views)

German,

What specific things did you need to do with the card? This example program might help you out:

http://zone.ni.com/devzone/cda/epd/p/id/1760

 

-Christina

0 Kudos
Message 2 of 5
(4,102 Views)

This works for the BIOS ports but not for the PXI bus.

German.

0 Kudos
Message 3 of 5
(4,073 Views)
Solution
Accepted by Gandara

If you're using Windows, you can find this information in the device manager by looking at the resource tab in the property sheet for the device.  While this is not guaranteed to be the same from boot to boot, it will be in practice as long as you don't add or remove any hardware, change the topological arrangement of the hardware (by switching slots things are in or the arrangement of hookups in a MXI system), upgrade/downgrade the BIOS, or apply a really unusual Windows patch. 

 

If you MUST have the information programmatically (in case it changes), it can be obtained by calling the method CM_Get_Next_Res_Des (documented in the Windows Driver Kit docs - Google for it) on the device.  Making the sequence of calls to find your device and get all the parameters to pass into this function is impressively hairy, but it is fairly well documented if you have the time to comb through it. 

 

If you're using LabVIEW RT, then unfortunately I don't believe there is an API that exposes this information. 

0 Kudos
Message 4 of 5
(4,049 Views)

To add to what jonnycodesalot said, in the device manager you will probably have three resource ranges, one which is memory and two that are I/O. For a PXI-8420 board, the two I/O ranges correspond to the address of each port.

 

-Jaon S.

0 Kudos
Message 5 of 5
(4,042 Views)