Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The text-based commands may also be generated by external tools and scripts rather than by Designer. An The example script , written in python, that below connects to the AWE Server at a dedicated port 15001 for external tuning and reads and writes a module’s variable in an active layout (that contains a module named “Scaler1”) in real-time is shown below. The remainder of this document describes the full set of tuning commands and arguments.. This script is written for Python 3.x, but can be translated into any programming language of choice that supports communication over a TCP socket:

Code Block
languagepy
import socket
import time

TCP_IP = 'localhost'
TCP_PORT = 1500115007
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
bytes_sent = s.send(b'get_value,ScalerDB1Scaler1.gainDBgain\n')
data = s.recv(BUFFER_SIZE)
print (data.decode())

# Attenuate channel 1
s.send(b'set_value,ScalerDB1Scaler1.gainDB\ngain,-4024\n')
data = s.recv(BUFFER_SIZE)
print data(data.decode())

# Close the socket
s.close()

The remainder of this document describes the full set of tuning commands and arguments.

INI file settings

Colors may be customized in the INI file as follows:

...

Reads the specified number of float elements in an array of data and returns the result as binary data rather than as text. This command is only supported through the MATLAB AWEClient.dll and is not for general use. The format of the binary reply packet is described in Internal Binary Packets.

fast_read_int (Matlab)

Syntax:

...

For more about binary packets, including a detailed list of available commands, see (8.D.1.2) AWE Core Tuning Command Syntax and Protocol.

...