Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB writes get very slow after a few hours

Ive noticed that after a few hours of using GPIB communication with my equipment that the GPIB writes slow down to probably 50 times slower speed. They do complete but at alot slower speed. Ive tried removing all insturments except one from system and it remains slow. Ive tried swapping equipment and cables and nothing seems to fix this. The only solution is to do a reboot and this is not a viable option everyday!

 

any help would be appreciated?

 

Several other users here are experiencing the same thing

We are using Labview 2010

 

Iano

0 Kudos
Message 1 of 7
(3,801 Views)

Is it the communication that's slowing, or the program? Are you doing anything memory-intensive in your code, like accumulating data in an array that's constantly growing? Are you writing to a file that's constantly growing. Please provide more details as to what your code is doing. If you can upload the code, even better.

0 Kudos
Message 2 of 7
(3,777 Views)

Hi Lano,

 

Would it be possible to take a look at your code in order to determine the root of the problem? Usually this type of behaviour is associated with a memory problem which could be due to something in your code.

 

Kind Regards,


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 3 of 7
(3,765 Views)

I doubt it is code as all programs exhibit the problem. here is one...

0 Kudos
Message 4 of 7
(3,762 Views)

Ummm... about your VI.. let's hold off on that for now...

 

What kind of controller do you have? You said that you tried removing all instruments except one. Does this mean it doesn't matter which one is the single instrument on the bus? Or does it only happen when a specific instrument is on the bus?

 

 

Now, about your VI:

  • This looks like it was written in LabVIEW 5. If not, and you just wrote it, is there a specific reason you're using the lower-level GPIB functions instead of VISA?
  • The sequence frame is not necessary. You can chain the error wire to enforce data dependency. Use the Time Delay Express VI to give you a delay with error I/O
  • Why is the numeric control EXT? Why would you need that much precision?
  • Why is there a case structure around the whole VI with a False constant?
  • The string being sent to the instrument in the last frame seems a bit strange to me. Is the "=" character supposed to be a command termination?
0 Kudos
Message 5 of 7
(3,758 Views)

Hi Thanks for the reply.

I have a NI PCI GPIB card installed on my windows XP machine.

It slows down for all instruments so I doubt its any specific peice of code. Some are downloaded insturment drivers from NI some are home written etc...

If I exit labview and open again it returns to full speed.

 

The vi I uploaded is one we have been using for years to control a voltage source.

 

0 Kudos
Message 6 of 7
(3,754 Views)

Hi Lano,

 

Usually when LabVIEW slows down it is due to a problem with memory allocation. The reason I believe this is to do with memory is because you say it resolves itself when LV is closed and restarted. What happens when you close LV is it dumps all memory allocated for the program and starts fresh.

 

There are a couple of common reasons for this:

 

  • You are writing to an array or string which is ever expanding requiring LV to allocate larger sections of memory.
      • When arrays are created in LV it reserves a particular section of memory on your computer, as the array expands it fills the remaining empty memory inside the reserved space (it reserves more than you need). When it has reached the maximum space for the reserved slot it does not increase the reserved amount of memory but chooses an entirely new part of memory to reserve an even larger slot. LV will not use the previous section of memory anymore causing a loss in useful memory.
  • You do not close the VISA reference once the task is complete keeping the task in memory unnecessarily.

You say that you used the vi you uploaded for years, does this vi cause the slowing down problem? What has changed in your setup for this problem to start occuring?

 

I hope this is not hindering your project too much!

 

Kind Regards,


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

0 Kudos
Message 7 of 7
(3,733 Views)