 snwbrdr
		
			snwbrdr
		
		
		
		
		
		
		
		
	
			12-22-2009 06:26 PM
Hi I am wondering if it is possible to clear the GPIB SRQ line in VB.NET? I have a particular device that I am communicating with that loads a specific component and then once the loading has completed a status byte is sent out. For some reason the status byte I am reading back is the previous status byte. If anyone has any ideas that would be great. Here is a brief sample of section of code that I am trying to do this. Thanks for your help!
gpibDevice.Write("L" & vbCrLf) 'send command to load device
gpibBoard.WaitForSrq() 'send command to wait for SRQ line
reading = gpibDevice.ReadString(20) 'read back status byte
 lab_boy
		
			lab_boy
		
		
		
		
		
		
		
		
	
			
			
    
	
		
		
		12-23-2009
	
		
		03:05 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		08-19-2025
	
		
		08:42 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		 Content Cleaner
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
 JasonSmith
		
			JasonSmith
		
		
		
		
		
		
		
		
	
			
			
    
	
		
		
		12-23-2009
	
		
		06:52 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 - last edited on 
    
	
		
		
		08-19-2025
	
		
		08:40 AM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
 by 
				
		 Content Cleaner
		
			Content Cleaner
		
		
		
		
		
		
		
		
	
			
		
You cannot clear an SRQ condition directly, you have to instead serial poll your attached instruments, and when the instrument asserting SRQ is polled, it should stop asserting SRQ. I would recommend that you read the following Developer Zone tutorial, which explains how GPIB service requests and serial polling work. The examples are for Basic, and not the .NET API you are using, but it will give you the background you need in order to decide how you should be using it in your application. From your short example, you don't seem to be serial polling your instrument after you detect SRQ.
Serial Polling and SRQ Servicing with NI-488.2 Software and Basic
-Jason S.
 askguy
		
			askguy
		
		
		
		
		
		
		
		
	
			01-25-2017 03:56 AM
Even Controller use ibrsp to serial poll the device, the SRQ line is still asserted.
there is no way to clear SRQ line from controller side!
 Albert.Geven
		
			Albert.Geven
		
		
		 
		
		
		
		
		
	
			01-25-2017 08:32 AM
 askguy
		
			askguy
		
		
		
		
		
		
		
		
	
			01-25-2017 08:45 AM
sometimes IBRSP works, that can deassert SRQ line.
but in most time, IBRSP only get status byte, that can NOT deassert SRQline.
please see below log:
2017-01-25 18:26:19,330 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:19,831 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:20,277 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:20,333 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:20,834 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:21,278 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:21,336 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:21,837 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:22,279 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:22,339 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:22,840 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:23,280 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:23,342 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:23,386 [1] DEBUG CommandA - ibrsp:85  []
2017-01-25 18:26:23,843 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:24,281 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:24,345 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:24,846 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:25,282 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:25,347 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:25,849 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:26,284 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:26,350 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:26,852 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:27,285 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:27,353 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:27,855 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:28,287 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:28,356 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:28,478 [1] DEBUG CommandA - ibrsp:85  []
2017-01-25 18:26:28,858 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:29,288 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:29,359 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:29,861 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:30,289 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:30,362 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:30,863 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:31,290 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:31,365 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:31,866 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:32,292 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:32,368 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:32,869 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
 askguy
		
			askguy
		
		
		
		
		
		
		
		
	
			01-25-2017 09:00 AM
sometime IBRSP works, it can deassert SRQ line;
but in most time, IBRSP only get status byte, it can NOT deassert SRQ line;
please see below log:
2017-01-25 18:26:19,330 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:19,831 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:20,277 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:20,333 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:20,834 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:21,278 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:21,336 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:21,837 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:22,279 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:22,339 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:22,840 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:23,280 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:23,342 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:23,386 [1] DEBUG CommandA - ibrsp:85  []
2017-01-25 18:26:23,843 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:24,281 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:24,345 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:24,846 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:25,282 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:25,347 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:25,849 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:26,284 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:26,350 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:26,852 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:27,285 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:27,353 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:27,855 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:28,287 [14] DEBUG TestSRQThread - TestSRQ: 1
2017-01-25 18:26:28,356 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:SRQ:REN:NDAC
2017-01-25 18:26:28,478 [1] DEBUG CommandA - ibrsp:85  []
2017-01-25 18:26:28,858 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:29,288 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:29,359 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:29,861 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:30,289 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:30,362 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:30,863 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:31,290 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:31,365 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:31,866 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:32,292 [14] DEBUG TestSRQThread - TestSRQ: 0
2017-01-25 18:26:32,368 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
2017-01-25 18:26:32,869 [13] DEBUG CheckControlLineStatusThread - LINES: ATN:REN:NDAC
 Albert.Geven
		
			Albert.Geven
		
		
		 
		
		
		
		
		
	
			01-25-2017 02:19 PM
 askguy
		
			askguy
		
		
		
		
		
		
		
		
	
			01-26-2017 12:08 AM
Hi Albert,
thanks for your reply again! below are the testing environment.
1. two gpib cards are installed in my computer, and one cable is used to connect both gpib cards.
2. one application was running to simulate controller based on gpib0. it called testsrq by timer, and called ibrsp by clicking button randomly.
3. another application was running to simulate instrument based on gpib1. it called ibrsv 85 at begining.
thank you very much!
 Albert.Geven
		
			Albert.Geven
		
		
		 
		
		
		
		
		
	
			01-26-2017 09:25 AM