PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling PXI cards in a VBA program

I have a PXIe-1073 chassis that has various cards in it and would like to make some programs to test them. VBA is my prefered editor for this and I am having trouble seeing the cards. I can see them in NI Max and when I put their address in some example code I use for GPIB communication I get some errors at ioMgr.open(). 

 

Any help would be appriciated. At this point I am just tring to send an IDN and get the response from the cards.

 

 

Dim ioMgr As VisaComLib.ResourceManager
Dim instrument As VisaComLib.FormattedIO488
Dim idn As String
Set ioMgr = New VisaComLib.ResourceManager
Set instrument = New VisaComLib.FormattedIO488
Set instrument.IO = ioMgr.Open("PXI15::0::INSTR")
instrument.WriteString "*IDN?"
idn = instrument.ReadString()
ActiveSheet.Cells(1, 1) = idn

0 Kudos
Message 1 of 4
(1,207 Views)

What exact instrument are you trying to control?

 

NI PXI instruments do not use SCPI command and will not respond to IDN? query

 

For NI PXI instruments, instrument control is through their respective drivers (C DLL).

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(1,193 Views)

I am trying to control a 5652 generator. Is it possible to develope a program in VBA that will communicate with my PXI cards? If so do you have an example I can work off of?

 

Thanks

0 Kudos
Message 3 of 4
(1,186 Views)

I don't think there is an example for VBA, but if you know how to call a C DLL in VBA, you can directly use the RFSG driver dll.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 4
(1,181 Views)