LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How many VISA reads are possible within one VI?

If a VI uses one serial (COM) to communicate, port how many VISA reads are possible within that VI? Is it equal to the same number of VISA writes? Perhaps someone can direct me to an example that utilises this property.

 

Thanks

 

mhaque

0 Kudos
Message 1 of 15
(3,724 Views)

My GPS app I am working on has a capability of 1000 visa reads per second, but none of them are simultaneous.  It has been my experience that if you need simultaneous reads or writes that you use a handler of some sort to prevent data collisions at a serial port.

 

That handler might be another piece of code or even as simple as a global variable that can hold serial port buffer data for you.

 

 

 

 

 

...later on I'm thinking about downloading myself into the internet using LabView...
0 Kudos
Message 2 of 15
(3,714 Views)

Could I use an event handler of some sort. Such as VISA wait on event?

 

Thanks

 

mhaque

0 Kudos
Message 3 of 15
(3,705 Views)

@mhaque wrote:

If a VI uses one serial (COM) to communicate, port how many VISA reads are possible within that VI? Is it equal to the same number of VISA writes? Perhaps someone can direct me to an example that utilises this property.

 

Thanks

 

mhaque


A VI can have a infinite number of VISA Reads. What exactly are you trying to do? I think you are missing a big piece of the puzzle and yet asking others to piece it together.

Richard






0 Kudos
Message 4 of 15
(3,696 Views)

Broken Arrow wrote:

A VI can have a infinite number of VISA Reads. What exactly are you trying to do? I think you are missing a big piece of the puzzle and yet asking others to piece it together.


 

Forgive me but I am fairly new to LabVIEW (2.5 months). Perhaps it is best if I explain what I am trying to achieve.

 

In the front panel of the attached VI, I want the Node Address to be 0 and 01. 0 corresponds to Bank A and 01 to Bank B. Currently the VI reads only one of these values. I want it to read both and give status updates of both Bank A and B.

 

How do I achieve this?

 

I am fairly new to computer programming as well so please forgive me if I am missing a big piece of the puzzle. I know what I want my program to do, but I may not have a good grasp on how to do it. I am the sole designer/programmer of this VI and the only place I can look to for help is the LabVIEW community.

 

Thanks

 

mhaque

Download All
0 Kudos
Message 5 of 15
(3,677 Views)

Saying you want to read Address 0 and 01 still doesn't tell us everything because we don't know what's going on in your hardware.

 

It sound to me like you want to read from two addresses of some device. If so, you (we) need to know how the addressing works. Sometimes, it's as easy as embedding the address into the command that you send. If so, you could use a FOR loop and run the code twice - the first time accessing Address 0, the next time, address 01. Better yet, use a State Machine, but let's get it working first.

 

Richard






0 Kudos
Message 6 of 15
(3,662 Views)

Correct, hardware information is important. Please include info like what kind of connections--RS232, USB,etc...Also how many cables do you use...Plus, one other important thing is, please note the version of LabView you are using.

 

If you are using 2 COM ports, LabView has some nice examples in the search engine that can get you going in the right direction.

 

On the other hand, if you are unsure, tell us as much info you can including what system OS you are running, that would also potentially help.

 

 

 

 

 

 

...later on I'm thinking about downloading myself into the internet using LabView...
0 Kudos
Message 7 of 15
(3,637 Views)

It's really pretty straight forward. You've got a single instrument connected to a single com port. You do a write,read,write,read. All sequntial and all connected with error out/in connections. Simple example below. You could also get aittle fancier and use a for loop with a single write/read inside. Index the array the comes out.

 

0 Kudos
Message 8 of 15
(3,610 Views)

Hi Dennis

 

Your suggestion worked. My question to you would be why use the property node " Serial Sttings: Number of bytes at serial port" if we can just put a constant.

 

Also using mutiple read/writes in sequence seems to slow the program down.

 

Thanks

 

mhaque

0 Kudos
Message 9 of 15
(3,522 Views)

@mhaque wrote:

Hi Dennis

 

Your suggestion worked. My question to you would be why use the property node " Serial Sttings: Number of bytes at serial port" if we can just put a constant.

 

Also using mutiple read/writes in sequence seems to slow the program down.

 

Thanks

 

mhaque


If you are talking to multiple instruments on the same com port, you have to do them sequentially.  It can't transmit and receive at the same time.  The other part of your question makes no sense.

Jim

LV 2020
0 Kudos
Message 10 of 15
(3,507 Views)