VVS Example


The following example sets up the VVS (variable voltage source).

Note:  In the following example:

"-p" indicates a user prompt.

"#"  indicates a comment

This example can be copied into a text editor, saved as a *.txt file, and run using the free Keysight Instrument Console program. Learn more.

The following example focuses on reliable switching (On and Off) of the VVS.  The key is to make sure that the query reflects the current condition.  This is important because the query result is NOT always updated.

The following is psuedo code as the Instrument Console has limited programming capability.

#This section ensures that the VVS is indeed ON after being tripped.

# Send VVS query

SYST:VVS?

# If "TRIPPED" is returned, then disable VVS

SYST:VVS:ENAB 0

# Wait 50 ms, then enable.

SYST:VVS:ENAB 1

# wait 50 ms, then repeat query.

SYST:VVS?

# If ON, then finished. Otherwise, send ENABle again, and then another query.

 

#This section ensures that the VVS is indeed OFF.

# Send VVS query

SYST:VVS?

# If "TRIPPED" is returned, then disable VVS

# If OFF, then finished. Otherwise...

SYST:VVS:ENAB 0

# wait 50 ms, then repeat query.

SYST:VVS?

# wait 50 ms, then repeat query.

# If OFF, then finished. Otherwise, send ENABle 1, then ENABle 0, and then another query.

SYST:VVS:ENAB 1

# Wait 50 ms.

SYST:VVS:ENAB 0

# wait 50 ms, then repeat query.

SYST:VVS?