Fluke PM6681R, PM6685R manual Define Macro, Command Reference

Models: PM6685 PM6685R PM6681 PM6681R

1 276
Download 276 pages 1.51 Kb
Page 249
Image 249
Define Macro

PM6680B/81/85

￿DMC

￿<Macro label> , <Program messages>

Define Macro

Allows you to assign a sequence of one or more program message units to a macro label. The sequence is executed when the macro label is received as a command or query. Twenty five macros can be defined at the same time, and each macro can contain an average of 40 characters.

If a macro has the same name as a command, it masks out the real command with the same name when macros are enabled. If macros are disabled, the original command will be executed.

If you define macros when macro execution is disabled, the counter executes the *DMC command fast, but if macros are enabled, the execution time for this com- mand is longer.

Parameters:

<Macro label> = 1 to 12-character macro label. (String data must be surrounded by “ ” or ‘ ‘ as in the example below.)

<Program messages> = the commands to be executed when the macro label is received, both block data and string data formats can be used.

Example 1:

SEND￿ *DMC ‘AMPLITUDE?’,":FUNC ￿ ‘FREQ ￿ 1’;:INP:HYST:AUTO ONCE

￿;:INP:HYST?;:INP:LEV?"

This example defines a macro called amplitude?.

SEND￿ AMPLITUDE?

The macro makes an AUTO ONCE and reads out the hysteresis and trigger level that auto selects. (Macros must be enabled; otherwise, the :AMPLITUDE? query will not execute, see ￿EMC)).

READ￿ +3.46125461E-001;+3.64852399E-001

Auto selects 33% of Vpp as hysteresis, so multiplying the first part of this reading by 3 will give you the signal amplitude (0.346*3=1.04 V in this example). You can

also calculate positive peak voltage: Hysteresis * 3 ￿ Trigger Level and negative 2

peak voltage: Vp Hysteresis * 3 ￿ Trigger Level

2

Example 2:

SEND￿ *DMC ￿ ‘AUTOFILT’,":INP:HYST:AUTO ￿ $1;:INP:FILT ￿ $1 This example defines a macro AUTO which takes one argument, i.e., auto «ONOFFONCE» ($1) .

SEND￿ AUTOFILT ￿ OFF

Turns off both the auto function and the filter.

Complies to standards:

IEEE 488.2 1987.

Command Reference 9-119

Page 249
Image 249
Fluke PM6681R, PM6685R manual Define Macro, Command Reference