Before Programming
4-7
IM 760101-11E
4
If a character string contains a double quotation mark
(
"
), the double quotation mark will be replaced by two
concatenated double quotation marks (
""
). This rule
also applies to a single quotation mark within a
character string.
<Character string data> is an arbitrary character string,
therefore this instrument assumes that the remaining
program message units are part of the character string
if no single (
'
) or double quotation mark (
"
) is
encountered. As a result, no error will be detected if a
quotation mark is omitted.
<Filename>
Gives the name of a file. The format is as follows.
Form
Example
{<NRf>|<Character data>|<Character string>}
1 CASE "CASE"
If you input an <NRf> value, the system converts the
value (after rounding to the nearest integer) to the
corresponding 8-character ASCII string. (If you set the
value to
1
, the name becomes
"00000001"
.) Note
that negative values are not allowed.
If you enter a <character data> or <character string>
argument that is longer than eight characters, only the
first eight characters are used.
Response messages always return filenames as
<character string> arguments.
<Block data>
<Block data> is arbitrary 8-bit data. <Block data> is
only used for response messages. Response
messages are expressed in the following form.
Form
Example
#N<N-digit decimal value><Data byte string> #40012ABCDEFGHIJKL
#N
Indicates that the data is <Block data>. “
N
” is an ASCII
character string number (digits) which indicates the
number of data bytes that follow.
<N-digits decimal value>
Indicates the number of bytes of data. (Example:
0012 =
12
bytes)
<Data byte string>
The actual data. (Example:
ABCDEFGHIJKL
)
Data is comprised of 8-bit values (0 to 255). This
means that the ASCII code “
0AH
”, which stands for
“
NL
”, can also be a code used for data. Hence, care
must be taken when programming the controller.
4.5
Synchronization with the
Controller
Overlap Commands and Sequential Commands
There are two kinds of command; overlap commands
and sequential commands. Execution of an overlap
command may start before execution of the previously
sent command is completed.
The
INPut:VOLTage:RANge:ELEMent1
command,
for example, is a sequential command. Assume that
you set a new voltage range value and immediately
request return of the new value, as follows:
:INPut:VOLTage:RANGe;ELEMent1 100V;
ELEMent?<PMT>
In this case, the response always returns the newest
setting (“
100V
”). This is because it always completes
processing of the current sequential command before
moving on to the next command.
In contrast, assume that you begin a file load and then
immediately query the voltage range value:
:FILE:LOAD:SETup "FILE1";:INPut:VOLTage:
RANGe:ELEMent1?
Because “
FILE:LOAD:SETup
” is an overlapped
command, the oscilloscope will advance to the
“
:INPut:VOLTage:RANGe:ELEMent1?
” command
before it finishes the load. The returned voltage range
value will not show the newest setting, but will rather
show the setting in use before the setup was changed.
Obviously, use of overlapped commands may in some
cases produce inappropriate results. Where
necessary, you can avoid such problems as described
below.
Synchronization with an Overlap Command
Using the *WAI command
The
*WAI
command causes the commands which
follow it to wait until an overlap command has been
executed.
Example
:COMMunicate:OPSE #H0040;:FILE:LOAD:
SETup "FILE1";*WAI;:INPut:VOLTage:RANGe:
ELEMent1?<PMT>
The “
COMMunicate:OPSE
” command is used to
designate which commands are to be subject to the
*WAI
command. In the above example, only auto set-
up is designated.
Since a
*WAI
command is executed just before
“
:INPut:VOLTage:RANGe:ELEMent?
”,
“
:INPut:VOLTage:RANGE:ELEMent1?
” will not be
executed until auto set-up has been completed.
4.4 Data/4.5 Synchronization with the Controller
Содержание wt1600
Страница 1: ...Digital Power Meter Communication Interface IM 760101 11E 4th Edition ...
Страница 131: ...7 2 IM 760101 11E 7 2 Sample Program Image ...
Страница 138: ...Sample Program 7 9 IM 760101 11E 7 7 4 Output of Normal Measurement Data ...
Страница 142: ...Sample Program 7 13 IM 760101 11E 7 7 5 Output of Harmonic Measurement Data ...