
Time Controller Series User Manual
Section 6: Operating the Time Controller Software
ID QUANTIQUE SA
1227 Geneva
T +41 22 301 83 71
51
Rue Eugène-Marziano 25
Switzerland
F +41 22 301 83 79
6.4.3
Python
The Time Controller relies on the ZMQ library for communication with the host computer. Install it
using your Python distribution’s command console:
> easy_install pyzmq
Or
> pip install pyzmq
Following this, you can then issue SCPI commands within python to interact with your
Time Controller. For example:
import zmq, socket
# Identify your Time Controller device
IP =
‘
169.254.xx.1xx
’
#
<< change this to the IP address of your TC
PORT = 5555
ADDR = f'tcp://{IP}:{PORT}'
# Create zmq socket and connect to the ScpiClient
context = zmq.Context()
timecontroller = context.socket(zmq.REQ)
timecontroller.connect(ADDR)
# Execute SCPI commands on your TC. E.g.:
SCPIcommand =
'INPUt1:COUNter?'
# How many counts on input channel 1?
timecontroller.send_string(SCPIcommand)
answer = timecontroller.recv().decode(
'utf-8'
)
print(answer)
For further information, refer to the example python scripts that can be found on the USB memory
stick supplied in the delivery of the Time Controller device.
6.4.4
Data Link Target Service
The Data Link Target (DLT) Service run is responsible for the Time Controller’s timestamps reception
on the host computer. The DLT binary is installed by the Time Controller GUI setup and can be found
in the following directory by default:
C:/Program Files/IDQ/Time Controller/packages/ScpiClient
Before starting an acquisition, start the DLT by either opening the GUI (which starts the DLT) or run
the DLT binary with the following arguments.
DataLinkTargetService.exe -f <TS_FOLDER> --logconf <LOGCONF_PATH>
The
<TS_FOLDER>
is the default directory where timestamps should be stored when a relative
path is used with the start-save DLT command. The GUI sets it in the My Documents directory.
The
<LOGCONF_PATH>
is the path to the logging configuration file which is automatically created
by the GUI. If you need to create it yourself, use the template located in the same directory as the
DLT. Then set the desired path for the DLT log file with the following property.