130 SSG5000A Programming Guide
#Send
cmd string
Sock.sendall(cmd)
time.sleep(1)
except
socket.error:
#Send failed
input('Send failed!\nPress "Enter" to exit: ')
SocketClose(Sock)
sys.exit()
reply = Sock.recv(4096)
reply = reply.decode()
return reply
def SocketClose(Sock):
#close the socket
Sock.close()
time.sleep(.300)
def main():
# Body: send the SCPI commands *IDN? 10 times and print the return message
s = SocketConnect()
count = 0
for i in range(10):
qStr = SocketQuery(s, b'*IDN?\n')
print (str(count) + ":: " + qStr)
count = count + 1
SocketClose(s)
input('Press "Enter" to exit')
Содержание SSG5080A Series
Страница 1: ...SSG5080A Series Signal Generator Programming Guide PG0805A E01A ...
Страница 2: ......
Страница 124: ...122 SSG5000A Programming Guide ...
Страница 136: ......