HP Drive Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Manuais de software HP Drive. HP Drive User's Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 114
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - Getting Started Guide

Getting Started GuideYour Guide to Getting Started with IVI DriversRevision 1.0

Página 2

10 Chapter 1 • • • •••Starting in the 1970s, programmers used device-dependent commands for computer control of instruments. But lack of standardiza

Página 3 - Contents

100 Chapter 10 • • • •••

Página 4 - Contents

101 • • • ••• Chapter 11• • • • • • Advanced TopicsNow that you’ve seen how to create a short program to perform a measurement in popular programming

Página 5

102 Chapter 11 • • • •••Driver developers also provide wrapper interfaces optimized for specific development environments. The wrapper functions as a

Página 6

Advanced Topics 103 • • • •••Now that we’ve defined the capabilities, we can look at each driver in terms of those it supports. Custom Specific Driver

Página 7

104 Chapter 11 • • • •••capabilities, it is called an IVI-COM custom driver. If the driver includes the class capabilities, it is called an IVI-COM C

Página 8

Advanced Topics 105 • • • ••••The instruments must provide the same behavior, at least with respect to the calling program.Meeting these requirements

Página 9 - Introduction

106 Chapter 11 • • • •••IVI Configuration StoreThe IVI Configuration Store holds information about the IVI drivers installed on your computer and con

Página 10 - Why IVI?

Advanced Topics 107 • • • •••and contains the commands and functions necessary to communicate with the instrument. You can use the software module ent

Página 11 - Introduction

108 Chapter 11 • • • •••In the illustration below, we replace the Vendor X DMM with a Vendor Y DMM. All we need to do is change the LogicalName so th

Página 12 - Why Use an IVI Driver?

Advanced Topics 109 • • • •••IVI-COMThis C# example shows interchangeability using IIviDriver, which references all of IVI’s inherent capabilities.IIv

Página 13 - Shared Components

Introduction 11 • • • •••vendor’s instrument and not need to relearn the commands. Also commands that are common to all drivers, such as Initialize an

Página 14 - Chapter 1

110 Chapter 11 • • • •••a reference to the instance of the driver. This line of code then casts the reference returned to type IIviDriver, from whic

Página 15

Advanced Topics 111 • • • •••The rest of the code follows that used for the examples, but note that it is written to the class-compliant interfaces, n

Página 16

112 Chapter 11 • • • •••IviDMM_ConfigureTrigger (session, IVIDMM_VAL_IMMEDIATE, 0.01);IviDMM_Read (session, 1000, &reading);printf ("%f&quo

Página 17 - Using IVI with Visual C++

Advanced Topics 113 • • • •••2 Several vendors include examples as part of driver installation. For the Agilent 34401A driver (from Agilent Technologi

Página 18 - Chapter 2

114 Chapter 11 • • • •••

Página 19 - Initialize COM

12 Chapter 1 • • • •••IVI drivers conform to and are documented according to the IVI specifications and usually display the standard IVI logo. Note:

Página 20 - Set the Trigger Delay

Introduction 13 • • • •••Flavors of IVI DriversTo support all popular programming languages and development environments, IVI drivers provide either a

Página 21 - Close the Session

14 Chapter 1 • • • •••To see the list of drivers registered with the IVI Foundation, go to http://www.ivifoundation.org.Familiarizing Yourself with

Página 22 - Using IVI-C in Visual C++

Introduction 15 • • • ••••Access an instrument property – We set the trigger delay to 0.01 seconds.•Set the reading timeout – We set the reading timeo

Página 23 - Using IVI with Visual C++

16 Chapter 1 • • • •••

Página 24 - Declare Variables

17 • • • ••• Chapter 2• • • • • • Using IVI with Visual C++The EnvironmentMicrosoft Visual C++ is a software development environment for the C++ progr

Página 25 - Define Error Checking

18 Chapter 2 • • • •••Create a New Project and Import the Driver Type LibrariesTo use an IVI Driver in a Visual C++ program, you must provide the pa

Página 26

Using IVI with Visual C++ 19 • • • •••“$(VXIPNPPATH)VisaCom”Note: These steps need only be done once for each computer you use. All subsequent Visual

Página 28 - Further Information

20 Chapter 2 • • • •••Initialize the InstrumentYou can now write the main constructs for your program. Below the smart pointer statement, type dmm-&

Página 29 - Visual Basic .NET

Using IVI with Visual C++ 21 • • • •••Set the Reading Timeout/Display the ReadingCreate a variable to represent the reading and make a reading with a

Página 30 - Chapter 3

22 Chapter 2 • • • •••exit(1);{IAgilent34401Ptr dmm(__uuidof(Agilent34401));try{dmm->Initialize("GPIB::23",false,true,"simulate=tr

Página 31

Using IVI with Visual C++ 23 • • • •••2 From the Tools menu select Options.3 Expand “Projects and Solutions”, then click on “VC++ Directories”4 Click

Página 32

24 Chapter 2 • • • •••10 Expand “Configuration Properties”11 Expand “Linker”12 Select Input. In the Additional Dependencies field, type“hp34401a.lib

Página 33

Using IVI with Visual C++ 25 • • • •••Define Error Checking1 Next define error checking for your program. First you will define a macro to catch the e

Página 34

26 Chapter 2 • • • •••• Simulate=1 in the Options parameter sets the driver to simulation mode• &session assigns the Instrument Handle to the va

Página 35

Using IVI with Visual C++ 27 • • • •••#endifint main(int argc, _TCHAR* argv[]){ViSession session;ViStatus error = VI_SUCCESS;ViReal64 reading;checkE

Página 36

28 Chapter 2 • • • •••1 From the Start Menu, select Build, and click Build IVI Demo.2 From the Start Menu, select Debug, and run the application.Fur

Página 37 - Using IVI with LabVIEW

29 • • • ••• Chapter 3 Using IVI with Visual C# and • • • • • • Visual Basic .NETThe EnvironmentC# and Visual Basic are object-oriented pro

Página 38 - Chapter 4

Contents 3 • • • •••• • • • • • ContentsChapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Página 39

30 Chapter 3 • • • •••Create a New Project and Reference the DriverTo use an IVI Driver in a Visual C# program, you must first add a reference to it

Página 40 - Take the Reading

Using IVI with Visual C# and Visual Basic 31 • • • •••Create an Instance of the DriverTo allow your program to access the driver without specifying th

Página 41 - Run the Application

32 Chapter 3 • • • •••Initialize the InstrumentYou can now write the main constructs for your program. Create a variable to represent your instrumen

Página 42 - Using IVI-COM

Using IVI with Visual C# and Visual Basic 33 • • • •••Configure the InstrumentTo set the range to 1.5 volts and the resolution to 1 millivolt, typedmm

Página 43 - Using IVI with LabVIEW

34 Chapter 3 • • • •••Your final program should contain the code below:using System;using System.Collections.Generic;using System.Text;using Agilent

Página 44

Using IVI with Visual C# and Visual Basic 35 • • • •••Imports Agilent.Agilent34401.InteropModule Module1Sub Main()Dim dmm As New Agilent34401 d

Página 45

36 Chapter 3 • • • •••

Página 46

37 • • • ••• Chapter 4• • • • • • Using IVI with LabVIEWTMThe EnvironmentNational Instruments LabVIEW is a graphical development environment for signa

Página 47

38 Chapter 4 • • • •••functions, making it easier to use in LabVIEW. If your IVI-C driver does not have a LabVIEW wrapper, you can create one using

Página 48

Using IVI with LabVIEWTM 39 • • • •••Initialize the Instrument1 Select Initialize With Options VI from the hp34401a palette and place it on the Block

Página 49 - Using IVI with LabWindows

4Contents• • • •••Create a New Project and Import the Driver Type Libraries. . . . . . . . . . 22Declare Variables. . . . . . . . . . . . . . . . . .

Página 50

40 Chapter 4 • • • •••Configure the Instrument1 From the Configuration subpalette, select Configure Measurement VI and place it on the Block Diagram

Página 51

Using IVI with LabVIEWTM 41 • • • •••3 Connect resource name and error information from Configure Trigger to Read VI.Display the ReadingCreate an indi

Página 52

42 Chapter 4 • • • •••Setting a Property in an IVI-C DriverProperties such as Trigger Delay can also be set (and read) with a property node. This is

Página 53 - Set the Reading Timeout

Using IVI with LabVIEWTM 43 • • • •••2 From the File menu, select New VI. The Front Panel and Block Diagram appear.3 Right-click in the Block Diagram.

Página 54

44 Chapter 4 • • • •••7 From the Type Library drop-down, select the IVI Agilent 34401A (Agilent Technologies) 1.1 Type Library Version 1.1, and then

Página 55

Using IVI with LabVIEWTM 45 • • • •••4 Back in the Class Browser, under Properties and Methods, scroll down and select Initialize. Click Create and dr

Página 56 - Chapter 5

46 Chapter 4 • • • •••3 Connect the automation refnum and error terminals from Initialize Invoke Node to DCVoltage.Configure Invoke Node.4 In the Cl

Página 57 - Using IVI with MATLAB

Using IVI with LabVIEWTM 47 • • • •••Run the ApplicationYour final VI Block Diagram should contain the elements shown below. To run your VI:1 Switch t

Página 58 - Configure the IVI Driver

48 Chapter 4 • • • •••

Página 59 - Using IVI with MATLAB®

49 • • • ••• Chapter 5• • • • • • Using IVI with LabWindowsTM/CVITMThe EnvironmentNational Instruments LabWindows/CVI is an ANSI-C integrated developm

Página 60 - Chapter 6

Contents 5 • • • •••Create a Project and Access the Driver . . . . . . . . . . . . . . . . . . . . . . . . . 38Initialize the Instrument . . . . . .

Página 61 - Connect to the Instrument

50 Chapter 5 • • • •••Note: Any of the three files listed above will work. Adding one of the HP 34401A instrument driver files loads that instrument

Página 62 - Remove the Driver from Memory

Using IVI with LabWindowsTM/CVITM 51 • • • •••4 Select the Instrument Handle parameter. From the Code Menu, click Declare Variable to set the Instrume

Página 63

52 Chapter 5 • • • •••Configure the Instrument1 From the library tree, select Configuration and click ConfigureMeasurement. The ConfigureMeasurement

Página 64

Using IVI with LabWindowsTM/CVITM 53 • • • •••3 Select the Code menu and click Insert Function Call to insert the function and values into your progra

Página 65 - Chapter 7

54 Chapter 5 • • • ••••session in the Instrument Handle fieldDisplay the Reading1 Select the Reading parameter. 2 Select Code and click Declare Vari

Página 66 - Data Source

Using IVI with LabWindowsTM/CVITM 55 • • • •••printf (“%f”, reading);Note: Including error checking in your programs is good practice. Use the CheckEr

Página 67 - 7 Click Next

56 Chapter 5 • • • •••

Página 68 - Control Source

57 • • • ••• Chapter 6• • • • • • Using IVI with MATLAB®The Development EnvironmentMATLAB from The MathWorks is an interactive software environment fo

Página 69

58 Chapter 6 • • • •••Configure the IVI DriverThe Instrument Control Toolbox provides a graphical Test & Measurement Tool that enables you to in

Página 70 - Close Session

Using IVI with MATLAB® 59 • • • •••Next, you must define your Driver Session to link the Software Module with the Hardware Asset and indicate whether

Página 71 - in the United

6Contents• • • •••Further Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Chapter 6 Using IVI with MATL

Página 72 - Chapter 7

60 Chapter 6 • • • •••10 Select the Logical Names tab. In the Logical Names dialog, select Add and enter the following:•DMM in the Name field•This l

Página 73 - Using IVI with PAWS

Using IVI with MATLAB® 61 • • • •••11 Select File and Save IVI Configuration Store. Saving to the store may take several moments. 12 Close the Test &a

Página 74 - Prepare the PAWS Environment

62 Chapter 6 • • • •••Set the Trigger DelayTo set the trigger delay to 0.01 seconds, typemyDmm.Trigger.Delay = 0.01;Set Reading TimeoutTo take a rea

Página 75 - Using IVI with PAWS

Using IVI with MATLAB® 63 • • • •••Further InformationTo learn more about using MATLAB with IVI instrument drivers, visit: http://www.mathworks.com/iv

Página 76 - Chapter 8

64 Chapter 6 • • • •••

Página 77 - Connect to the IVI-COM Driver

65 • • • ••• Chapter 7• • • • • • Using IVI with Measure Foundry®The EnvironmentMeasure Foundry is a visual software environment for creating test and

Página 78

66 Chapter 7 • • • •••Data SourceThe property pages contain all the information necessary to create an instance of the driver, initialize and config

Página 79

Using IVI with Measure Foundry® 67 • • • ••••Agilent34401 in the device type field•GPIB and 23 in the VISA connect string field•DCV in the measurement

Página 80

68 Chapter 7 • • • •••9 Click Next.10 Configure the trigger delay. In the Properties dialog, enter 0.01 in the trigger delay field and Immediate in

Página 81

Using IVI with Measure Foundry® 69 • • • •••

Página 82 - Build the Project

Contents 7 • • • •••Prepare the PAWS Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Add the WCEM Interface Functions. . . .

Página 83 - Load and Run the Project

70 Chapter 7 • • • •••Data SinkThe property pages contain all the information necessary to display the output.1 In the Foundry window, select Displa

Página 84

Using IVI with Measure Foundry® 71 • • • •••DT Measure Foundry® is a registered trademark of Data Translation® in the United States and/or other count

Página 85 - Chapter 9

72 Chapter 7 • • • •••

Página 86 - Add a Button

73 • • • ••• Chapter 8• • • • • • Using IVI with PAWSThe EnvironmentPAWS Developer's Studio gives you the capability to edit, compile, modify, de

Página 87

74 Chapter 8 • • • •••download and install a driver, you do not need to exit PAWS Studio. Install the driver and continue with your program. Prepare

Página 88

Using IVI with PAWS 75 • • • •••C$ 001110 DECLARE, VARIABLE, 'MEASURED' IS DECIMAL $C$E02000 OUTPUT, C'\LF\ATLAS PROGRAM STA

Página 89

76 Chapter 8 • • • ••• { voltage range -300 v to 300 v continuous; } end; ** DC Voltage Measurement end; *end dmmNote: To und

Página 90 - Chapter 9

Using IVI with PAWS 77 • • • •••9 To add a new *.h file called DMM.h to include the code necessary to reference the driver header files and librairies

Página 91

78 Chapter 8 • • • •••#import "IviDmmTypeLib.dll" named_guids, raw_interfaces_only, raw_native_types no_namespace#import "Agilent3440

Página 92

Using IVI with PAWS 79 • • • •••5 In the doOpen() interface function, insert the following code below the line Please insert your CEM driver code here

Página 93 - Chapter 10

8Contents• • • •••Set the Trigger Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Set the Reading Timeout . . .

Página 94 - Chapter 10

80 Chapter 8 • • • •••if (FAILED(hr)){Display("\033[30;41m Bad return from get_DCVoltage(&pDMMDCVolt) method\033[m\n"); }hr

Página 95

Using IVI with PAWS 81 • • • •••hr = pDMMData->Initiate();if (FAILED(hr)){Display("\033[30;41m Bad return from Initiate() method\033[m\n"

Página 96

82 Chapter 8 • • • •••}driver.Release();pDMMData.Release();pDMMTrig.Release();pDMMDCVolt.Release();Note: The function doUnload gets called only once

Página 97

Using IVI with PAWS 83 • • • •••Load and Run the Project1 From the Main Menu, select Build and click on Execute Wrts.Note: The message below may appea

Página 98

84 Chapter 8 • • • •••

Página 99

85 • • • ••• Chapter 9• • • • • • Using IVI with Visual Basic 6.0The EnvironmentVisual Basic 6.0 is a programming environment derived from Basic and d

Página 100 - Chapter 10

86 Chapter 9 • • • •••2 From the Start Menu, select Project, and click References. The References dialog appears.3 Select the IVI Agilent34401 1.1 T

Página 101 - Advanced Topics

Using IVI with Visual Basic 6.0 87 • • • •••Create an Instance of the Driver1 Double-click Test. The Project1 – Form1(Code) screen appears. Note that

Página 102 - Driver Types

88 Chapter 9 • • • •••Configure the InstrumentSet the function to DC Voltage, range to 1.5 volts, and resolution to 1 millivolt.1 Type dmm.Function

Página 103 - Advanced Topics

Using IVI with Visual Basic 6.0 89 • • • •••Set the Trigger DelaySet the trigger delay to 0.01 seconds.Type: dmm.Trigger.Delay = 0.01Display the Readi

Página 104 - Chapter 11

9 • • • ••• Chapter 1• • • • • • IntroductionPurpose Welcome to IVI Getting Started Guide. This guide introduces key concepts about IVI drivers and sh

Página 105

90 Chapter 9 • • • •••TipsThe Agilent 34401 driver conforms to the IviDmm class, so you can easily write your program to use the class-compliant int

Página 106 - IVI Configuration Store

Using IVI with Visual Basic 6.0 91 • • • •••Further InformationLearn more about Visual Basic at http://msdn.microsoft.com/library/default.asp?url=/lib

Página 107

92 Chapter 9 • • • •••

Página 108

93 • • • ••• Chapter 10• • • • • • Using IVI with Agilent VEE ProThe Development EnvironmentAgilent Visual Engineering Environment Pro is a graphical

Página 109

94 Chapter 10 • • • •••3 Click Add under instrument in the list at the right to add a simulated instrument. The Instrument Properties dialog box ap

Página 110 - Chapter 11

Using IVI with Agilent VEE Pro 95 • • • •••7 Click the IVI-COM Driver tab. Select Agilent 34401 from the drop-down list.Note: The VISA address that yo

Página 111

96 Chapter 10 • • • •••3 Double-click <Double-Click to Add Operation> in the To/From myDMM object. The Select an Operation dialog box appears.

Página 112

Using IVI with Agilent VEE Pro 97 • • • •••3 In the Edit Initialize dialog box, GPIB0::23::INSTR has already been entered in the ResourceName field. E

Página 113

98 Chapter 10 • • • •••Close the SessionNow that you have completed all of the driver operations, you should close the driver session to free resour

Página 114

Using IVI with Agilent VEE Pro 99 • • • •••Further InformationLearn more about VEE Pro at www.agilent.com/find/vee.

Comentários a estes Manuais

Sem comentários