...
Code Block | ||
---|---|---|
| ||
import socket import time TCP_IP = 'localhost' TCP_PORT = 15007 BUFFER_SIZE = 1024 # Open a TCP socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) # Read the value of the scaler s.send(b'get_value,Scaler1.currentGain\n') data = s.recv(BUFFER_SIZE) print (data) # Attenuate channel 1 s.send(b'set_value,Scaler1.currentGain,0.5\n') data = s.recv(BUFFER_SIZE) print (data) |
The expected output is shown below.
...
INI file settings
Colors may be customized in the INI file as follows:
...