LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

dll cvi to labview (visa session)

hi ,
 
 
 i want to open a visa session under Labview then give the visa session reference to my DLL cvi where i use the controls ViWrite and ViRead.
To do that i have in the input of my DLL  the "visa ressource name", but this visa reference name translate in Visession in CVI doesn't succeed in my DLLs (in ViWrite and ViRead).
 
What is my mistake or can you help me to  resolve my problem
 
TheGame
0 Kudos
Message 1 of 3
(3,172 Views)
If you pass the VISA resource name to your DLL as in string format, your DLL must separately open an alternative VISA session to acquire the new ViSession value.  In the DLL, you can then access viWrite/viRead with the acquired ViSession, then close it when you have finished to use.
 
Another way is directly pass the ViSession that is already acquired in your LabVIEW app to your DLL.  You can use the same ViSession without having to open/close alternative VISA session.
0 Kudos
Message 2 of 3
(3,163 Views)
hi,
 
i have already tryied your second solution, but it doesn't work.
I have as errors message,

The given session or object reference is invalid. in status of my viwrite et viread.

 

Can you help me

TheGAme

0 Kudos
Message 3 of 3
(3,158 Views)