Fluke PM6685R Deleting Macros, Enabling and Disabling Macros, How to Execute a Macro, Example

Models: PM6685 PM6685R PM6681 PM6681R

1 276
Download 276 pages 1.51 Kb
Page 34
Image 34
￿Macros with Arguments

Introduction to SCPI

￿Macros with Arguments

You can pass arguments (variable param- eters) with the macro. Insert a dollar sign ($) followed by a single digit in the range 1 to 9 where you want to insert the pa- rameter. See the example below.

When a macro with defined arguments is used, the first argument sent will replace any occurrence of $1 in the definition; the second argument will replace $2, etc.



This example defines a macro AUTO, which takes two arguments, i.e., auto «ONOFFONCE» ($1) and impedance «501E6» ($2) .


Switches off both auto sensitivity and auto trigger level and sets the input im- pedance to 50Ω.

Deleting Macros

Use the *PMC (purge macro) command to delete all macros defined with the *DMC command. This removes all macro labels and sequences from the

memory. To delete only one macro in the memory, use the :MEMory:DE- Lete:MACRo command.

￿You cannot overwrite a macro; you must delete it before you can use the same name for a new macro.

Enabling and Disabling Macros

￿*EMC Enable Macro Command

When you want to execute a CNT-8X command or query with the same name as a defined macro, you need to disable macro execution. Disabling macros does not delete stored macros; it just hides them from execution.

Disabling: *EMC￿0 disables all macros.

Enabling: *EMC￿1

￿*EMC? Enable Macro Query

Use this query to determine if macros are enabled.


1macros are enabled

0macros are disabled

How to Execute a Macro

Macros are disabled after *RST, so to be sure, start by enabling macros with *EMC 1. Now macros can be executed by using the macro labels as commands.




Now sending the command


will switch on the limit monitoring to alarm between the limits 1 MHz and 1.1 MHz.

3-14 Macros

Page 34
Image 34
Fluke PM6685R manual Deleting Macros, Enabling and Disabling Macros, How to Execute a Macro, Macros with Arguments, Example