![Ceyear 1465 Series Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/ceyear/1465-series/1465-series_programming-manual_2584913022.webp)
2
Remote Control
2.1 Remote control basis
15
2.1.4
Command sequence and synchronization
IEEE488.2 defines the difference between overlapped commands and sequential commands:
Sequential commands are sequences of commands that are executed continuously. Usually,
each command is executed fast.
Overlapped commands indicate that the previous command is not executed automatically
before the next command is executed. Normally overlapped commands take longer to process
and allow the program to process other events synchronously.
Even if multiple commands are set in a command line, they are not necessarily executed in the order in
which they are received. In order to ensure that the commands are executed in a certain order, each
command must be sent as a separate command line.
Example: Command line contains set and query commands
If multiple commands in a command line contain query commands, the query result is unpredictable.
The following command returns a fixed value:
:FREQ:STAR 1GHZ;STOP 100;:FREQ:STAR?
Return value: 1000000000 (1GHz)
The following command returns an unfixed value:
:FREQ:STAR 1GHz;STAR?;STOP 1000000
The returned result may be the current frequency start value, because the host program will delay
execution of the command. If the host program executes the command after receiving it, the returned
value may also be 1 GHz.
This signal generator has not supported the overlapped command yet.
Set command and query command are sent separately
General rules: In order to ensure the correctness of the returned result from the query command, the
setting command and the query command shall be sent in different program control messages.
2.1.4.1 Preventing overlapping execution of the command
In order to prevent the overlapped execution of commands, multiple threads or commands: *OPC,
*OPC? or *WAI can be used. These three commands can be executed only after the hardware is set.
During programming, the computer can be forced to wait for some time to synchronize certain events.
The details are separately described below:
Controller program uses multiple threads
Multi threads are used to wait for completion of the command and achieve synchronization of
GUI and program control, that is, a single thread waits for completion of *OPC?, without
impeding the execution of the GUI or remote control thread.
The usage of the three commands in synchronous execution is shown in the table
below:
NOTE
Содержание 1465 Series
Страница 1: ...1465 series Signal Generator Programming Manual...
Страница 2: ......
Страница 5: ......
Страница 39: ......
Страница 127: ......