FTB-2 и FTB-2 Pro. Руководство пользователя - часть 19

 

  Главная      Учебники - Разные     FTB-2 и FTB-2 Pro. Руководство пользователя

 

поиск по сайту            правообладателям  

 

 

 

 

 

 

 

 

содержание      ..     17      18      19      20     ..

 

 

FTB-2 и FTB-2 Pro. Руководство пользователя - часть 19

 

 

Using Your Unit and Modules in an Automated Test Environment
Standard Status Data Structure
FTB-2 and FTB-2 Pro
279
Using Your Unit and Modules in an Automated Test Environment
SCPI Command Structure
SCPI Command Structure
The information presented in this section provides an overview of SCPI
programming. If you need detailed information, refer to:
The International Institute of Electrical and Electronics Engineers. IEEE
Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols and
Common Commands For Use with ANSI/IEEE Std. 488.1-1987. New
York, 1992.
Standard Commands for Programmable Instruments (SCPI). Volume
1: Syntax and Style. Vers. 1999.0 May, U.S.A, 1999.
The provided commands follow the guidelines determined by the Standard
Commands for Programmable Instruments (SCPI) consortium. A program
message consists of one or more commands (and/or queries) with their
appropriate parameters.
For example, a program message could contain a command used to
activate or deactivate a source. The corresponding command syntax
would be:
Mandatory
Optional keyword
keywords
(in square brackets)
SOUR:POW[:STAT]<wsp><Boolean Program Data>
Keyword
Required
Parameter
separators
space
When sending a message containing the previous command, you would
actually type: SOUR:POW ON.
280
FTB-2 and FTB-2 Pro
Using Your Unit and Modules in an Automated Test Environment
SCPI Command Structure
The following table shows elements that are commonly used in the
commands or queries syntax.
Item
Meaning
[ ]
Enclose optional keywords or parameters.
Do not include square brackets in your program message.
[1..n]
Indicates that the instrument provides multiple capabilities and that you
have to specify which one you want to use. If you omit the value, the
command will take effect on the first capability.
Multiple capabilities can be found at any branch of the command tree
(root, intermediate node or terminal node).
Example: If the command is :SENSe[1..n]:CORRection:COLLect:ZERO
and you want it to take effect on the second SENSe (sensor) capability
of the instrument, you may send this:
:SENSe2:CORRection:COLLect:ZERO.
Do not include square brackets in your program message; simply enter
the number.
<wsp>
Indicates that a space is required (“wsp” stands for “white space”).
Corresponds to ASCII character codes (0 to 9 and 11 to 32, in decimal).
Do not include “<wsp>” in your program message; simply type a space.
<digit>
Element used in the construction of various numeric data types. Can
take any value between 0 and 9 inclusively (corresponds to ASCII
character codes 48 to 57, in decimal).
FTB-2 and FTB-2 Pro
281
Using Your Unit and Modules in an Automated Test Environment
SCPI Command Structure
Item
Meaning
<mnemonic>
Element used in the construction of certain data types and program
messages.
<Upper/lower
case alpha>
<Upper/lower
case alpha>
_
<digit>
In the diagram above,
“<Upper/lower case alpha>” corresponds to ASCII character codes
(65 to 90 and 97 to 122, in decimal).
“_” corresponds to an underscore character (code 95, in decimal).
< >
Text appearing between angled brackets specifies the command
parameter to be sent or the response you will receive from an
instrument.
Do not include angled brackets in your program message.
|
Indicates that one, and only one, value must be selected from the
available choices.
Example: If the list is 0|1, you can only select 0 or 1.
Do not include the pipe character in your program message.
{ }
Indicate that the enclosed parameters can appear 0 to n times when the
command is used.
Do not include braces in your program message.
:
Mandatory to separate keywords. Can be omitted at the beginning of a
program message. For example, you can use either :SYST:ERR or
SYST:ERR.
282
FTB-2 and FTB-2 Pro
Using Your Unit and Modules in an Automated Test Environment
Consulting Data Types
Item
Meaning
;
Mandatory to separate the different commands of a program
message when more than one command is sent at a time. In this
case, it is called <PROGRAM MESSAGE UNIT SEPARATOR>.
Also used to separate responses when multiple queries were sent in
a single program message. In this case, it is called <RESPONSE
MESSAGE UNIT SEPARATOR>.
,
Mandatory to separate parameters in a command or a query. In this
case, it is called <PROGRAM DATA SEPARATOR>.
Also used to separate the various responses from a query. In this
case, it is called <RESPONSE DATA SEPARATOR>.
There are also several conventions regarding command syntax:
Spelling errors will cancel the command or query.
Commands and queries are not case-sensitive. You can type your
program messages using either lower-case or upper-case letters.
The command or query can be written using only the three- or
four-letter shortcuts, only full words, or a combination of both.
The example below shows the long and the short forms of a same
query.
:SYSTem:ERRor?
Long form
Short form (small words
:SYST:ERR?
represented by the capital letters
:syst:err?
of the long form)
Consulting Data Types
If you need information about data types used in EXFO’s documentation,
see the appendix on data types.
FTB-2 and FTB-2 Pro
283
Using Your Unit and Modules in an Automated Test Environment
Writing Remote Control Code
Writing Remote Control Code
Your unit offers many commands permitting complete remote control of all
the supported FTB components. These commands adhere to the SCPI
standard.
You can find all the commands and queries supported by your unit in the
IEEE 488.2 and Specific Commands appendix. For information on
commands specific to particular instruments, refer to the instrument’s user
guide.
284
FTB-2 and FTB-2 Pro
Using Your Unit and Modules in an Automated Test Environment
Writing Remote Control Code
When you write code, you must follow these rules on message reception
and transmission:
The controller must have sent a complete message to the instrument
(including the message terminator) before retrieving a response.
The controller must retrieve all the responses from previous queries
(including the response terminator) before sending a new message to
an instrument.
The controller must not try to retrieve a response from an instrument if
the corresponding query has not been previously sent to the
instrument.
You must pay special attention to queries that return an indefinite ASCII
response. To avoid any confusion, the IEEE 488.2 standard requires that
this data type be immediately followed by a response termination
character. For this reason, when working with compound queries, you
must ensure that a query sending an indefinite ASCII response is the
last query of the series.
Be careful when sending program messages containing multiple
queries that return large amounts of data. Since the controller can only
retrieve data when the instrument has finished processing the queries,
it could result in problems ranging from a saturation of the output
queue to the complete blocking of the whole system.
FTB-2 and FTB-2 Pro
285
Using Your Unit and Modules in an Automated Test Environment
Error Message Format
Error Message Format
System and device-specific errors are managed by your unit. The generic
format for error messages is illustrated in the following figure.
<Device
<Error
<Error
dependent
number>
,
"
description>
;
"
information>
As shown in the above figure, the message contains three parts:
error number
error description
device-dependent information
Error messages ending in a negative number are SCPI-based errors.
For a complete list of possible errors, see the appendix on SCPI-based
errors.
286
FTB-2 and FTB-2 Pro
Using Your Unit and Modules in an Automated Test Environment
Monitoring Remote Commands
Monitoring Remote Commands
ToolBox X allows you to monitor remote commands sent to your units, if
desired.
To monitor remote commands:
1. From the main window, tap the Test Tools button.
2. Depending on which type of communication protocol you are using,
select IC Monitor or SCPI Telnet Monitor.
FTB-2 and FTB-2 Pro
287
Using Your Unit and Modules in an Automated Test Environment
Monitoring Remote Commands
3. Do one of the following:
If monitoring using ActiveX or RS-232, click Connect to IC.
Connection
information
Incoming
commands
You are automatically connected to the monitoring system. The
Disconnect from IC button becomes available for you when you
are ready to disconnect.
Once connected, your current connection information will appear
in the upper part of the window, and the commands will appear as
a list in the lower part of the window.
With the History parameter, you determine how many commands
you want to keep in the list. You can change the number by using
the arrow buttons on each side of the list.
To clear the history, click
To view the list in any word processor, click
to copy it to the
clipboard, and then paste it in your document. You can use any
program, as the list is copied in text format.
To exit the monitoring utility, click Exit.
For more information, see the section on using your unit in an
automated test environment.
288
FTB-2 and FTB-2 Pro
Using Your Unit and Modules in an Automated Test Environment
Monitoring Remote Commands
If monitoring using TCP/IP, which provides sending SCPI
commands over TCP/IP through Telnet from the EXFO Instrument
Control, you are automatically connected to the monitoring
system.
Note: Port 5024 is designated for sending SCPI commands in the Telnet protocol.
Connection tabs
List of connections
Once connected, your current connection information will appear
in the All Connections View tab, and the commands will appear as
a list in the lower part of the window.
The Disconnect button becomes available for you to click when
you are ready to disconnect.
Connection information is also displayed in a separate tab,
identified by its IP address, from where you can monitor the
commands and other actions sent through TCP/IP over Telnet, as
well as the results.
FTB-2 and FTB-2 Pro
289
Using Your Unit and Modules in an Automated Test Environment
Monitoring Remote Commands
With the History parameter, you determine how many commands
you want to keep in the list. You can increase or decrease the
number by using the arrow buttons on each side of the list.
To clear the history, click Clear.
To view the list in any word processor, click Copy to copy it to the
clipboard, and then paste it in your document. You can use any
program, as the list is copied in text format.
To save the list as a file, click Save.
To exit the monitoring utility, click Exit.
For more information, refer to the user documentation about
communication through TCP/IP over Telnet.
290
FTB-2 and FTB-2 Pro
13
Техническое обслуживание
Для обеспечения продолжительной безотказной работы необходимо
соблюдать перечисленные ниже требования:
Перед началом работы всегда обследуйте волоконно-оптические
разъемы и, при необходимости, очищайте их.
Не допускайте попадания пыли в устройство.
Очищайте корпус устройства и переднюю панель тряпкой, слегка
смоченной водой.
Храните устройство при комнатной температуре в чистом и сухом
месте. Не допускайте попадания прямых солнечных лучей на
устройство.
Не подвергайте устройство воздействию повышенной влажности и
значительным колебаниям температуры.
Берегите устройство от ударов и сотрясений.
В случае попадания жидкости на поверхность или внутрь
устройства немедленно выключите питание, отключите устройство
от всех внешних источников питания, извлеките аккумуляторы и
дайте устройству полностью высохнуть.
ВНИМАНИЕ!
Использование средств управления, настроек и процедур, в
частности, эксплуатации и технического обслуживания,
отличных от указанных в данной инструкции, может привести к
возникновению опасного радиоактивного излучения, а также к
ослабеванию уровня защиты, который обеспечивается для
данного устройства.
291
Техническое обслуживание
Очистка портов детектора
Очистка портов детектора
Регулярная очистка детекторов позволяет сохранять точность
измерений.
ВАЖНО!
Всегда накрывайте детекторы защитными колпачками, если
устройство не используется.
Для очистки портов детекторов выполните следующие действия:
1. Снимите защитный колпачок и адаптер (FOA) с детектора.
2. Если на детекторе имеется пыль, удалите ее струей сжатого
воздуха.
3. Не касаясь мягкого кончика чистящей палочки, смочите ее одной
каплей изопропилового спирта.
ВАЖНО!
Если использовать чрезмерное количество спирта, могут
остаться следы. Не используйте бутылки, из которых сразу же
выливается слишком много спирта.
4. Немного надавите (так, чтобы не повредить окно детектора) и
легкими движениями вращайте чистящую палочку на окне
детектора.
5. Повторите шаг 4, используя сухую чистящую палочку или струю
сжатого воздуха.
6. Выбрасывайте чистящие палочки после однократного
использования.
292
Техническое обслуживание
Очистка разъемов типа VFL
Очистка разъемов типа VFL
Разъемы VFL зафиксированы на вашем устройстве и могут быть
очищены с помощью механического очистителя.
ВНИМАНИЕ!
Осмотр поверхности разъема с помощью оптоволоконного
микроскопа ПРИ ВКЛЮЧЕННОМ УСТРОЙСТВЕ ПРИВЕДЕТ к
долговременной травме глаза.
Для очистки разъема с помощью механического очистителя
выполните следующее:
1. Введите очиститель в оптический адаптер и вдавите внешнюю
оболочку в очиститель.
Примечание:Очиститель издаст щелчок в качестве сигнала о завершении очистки.
2. Проверьте поверхность разъема с помощью портативного
микроскопа для оптоволокна (например, EXFO FOMS) или зонда
для осмотра оптоволокна (например, EXFO FIP).
293
Техническое обслуживание
Очистка сенсорного экрана
Очистка сенсорного экрана
Для очистки сенсорного экрана используйте мягкую неабразивную
ткань, например используемую для очистки очков для чтения,
смоченную в воде.
ПРЕДОСТЕРЕЖЕНИЕ!
Использование любых отличных от воды веществ может
повредить специальное покрытие устройства, оснащенного
специальным экраном для наружного использования (опция
S2).
EXFO рекомендует использовать прилагающуюся защитную пленку,
когда никто не работает с устройством.
294

 

 

 

 

 

 

 

содержание      ..     17      18      19      20     ..