LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SCPI format questions

Solved!
Go to solution

Hi There

Im working with SCPI but am having some problem clarifying a few points from the IEEE 488.2 and SCPI 99 documents, I hope someone here may have the knowledge to help.

My questions mainly involve the seperators of message unit and command headers

 

1) some documents I have looked at have specified starting all message units with a colon, others seems to show examples where this is not necessary... is there a reason for this? which is correct?

  for example:

 (note the colon between COMMand; and SUBSystem2)

   

:SUBSystem:COMMand;:SUBSystem2:COMMand2;

 or 

:SUBSystem:COMMand;SUBSystem2:COMMand2;

 

2) Some examples in the SCPI 99 document seem to suggest that not using the preceding colon allows subsequent commands of the same command path, or level on the tree, to not require the reiteration of that path for each command, is that correct?

  for example:

     

:SUBSystem1:COMMand1_1;COMMand1_2;

is equal to 

:SUBSystem1:COMMand1_1;:SUBSystem1:COMMand1_2;

??


3) should a common command (those starting with a *) be preceeded by a colon?

 

Many Thanks

0 Kudos
Message 1 of 11
(3,609 Views)
Solution
Accepted by topic author wolf99

@wolf99 wrote:

Hi There

Im working with SCPI but am having some problem clarifying a few points from the IEEE 488.2 and SCPI 99 documents, I hope someone here may have the knowledge to help.

My questions mainly involve the seperators of message unit and command headers

 

1) some documents I have looked at have specified starting all message units with a colon, others seems to show examples where this is not necessary... is there a reason for this? which is correct?

  for example:

 (note the colon between COMMand; and SUBSystem2)

   

:SUBSystem:COMMand;
:
SUBSystem2:COMMand2;

 or 

:SUBSystem:COMMand;SUBSystem2:COMMand2;

 

2) Some examples in the SCPI 99 document seem to suggest that not using the preceding colon allows subsequent commands of the same command path, or level on the tree, to not require the reiteration of that path for each command, is that correct?

  for example:

     

:SUBSystem1:COMMand1_1;COMMand1_2;

is equal to 

:SUBSystem1:COMMand1_1;:SUBSystem1:COMMand1_2;

??


3) should a common command (those starting with a *) be preceeded by a colon?

 

Many Thanks


It has been awhile since I did SCPI, but here's what I'm quickly gathering from some of my old code.  And some instruments are slightly different, so double check with the instrument before diving in head first.

 

1 & 2.  The colon is the start of a command level.  Not having the colon lets the instrument know that the command is at the same hierarhcial level.  So, yes, you are correct with #2.  However, some instruments will take commands without the colon.  Power supplies, for example, will sometimes take VOLT 5.0 to set to 5V even though the voltage setting is several layers deep in the command set.

3. No colon needed for the special commands such as *RST and *IDN?.


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
Message 2 of 11
(3,588 Views)

Many thanks, very helpful 🙂

0 Kudos
Message 3 of 11
(3,583 Views)

This information can also be found in the SCPI spec, also known as SCPI-99. You can find a copy here: http://www.scribd.com/doc/62700781/scpi-99-1

0 Kudos
Message 4 of 11
(3,566 Views)

As I said in my OP, I am reading this document and the IEEE 488.2 document but was not exactly clear on these specific issues. Thankfully crossruls reply fully expolained it to me.

0 Kudos
Message 5 of 11
(3,563 Views)

Sorry, missed that part. For reference, this is on page 6-7 of the spec:

 

Multiple <PROGRAM MESSAGE UNIT> elements may be sent in a <PROGRAM MESSAGE>. The first command is always referenced to the root node. Subsequent commands, however, are referenced to the same tree level as the previous command in a message unit.

Message 6 of 11
(3,555 Views)

Hi,

 

I am having problems executing my configure vi for my power supply. The template provides %.;:VOLT:PROT:STAT %d;:VOLT:PROT %g; 

 

I attempt to input my string off %.;:VOLT:PROT:STAT ON;:VOLT:PROT 48; my vi is still broken. Please advise

 

Damien

0 Kudos
Message 7 of 11
(3,488 Views)

I realized i left out the  Enable input for the format into string. I am still wondering if my command is correct the error vi is accompanied also.

 

Thanks

 

Damien

Download All
0 Kudos
Message 8 of 11
(3,485 Views)

I realized i left out the  Enable input for the format into string. I am still wondering if my command is correct the error vi is accompanied also.

 

Thanks

 

Damien

Download All
0 Kudos
Message 9 of 11
(3,485 Views)

You are not supplying a boolean value to the format string.  So of course it's broken.  Also, if you are not using the double in the format, then you shouldn't wire it in.


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 10 of 11
(3,478 Views)