Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Pxi-8420 Serial Read Performance

Hi ,
 
I am using the PXI-8420/16 with the breakout box. I am running a application to communicate with the instrument that sends out 15000 bytes of data in 9 seconds.
 
But i am unable to get the whole data is 9 seconds, but it takes 14 seconds for it to receive thru labview. I can get the whole data in 9 sec with hyperterminal.
 
Some notes on the application
 
1.) I am using enable termination character enabled.
2.) NI-Serial version is 1.8.1
3.) NI-Visa Version is 3.1
4.) The operating system is WIn XP SP2
 
Can anyone help me out in increasing the read performance of the application.
 
0 Kudos
Message 1 of 10
(4,869 Views)
Is the 14 seconds the time for your entire LabVIEW program or just the VISA read? If it's for the entire program, are you configuring the serial port and doing a close VISA session in there? Since you have the termination character enabled, are you sure that the instrument is sending one and that it is that same as what you have setup? Are you using one of the shipping examples or a program you wrote yourself? If it's one you wrote yourself, you might want to post your VI so that someone can look at it. One thing to try is to use the VISA Set I/O Buffer Size after you have configured the serial port.
0 Kudos
Message 2 of 10
(4,859 Views)

Hi,

The 14 sec time is for the whole process, like sending the command, stripping the termination character and passing to the test application

My req is that i would receive a packet from the instrument like 7E52407E.

My termination character is 7E and i need to remove it and pass the packet to the application.

I have also attached my code

 

 

 

 

 

0 Kudos
Message 3 of 10
(4,857 Views)
What's inside the Read function of yours and what are you passing to it? It looks like an automation reference. 
0 Kudos
Message 4 of 10
(4,853 Views)

Hi,

It is just the visa read.

 

0 Kudos
Message 5 of 10
(4,851 Views)

A VISA Resource is a brown wire and looks like this:

 

Message Edited by Dennis Knutson on 06-28-2006 12:28 PM

Message Edited by Dennis Knutson on 06-28-2006 12:30 PM

0 Kudos
Message 6 of 10
(4,849 Views)

Hi ,

Let me explain you more clearly.

The Serial Read calls the Genric Read and the Generic Read in turn calls the Rs232 read function.

The generic read is used to support if any other RS232 drivers would be written in the future.

 

Attached are the codes.

 

 

 

Download All
0 Kudos
Message 7 of 10
(4,838 Views)
Then my guess is that this is what is causing all of the additional overhead. If you were to replace everything you have now with simple VISA Reads and Writes, you would probably be a lot closer to the times you see in Hyperterminal. If that happens, you'll have to decide whether you want the flexibliltiy you have now or speed.
Message 8 of 10
(4,822 Views)

Hi,

I would like to have the flexibility and speed both. Do you have any thoughts on it.

 

0 Kudos
Message 9 of 10
(4,821 Views)
I would just make a single dynamic VI that has VISA resource names as inputs and outputs and avoid all the conversion of ActiveX references to variants and variants to resource names. If you want to be able to call different VIs, can you not just provide the path so you don't have to use the subVI you are calling before the Open VI Reference? You probably want to minimize the number of times you call it dynamically. The advantage of having a VI statically called is that it is already in memory and runs immediately. Just the opposite happens when you call one dynamically.
Message 10 of 10
(4,811 Views)