Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling one intrustment with two applications using VBA

Solved!
Go to solution

Hi everyone,

 

I am writing two programs to control a signal generator using VBA

The problem is these two programs can't run parallelly, sometimes it got stuck

Even if i use two PCs, it still happen

 

How i can solve the problem?

 

Thank you and best regards

0 Kudos
Message 1 of 3
(2,708 Views)
Solution
Accepted by topic author HuyHoang

The bottleneck here is the instrument and its bus.  Think of it a single lane road that can either allow traffic one way or another.  The instrument needs to listen then act and respond prior to getting another request.  Also, the two applications may be contradicting the setup - so avoid interleaving commands.  You need a system that allows one application or the other to gain control and signal one to wait until the controlling application completes its suite of functions before releasing control.  There are several ways to accomplish that and the choice is ultimately up to you.  Might I suggest sending an *RST to the instrument prior to releasing control, that way the other application takes control of the instrument in a known state.

 

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 2 of 3
(2,679 Views)

Dear friend,

Good morning

Thank for your support quickly

 

I understand what you said, but my problem is that I only can modify my application. Other application came from my supplier, I can't modify it

So I think this is impossible mission

Anyway, thank for your support

0 Kudos
Message 3 of 3
(2,631 Views)