I am making use of Prologix GPIB-USB Controller to be used in LISTEN ONLY mode (Device Mode) to decipher data communication between Two instruments namely Tester & Prober. I have written a sample program in python using Pyserial Module for this purpose.

The issue am facing is that i am able to see the Command and Response communicated between instruments , but cannot listen to the SRQ Signal send over GPIB bus. I am totally new to this area of GPIB programming and have very little knowledge about related stuff.

import os.path
import serial
import sys
from time import sleep

comport = '/dev/ttyUSB0'
# addr = '5'
ser = serial.Serial()

try:
    ser = serial.Serial( comport, 9600, timeout=0.5 )

    # Switch to DEVICE mode
    cmd = '++mode 0'
    print('Sending:', cmd)
    cmd = cmd + '\n'
    ser.write(cmd.encode('UTF-8'))

    # Set instrument to LISTEN ONLY mode
    cmd = '++lon 1'
    print('Sending:', cmd)
    cmd = cmd + '\n'
    ser.write(cmd.encode('UTF-8'))

     # Read the Data from GPIB BUS
    while(True):
        s = ser.read();
        if len(s) > 0:
            print(s)

except(serial.SerialException, e):
    print(e)
    f.close()

except(KeyboardInterrupt, e):
    ser.close()
    f.close()

I am running this code from a Raspberry Pi connected to one end of GPIB-USB Controller and other half connected to GPIB BUS (Connected to both Tester and Prober).

I am able to see all the commands transmitted from Tester and also response for those commands from Prober , But for certain commands the Prober reply back with a SRQ Code , But that is not visible in the Data output collected by this setup.

Output Collected:

F
PN0
?V
PN00453             ,Rzz00-R014.08R,P12,0000000000000000
a
020020
f1
000.0
G
COTBIRD-5S-2CPB-NL  
T (Missing SRQ Reply for this Command)
O
A
A
019021

I am very sure that the SRQ Code is sent after command "T" as i can see the same in Prober Data log generated.

Any guidance would be helpful

The issue was solved by issuing the ++spoll command which reads out the Serial Poll SRQ value requested from the device.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.