OA1 User Manual
19
M-OA1-001-01
7
PROGRAMMING GUIDE
General Information
The OA1 follows the
SCPI
(Standard Commands for Programmable Instruments) message-based
programming standard. It conforms to the
USBTMC
(USB Test and Measurement) standard.
The TCP/IP libraries provided by most operating systems are sufficient. JGR Optics can provide a
communications library upon request.
Note: any
VISA
implementation can control the OA1 via TCP/IP.
Step-by-step Guide
This section will provide a step-by-step programming guide in a
.NET
programming environment such as
C#
or
VB.NET
. Steps 3-
5 below can be skipped if using JGR’s
CommunicationsLib.dll
(available upon
request).
1.
Install
VISA
drivers on the development system
2.
Connect the OA1 via its USB B port to the development system
3.
Add a reference to
Ivi.Visa.dll
in your project:
C:\Program Files (x86)\IVI Foundation\VISA\Microsoft.NET\Framework32\v2.0.50727\VISA.NET Shared
Components 5.11.0\Ivi.Visa.dll
4.
Use the
IVI.Visa.GlobalResourceManager
to find all USB instruments on your system:
Public
Overrides
Function
GetAllAddresses
()
As
String
()
Try
Dim
nameList
As
New
List
(
Of
String
)
nameList
=
GlobalResourceManager.Find
(
“USB
?*
INSTR”
)
Return
nameList.ToArray
()
Catch
ex
As
Exception
Return
Nothing
End
Try
End
Function
5.
Open an
IMessageBasedSession
to the desired device using an address from the
nameList
in the
previous step:
Private
visa
As
IMessageBasedSession
Содержание OA1
Страница 1: ...OA1 Optical Attenuator User Manual ...