LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SCPI commands to read/measure and set frequency/power?

Hi i try to make a program so i can read and set frequceny and power at different instruments by using standard SCPI commands. To set the frequecy i use SENS:FREQ:CENT but how do i set the power? I also want to be able to read and display the frequceny and power when i dont know what it is set to, what commands do i use for that? Can't find it anywhere..

0 Kudos
Message 1 of 9
(6,283 Views)
The commands are in the manual. You haven't even provided the make and model.

The syntax for doing a query would also be on the manual. It usually means spending a ? to the base command.
0 Kudos
Message 2 of 9
(6,276 Views)

I have multiple different instruments on a subnet that i want to set/read from and that sholuld not be a problem since i use the standard SCPI commands?

0 Kudos
Message 3 of 9
(6,271 Views)
Each instrument will have a unique set of commands. It sounds to me that you should be using IVI drivers.

You are misunderstanding SCPI. The implementation of the exact commands is vendor dependent. They can vary quite a bit from vendor to vendor though from instrument to instrument from the same vendor, Leeds so. The manual must be referenced.
0 Kudos
Message 4 of 9
(6,268 Views)

I will second what Dennis is saying here.  SCPI is a standard, but each manufacturer will be slightly different.  This is especially true with the "optional" characters.  I had a driver that worked perfectly for an Agilent power supply.  I bought an TDK power supply that we swear was exactly the same as the Agilent, just had the TDK name on it (rumor was that TDK built the Agilent power supply).  My driver didn't work on the TDK.  Turned out that TDK decided to make all of the optional characters in the SCPI standard required.

 

So even though it is a standard, each instrument and vendor will have it nuances that you need to get around.  Either using the IVI drivers or making an OOP solution is your best bet based on the description you have given.  Finding the IVI drivers will be less work than creating a driver that works for all of your equipment.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(6,245 Views)

Hi qweewq11,

 

Each instrument has its own SCPI command, try to get SCPI manual from all your instruments and get all commands you need to.

Tip :

1) Be careful to Open and Close all your instrument 🙂

2) You might use IVI or VISA. (check on NI website, some drivers are already developped)

 

BR,

Vincent

0 Kudos
Message 6 of 9
(6,236 Views)

I use VISA. I know that some commands are for specific instruments but there are some standard commands that work for most intruments. I found out how to set power and frequency but how do i read it?

0 Kudos
Message 7 of 9
(6,215 Views)

According to your datasheet SCPI instrument you should find what's answer look like. Use a VISA read after your VISA Write (with enough bytes to read) to get your informations.

Care about the kind of data your instrument get back to you. It might be numeric, array, string, boolean... Just read the datasheet. And then use common LabVIEW tools to get back your informations to front panel.

 

BR,

Vincent

0 Kudos
Message 8 of 9
(6,212 Views)
Have you even read a single manual for one of the instruments you have?
0 Kudos
Message 9 of 9
(6,203 Views)