LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing a VISA refnum between two while loops.

Solved!
Go to solution

I think this would be the most suitable solution since you only call the visa read / write once at a time, keeping all data buffered and using notifiers. Thanks everyone.

0 Kudos
Message 11 of 26
(1,213 Views)

that's even easierMain loopsMain loops

 

SubVISubVI

 

 

 

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 Kudos
Message 12 of 26
(1,209 Views)

By the way, in the settings of the port (control panel) I recommend setting the size of the receiving fifo buffer equal to 1. Thus, pauses between sending from ~ 50 ms to 3-5 ms decrease. This is due to the fact that the timeout for filling the buffer of the receiving chip is minimized.

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 Kudos
Message 13 of 26
(1,207 Views)

@Borjomy wrote:

that's even easierMain loopsMain loops

 

SubVISubVI

 

 

 


Hi Borjomy,

 

Have you seen my Nugget on Action Engines found here?

 

I ask because your suggestion is very close to the form of an Action Engine but requires the assistance of the seq frames to make it work right. Action Engines can offer a an approach that is just a little bit cleaner and easier to use.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 26
(1,186 Views)

Hi, Ben

Sequence is used here only to press the "Stop" button after stopping all cycles. 

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 Kudos
Message 15 of 26
(1,172 Views)

@Borjomy wrote:

Hi, Ben

Sequence is used here only to press the "Stop" button after stopping all cycles. 


...and ensure the session is not closed prematurely.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 26
(1,169 Views)

@Ben wrote:

@Borjomy wrote:

that's even easierMain loopsMain loops

 

SubVISubVI

 

 

 


Hi Borjomy,

 

Have you seen my Nugget on Action Engines found here?

 

I ask because your suggestion is very close to the form of an Action Engine but requires the assistance of the seq frames to make it work right. Action Engines can offer a an approach that is just a little bit cleaner and easier to use.

 

Just trying to help,

 

Ben


In fact, if I fully impemented the design I started, I would take that 1 step farther than AE and write a library with an AE as a private vi with Init, Close, Set, and Query actions and VISA Session on th Shift Register or FeedBack Node, Wrap those actions in public subvis with standard error handling and call it a "Resource Module" Operating on the VISA Resource.


"Should be" isn't "Is" -Jay
Message 17 of 26
(1,148 Views)

@JÞB wrote:

...Ben


In fact, if I fully impemented the design I started, I would take that 1 step farther than AE and write a library with an AE as a private vi with Init, Close, Set, and Query actions and VISA Session on th Shift Register or FeedBack Node, Wrap those actions in public subvis with standard error handling and call it a "Resource Module" Operating on the VISA Resource.


If any of you are not familiar with Libraries as Jeff mentioned...

 

See this blog where I shared a Nugget on how to exploit Libraries in LabVIEW.

 

Note: Signing up for that blog will only get you updates if and when we post more nuggets. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 18 of 26
(1,142 Views)

If the project is small, then it makes no sense to equip the library. This is an extra work. The main thing is that the exchange with devices connected to one VISA device should be done in one VI

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 Kudos
Message 19 of 26
(1,133 Views)

@Borjomy wrote:

If the project is small, then it makes no sense to equip the library. This is an extra work. The main thing is that the exchange with devices connected to one VISA device should be done in one VI


 

All projects start small. What Jeff was suggesting is a Best Practice that I agree with strongly.

 

Thank you,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 20 of 26
(1,125 Views)