Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Siglent Strange VISA Behavior

$
0
0

I am puzzled by VISA communications.  Everything I've read always talks about opening and closing sessions when "done communicating".  This problem is one that I've faced over and over and I always revert back to just allowing LabVIEW to take care of it for me.  So, here goes:

 

I've been recently communicating with a Siglent SDS3303C power supply and I'm getting such strange behavior.  I finally dumbed down my communications to this simple routine:  Open, write, Close.  What is not shown for simplicity is that I wrapped a case structure to bypass both the open and close section of code.  If I ignore both the open and close functions I can communicate all day long without any problems.  But, that's not how I originally designed the routines.  I originally wished them to perform such as the case below.  Where I would open a session, communicate, and then close the session.  So, here's where it gets odd.  If I use this method shown below I am able to send a command.  The VI finishes execution with no errors.  I send a second command, the VI finishes execution again without errors.  The third time around, all communication fails to work.  And I still receive no errors.  At this point I'm in a state of no communication.  If I remove the opens and closes (actually opens seem to have no effect on this), it takes TWO runs of the VI before commands sent begin to be received by the instrument.  I've also tried Asynchronous and Synchronous communication (though I doubt that would matter in such a simple case.)

 

So the question is why does this occur?  What tools can I use to diagnose what is happening?  Why does opening and closing cause such a ruckus?  And why is it on the THIRD attempt that the communication finally breaks down?

 

I have a delay inserted between each operation and the timing seems to have no affect.  I've placed delays in between each operation between 0 and 10 seconds (the number is in milliseconds).  How can I dig further into this to discover what is really happening?

 

And just to vent...Why on earth should I ever bother with opens and closes?  I mean, they just seem to cause me nothing but headaches!...Don't answer that.

 

Simple Open - Write - Close.jpg


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>