Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

n°0/n°28

Hello,

I have a C# application using several devices and I want to use Notify for some of them. It works most of the time but for some devices addressing them cause a driver error. Here are the details.

 

I send a "*SRE 16" command to two or three devices, then I configure them to be polled on SRQ like this:

 

board.Notify(notifymask, notifycallback, null);  //mask selects bit 4

notifylist.Add(device);  //add to list of devices to poll on SRQ

 

(There are other devices on the bus  for which the response time is not critical and which are not configured for setting SRQ and are not in the list)  

The notify callback function only sets a flag to notify other threads which devices should be polled, something like this:

 

public static void notifycallback(Object sender, NotifyData notifyData)
{
foreach (GPIBDevice device in notifylist) { device.pollflag=true } //signal other threads all devices that should be polled

Thread.Sleep(50); //give other threads time to poll their devices before rearming

notifyData.SetReenableMask(notifymask); //rearm to allow next notify

}

 

This works quite well, but for some hardware (eg a Tektronics scope), even if it is not configured to set SRQ (not in the list above), simply sending it a command causes error n°0 (driver error) or n°28 (power failure?).  The same scope works perfectly when other devices are not configured for SRQ. This is very strange and I don't know where to start to debug this.   

0 Kudos
Message 1 of 2
(107 Views)

Can you communicate with the scope at all when all instruments are connected?  Older Tek scopes used to give me problems when I had more than a few instruments on the bus.

 

I suggest you initialise the scope to ignore SRQ explicitly.  It might be that the default setting is to reply on SRQ and that should be turned off. 

 

Otherwise change its address to be quite different than the devices you poll. 

Look at cables and connection to scope.  Bad cable or connectors might case garbled commands.

See if there are firmware upgrades for the scope, this might be an issue Tek has fixed and an update could help.

Call Tek and ask them why?

 

Good luck!

Craig

0 Kudos
Message 2 of 2
(41 Views)