PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Standalone program

Solved!
Go to solution
My goal is to create a standalone program use a PXI-6652 and a PXI-4461 in aPXI-1056 with C++.  I was looking at the DAQmxSelfCal function in the NI-DAQ™mx C Reference Help, and it needs the device name.  How do a name the device in a C++ program not using MAX?  What other things might I have to set up since I'm not using MAX?
0 Kudos
Message 1 of 11
(4,927 Views)

It looks like in the C reference help it is possible to get the device names for all of the devices on the machine.  Please see attached scren shots of the function calls referenced in the DAQmx Creference help.

 

Hope this helps. 

Charley Dahan

Global Account Manager
Download All
0 Kudos
Message 2 of 11
(4,915 Views)
Using the device name can I then determine the device type and where it is in the PXI cage?
0 Kudos
Message 3 of 11
(4,908 Views)
Solution
Accepted by Eagle01

It is possible to get the chassis slot by using the function described in the attached screenshot of the DAQmx C reference help entitled :PXI slot number

 

It is also possible to get the device type (Product type - PXI 4070) with the device name.  This is shown in the two screenshots entitled Product Type. 

 

Check out the  "List of Device Properties" help topic, this should illustrate the way to accomplish most of the task you need.

Charley Dahan

Global Account Manager
0 Kudos
Message 4 of 11
(4,893 Views)
Thanks that gives me the device type and the slot number for the PXI-4461(s) in the cage,  but it does not give me the PXI-6652 in the cage.  How do I programmically find the PXI-6652 in the PXI cage?  Also is there a way to determine the PXI cage programmically?
0 Kudos
Message 5 of 11
(4,767 Views)

Hey Eagle01,

 

The following function should give you the PXI Chassis Number:

 

DAQmxGetDevPXIChassisNum 

 

With the slot number of the device you should be able to determine exactly the location of 6652 in the chassis. 

 

Check out the screen shot I believe this is what you are looking for.

Charley Dahan

Global Account Manager
0 Kudos
Message 6 of 11
(4,758 Views)
The information that I'm looking for is the PXI-Cage Number. For example one of the cages I could be using is the PXI-1056.  I need to be able to cheek that this is the cage connected and not a different cage.  I'm not sure how a can determine the presence of the 6652 in a specific slot. Since I don't know the device identifier.
0 Kudos
Message 7 of 11
(4,744 Views)

So unfortunately DAQmx does not provide a way to access the model name of the chassis directly however after researching this issue it is possible to access the Model name using the Visa library.  WQhat you would do is the following:

 

PXI chass Resource Name  which can be found in MAX--> PXI0::1::Backplane

 

Class Constructor -->  PXIsession ('Visa Resource name of PXI chassis')

 

Use property --> ModelName  to get themodel name of the chassis.

 

Please see the attached screenshots taken from the VISA help file under Start >> Program Files>> National Instruments >> Visa>> Documentation >> .Net fremework help

 

I'm fairly certain that this is the right way to go about it.  I was able to replicate this in labview and was able to get the device name from chassis directly.  Please note however that the help file does make point to say that you should only use this property for display puposes and not programming as this value may change. 

 

I hope this helps

Charley Dahan

Global Account Manager
0 Kudos
Message 8 of 11
(4,722 Views)
I  am unablue to get this working correctly can you show me an example in C++?  Just using API calls and not using Max.
0 Kudos
Message 9 of 11
(4,645 Views)

I'm using Ni-Visa and i'm trying to get the model number using:viGetAttribute (InstrHandle, VI_ATTR_MODEL_NAME, &cModelName);

 

This function returns a bad pointer for  cModelName.  How do I get this to work?

0 Kudos
Message 10 of 11
(4,618 Views)