LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Information from ni5660 for low-level subVI's

Solved!
Go to solution

Quick Explanation of Problem:  I need to create several VI's that simply return a current setting of the PXI-5660 (ex:  Center Frequency, Span, etc...) while the only inputs are a "VISA In" and an "Error In."

 

Detailed Explanation of Problem:  I need to create multiple VI's that either "Set" or "Get" properties of the PXI-5660 (ex:  Set Center Frequency, Get Center Frequency, etc...).  Every VI needs to have a VISA In/Out and Error In/Out, but the only other input/output present should be the property being set/called.  Global variables are off-limits.

 

One of the biggest problems for me is that the ni5660 drivers don't contain a property node.  I've managed to (seemingly) set a few of the properties by only feeding a single input to the "ni5660 Configure For Spectrum" icon, but the only tool that seems to be able to output any information is the "MT Get Attributes" icon.  The "MT Get Attributes" output does not contain several of the properties that I need to output though. 

 

I attempted to use the "MT Get Attributes" icon linked to an "unbundle by name" that is set to "receiver.handles.niScope handle" that feeds the reference to an niScope property node, hoping that I would be able to get information about the 5660 through the niScope (it seems like the ni5660 software uses the niScope software on a lower level, correct me if I'm wrong).  This finished VI, when put in line with the "ni5660 Initialize.vi" and "ni5660 Close.vi," returned error (-1074135028) with the explanation "Attribute ID not recognized."  (The error occurred at the property node in the "Get Center Frequency" subVI)

 

The desired result is to make the PXI chassis act similar to a HP8563E Spectrum Analyzer.  With this in mind, the list of attributes that I will ultimately need to set and get (in separate VI's) are as follows:  Center Frequency, Span, Window, Number of Points, Resolution Bandwidth, Reference Level, Attenuation, and Sweep Time.

 

I apologize for my (most likely) simple, yet drawn-out question (I only started programming in LabVIEW about 2 weeks ago).  If anyone would be able to direct me in how to seemingly pull PXI-5660 current property settings from thin air, I would be very grateful.  If more information or details are needed, please do not hesitate to ask.

 

Thank You

0 Kudos
Message 1 of 6
(3,427 Views)

There are no 'property' values that you need to write to or read from. I suspect that you are coming from a different programming environment. You just have to use the provided VIs and wire to the inputs and outputs. Look at the examples (Help>find Examples). i don't have the instrument but I believe they can be found under Hardware Input and Output>Modular Instruments.

 

Below is one of the functions on the Instrument I/O>Instrument Driver>NI-RFSA palette. It sets the resolution bandwidth. You don't need to do anything else.

 

Set Resolution Bandwidth.PNG

 

 

Message Edited by Dennis Knutson on 06-12-2009 12:13 PM
Message 2 of 6
(3,422 Views)

I appreciate the help.  What programming experience I do have is in Java, so I have spent a lot of time in the examples files lately.  Unfortunately, I think I wasn't completely clear in my original post. 

 

I think the reasoning for the mass of subVI's that need to be created is so that there are already programs that perform simple functions (with the bounds and limitations of our particular piece of hardware, the PXI chassis) when it comes time to create higher-order programs that link them all together.

 

It's comforting to know that I have been setting data the correct way (as you demonstrated above), but unfortunately I am still at a loss as how to create a VI that "calls" that same property back and outputs it, while using only "VISA In" and "Error In" as inputs. 

0 Kudos
Message 3 of 6
(3,415 Views)
Solution
Accepted by zdunn

zdunn wrote:

 

.... 

 but unfortunately I am still at a loss as how to create a VI that "calls" that same property back and outputs it, while using only "VISA In" and "Error In" as inputs. 


Think about how silly that statement is. You want to create a function where you (for example) want to set the resolution bandwidth and only want to pass as a parameter the instrument name. Have you created the programming language that is able to read minds?

 

You can either use a function where you have to pass a parameter in (or use a function that gets a parameter back) or do nothing at all with the instrument. It's not any more complicated than that.

 

There are tutorials available that will help yu with learning LabVIEW but I think there is some more basic fundamentals to be understood.

 

edit: sorry, I may have misunderstood. to query does not require an input but I don't understand what you want to query. The settings of the instrument are all under programatic control - a program you or someone else writes. Unlike a GPIB instrument, there aren't any '?' commands to read a setting back. It's assumed that you will know how the instrument has been setup in the first place.

Message Edited by Dennis Knutson on 06-12-2009 01:06 PM
Message 4 of 6
(3,412 Views)

Post edit, I think we're on the same page.  The over-arching assignment was modelled after an older-programming style.  Before I admitted defeat and suggested a remodelling of the assignment though, I thought I would check with the forums and see if I wasn't missing something simple.

 

Thanks for the input, I think that'll do it.

0 Kudos
Message 5 of 6
(3,376 Views)

zdunn,

 

It sounds like you have the question pretty well under control, but I just wanted to pass along some other information. We have a forum that is specifically for our RF Equipment. If you have questions specific to RFSA and RFSG just look through the RF Measurement Device Board or post there. Thanks!

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 6 of 6
(3,354 Views)