background image

CONEX-AGAP Agilis-D 

Controller 

with Strain Gages Feedback 

EDH0293En1020 — 09/12

 Page 

12 

4.0

 

Knowledge from National Instruments 

From LabVIEW 2010 Help

 

Edition Date:

 June 2010 

Part Number:

 371361G-01 

http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/loading_assemblies/

 

4.1

 

Loading .NET Assemblies in LabVIEW 

If you reference a .NET object from the front panel or block diagram of a VI, ensure 
that LabVIEW can load the .NET assembly for that object. The Common Language 
Runtime (CLR) is responsible for locating .NET assemblies that you call. Refer to the 

Microsoft Developer Network (MSDN)

 Web site for more information about how the 

CLR locates assemblies. If the CLR cannot find the assembly, LabVIEW then 
searches for the assembly in the same manner it searches for missing VIs. LabVIEW 
searches for missing VIs in the directories you specify on the 

Paths

 page of the 

Options

 dialog box. If LabVIEW cannot find the .NET assembly for a .NET object 

referenced directly on the front panel or block diagram, LabVIEW generates a load-
time error. If LabVIEW cannot load a dependent assembly needed during run-time, 
LabVIEW generates a run-time error. 

The CLR uses the directory of the running executable as the default search path when 
it loads private .NET assemblies. If you reference a .NET object from a VI that does 
not belong to a LabVIEW project, the CLR considers LabVIEW.exe to be the running 
executable. The CLR therefore searches for private assemblies in the directory in 
which the LabVIEW.exe file is located. 

If you reference a .NET object from a VI 

that does belong to a LabVIEW project, the CLR considers the project to be the 
running executable. The CLR therefore searches for private assemblies in the 
project directory.

 If you reference a .NET assembly from a VI and the assembly does 

not belong to the .NET Framework, National Instruments strongly recommends that 
you store the VI in a project to avoid having to place files in the directory in which the 
LabVIEW.exe file is located. 

If you call a .NET assembly from a VI that does not belong to a project, you 
technically can save the assembly in the same directory as its calling VI. LabVIEW 
searches certain VI directories, including the calling VI directory, for assemblies that 
the CLR cannot load by default. However, calling assemblies stored in this location 
can result in name conflicts and other unexpected .NET behavior. Therefore, National 
Instruments does not recommend that you save assemblies in this location. 

4.2

 

Loading VIs with an Updated Assembly 

Microsoft Visual Studio .NET and other development tools provided in the .NET 
Framework SDK can assign strong names to an assembly. Assemblies with the same 
strong name are expected to be identical. 

When you load a VI with a change in the path of a .NET assembly or with a change in 
the version number or culture string of a strong-named assembly, LabVIEW launches 
a warning dialog box informing you of the change. Once loaded, the VI includes an 
asterisk in its title bar and in the list of open VIs displayed in the Window menu. 
When you save the VI, the asterisk disappears until you make a new change. 

When you load a VI with a change in the time stamp of a .NET assembly, LabVIEW 
does not launch a warning dialog box but does display an asterisk in the title bar of the 
VI. 
Refer to the 

KnowledgeBase

 at ni.com for more information about how to select and 

load specific versions of .NET Assemblies. 

Содержание CONEX - AGAP

Страница 1: ...Agilis D Controller with Strain Gages Feedback LabVIEW Driver Manual in NSTRUCT Environment V2 0 x CONEX AGAP For Motion Think Newport...

Страница 2: ...CONEX AGAP Agilis D Controller with Strain Gages Feedback EDH0293En1020 09 12 Page ii...

Страница 3: ...Driver 3 2 2 Adding Newport Instrument menu to LabVIEW 4 2 3 Menu Contents for Newport Instrument 5 3 0 LabVIEW Example with CONEX AGAP Instrument 7 3 1 LabVIEW Project Creation 7 3 2 First Step Inst...

Страница 4: ...CONEX AGAP Agilis D Controller with Strain Gages Feedback EDH0293En1020 09 12 Page iv...

Страница 5: ...AGAP uses the NET assembly named Newport ConexAGAP CommandInterface DLL The current Newport LabVIEW driver structure has been implemented following the National Instruments instructions on Loading NE...

Страница 6: ...and play If the Newport instrument cannot be detected automatically open the NSTRUCT server to add this instrument to the server To do that refer you to the video How to add an instrument from NSTRUCT...

Страница 7: ...files for each instrument in NSTRUCT Instruments folder From the selected instrument directory a LabVIEW directory contains the LabVIEW driver C Program Files Newport Instrument Manager NSTRUCT Instru...

Страница 8: ...menu must be copied in the directory user lib of your LabVIEW This menu allows you to access to each instrument driver when the User libraries is selected from the LabVIEW functions panel For each in...

Страница 9: ...s list Outputs ConexPSD Reference represents the instrument instance Component ID the identifier of the instrument from the NSTRUCT server error out contains LabVIEW error information LWConexPSD_Disco...

Страница 10: ...e user to refer to the controller s manual to get the description of the command to select Inputs reference is the refnum associated with the instrument object on which you want to invoke a method or...

Страница 11: ...done from this opened project 3 2 First Step Instrument Connection In your LabVIEW project open a new LabVIEW diagram right click to open the functions panel and choose the User libraries menu Next s...

Страница 12: ...refers to the NSTRUCT server This ComponentID must be used with each subsequent function from the instrument instance 3 3 Second Step Invoking an Instrument Command Select the node of method from the...

Страница 13: ...e After the link the node of method header becomes ConexAGP Now a list of functions for the selected instrument is accessible Right click on the node of method and select the menu select a method a li...

Страница 14: ...tions panel and choose the User libraries menu Next go to the Instrument for NSTRUCT menu and select the LWInstrument_Disconnect vi For CONEX AGP the selected VI will be LWConexAGP_Disconnect vi from...

Страница 15: ...CONEX AGAP Agilis D Controller with Strain Gages Feedback 3 5 2 Diagram 3 5 3 Associated front panel Page 11 EDH0293En1020 09 12...

Страница 16: ...ers the project to be the running executable The CLR therefore searches for private assemblies in the project directory If you reference a NET assembly from a VI and the assembly does not belong to th...

Страница 17: ...__________________________________________________________ ____________________________________________________________________________________________________________________ ________________________...

Страница 18: ...Technical Support Tel 800 222 6440 e mail tech newport com Service RMAs Returns Tel 800 222 6440 e mail rma service newport com Europe MICRO CONTROLE Spectra Physics S A S 9 rue du Bois Sauvage 91055...

Отзывы: