Script Server
8. Script is a good way for users to perform custom automated measurements or post-processing.
With Script server, you can use 8. Script remotely and/or from other programs using TCP/IP sockets.
TCP/IP sockets allow programs to talk through a network, but you can also have a communication between two programs on the same computer.

- First, you need to open IQSTAR on the bench computer.
- In Scripting > Script server, you should configure your options, and then start
the server.
- The main option configuration is the server port. This port should not be used
by another program, and your firewall must not block it.
- In Matlab, you will need to use the "tcpclient" function, as defined
below:
-
You must specify your server port in the Socket object; the same that you defined on IQSTAR (cf. above)
o And your server IP address; if IQSTAR is on the same computer you must use the localhost address (i.e. 127.0.0.1).
o Timeout is set to Infinite there to avoid long delay operations to stop, as it could happen during measurements.
-
-
This is the standard use of a socket communication. Each command is sent one by one (with an End Of Line: EOL), and each corresponding answer read. If you do not read after each command, your receiving buffer will flow with all answers.
Matlab Basic Example


Matlab IQSTAR measurement example

On Matlab side, each command sent using "writeline" has to be followed by "readline" function to clear the buffer.

