EasyManua.ls Logo

Focus Microwaves ituner - 5.3 Blocking versus non-blocking calls

Default Icon
73 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
iTuner Manual
45
To control an iTuner from your application, you ‘import’ the iTunerX control into your program,
and declare a variable of type iTunerX for each of the tuners connected to the system. For the
purpose of this manual, lets assume that your tuner is represented by a variable named iTuner.
This variable is now used to acces the properties and method. For instance, to access the
property named Address, you would write the following code :
iTuner.Address = ”10.0.0.1” ( VB, Delphi etc)
iTuner.SetAdddress( 10.0.0.1”); (C++)
The first line uses direct access, the second line uses the set/get method for properties.
For the iTunerX.ocx functions retain the same functionality of the raw TCP/IP interface and
should be used in a similar fashion. Some commands have been encapsulated with a method,
other commands are executed by calling the Send method, with the raw command string as a
parameter.
5.3 Blocking versus non-blocking calls
As explained in the Command language chapter, the iTuner always immediately returns control
after receiving a command. However, certain commands, such as TuneTo require
A certain time to complete the repositioning of the probe to tune to the desired gamma.
Therefore, your application has to wait for the tuner to complete its task. The iTunerX control
now allows to make ‘blocking calls’, thus program execution is halted until the tuner has
completed all tasks.
The property ‘TimeOut’ is used to control call blocking. Setting ‘TimeOut’ tozero ( 0) turns
blocking off, thus all calls return immediately. You have to perform the status monitoring of the
tuner from your application, such as calling ‘STATUS?’ in a loop until the return value becomes
zero.
Blocking is turned on by setting ‘TimeOut’ to the maximum time in seconds the process will wait
for a command to complete. The timeout value to use depends on the tuner you have. Allows
sufficient time for tuner tuner to move the probe from one end to the other, an all horizontal
and vertical axis.
The following methods are blocking when ‘TimeOut’ is non-zero :
Initialize()
SetGamma(double magnitude, double phase)
SetVSWR(double VSWR, double phase)
SetPosition(long Position, short axis)
All other methods are always non-blocking, including ‘Send’ and ‘SendCmd’. Instead of calling
‘Status?’ in a loop, you can use the ‘OPC’ method to wait for the current task in the tuner to
complete (see description below).

Table of Contents