LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Tags
This content has not been tagged yet

> Related links

Visit our LabVIEW Wiki Hardware Portal


 
Reply to this topic Start new topic
> Visa Resource Name and VISA session, open automatically visa session
jack9
post Jul 10 2008, 10:43 AM
Post #1


I've come back for more.


Member
Posts: 2
Joined: 10-July 08
Member No.: 11961
Using LabVIEW Since:2008
LV:8.5.1 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


Hi to all,

I'm newbie with Labview 8.5, I'm viewing some example to connect serial port with VISA blocks. I see that these examples use a VISA Resource Name control to define the resource (example selecting COM1) but after they don't use Visa Open block to open a VISA session with the device, but they use directly the sequence "VISA write - VISA read - VISA Close" blocks. Why don't they use VISA open session to open a session with device?

I read in help that VISA Resource Name contains some informations on resource and it maintains VISA session also, instead VISA session is a unique identifier, I think that when I create new Visa Resource name Control, Labview automatically open a session with this resource, so it isn't necessary to use VISA Open block to create the session, isn't it?

best regards


Tags
This content has not been tagged yet
Go to the top of the page
+Quote Post
Ad
post Jul 10 2008, 10:43 AM
Post #















Tags
This content has not been tagged yet
Go to the top of the page
Quote Post
jpdrolet
post Jul 10 2008, 12:15 PM
Post #2


Extremely Active
****

Premium Member
Posts: 374
Joined: 3-June 04
From: Trois-Rivières, Québec
Member No.: 447
LV:7.1.1 ,. ,.
Canada ca_quebec Canada


The VISA session is opened implicitly when using other VISA nodes so no you don't have to use VISA Open. I've found some use to VISA Open when I needed to lock the session for an "atomic" sequence of commands to avoid other parts of the code to talk to the device at the same time. Then each part of the code using the resource had to open its own VISA session, and get an exclusive lock on the resource before communicating with the device.

This post has been edited by jpdrolet: Jul 10 2008, 12:21 PM

--------------------
A diagram is worth a thousand lines.

www.avensys.ca
-------------------------------


Tags
This content has not been tagged yet
Go to the top of the page
+Quote Post
jack9
post Jul 11 2008, 01:06 PM
Post #3


I've come back for more.


Member
Posts: 2
Joined: 10-July 08
Member No.: 11961
Using LabVIEW Since:2008
LV:8.5.1 ,. ,.
Nothing Selected Nothing Selected Nothing Selected


Ok, thanks

I try to use VISA Open with lock property: I have two sequence "Open - Read - Close" and I wish that they access to serial port in mutual exclusive mode.
I set each VISA Open block with Duplicate_session= True and access_mode=exclusive_lock, I create a resource name constant that it is the input for two VISA Open block. I note that if the Close block of a sequence is executed, all sessions are closed and other sequences can't read from serial bus because the session of second sequence is closed by Close block of first sequence. My question is: Close block closes only session of resource name that use as input or closes also other duplicate sessions?


Tags
This content has not been tagged yet
Go to the top of the page
+Quote Post

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   3 kev_hib 2721 5th November 2004 - 07:04 PM
Last post by: bocanada
No New Posts   1 kev_hib 1762 13th May 2004 - 05:03 PM
Last post by: Deep_Blue
No New Posts   0 Hakan 1181 16th June 2004 - 07:37 PM
Last post by: Hakan
No New Posts   1 Khodarev 1182 12th October 2004 - 04:29 PM
Last post by: FLX


Reply to this topicStart new topic

 




Time is now: 10th October 2008 - 11:36 PM