SPX SPIDAR NIC-500s Operation Manual page 76

Table of Contents

Advertisement

5.4.1
Turning On/Off
Before collecting you must turn on the sensor. This is done through the power endpoint. The
following code turns on the sensor:
power_state = {'data': json.dumps({"state": 2})}
ret = requests.put("http://192.168.20.221:8080/api/nic/power",
data=power_state)
5.4.2
Setting Parameters
The collection parameters must then be set through the setup endpoint. For example, if the user
wanted to collect a 20 ns trace at 4 stacks and a 100 ps sampling interval at a rate of 1 trace/s,
they would run the following command:
gpr_param = {'data': json.dumps({"gpr0": {"parameters": {
"points_per_trace": 200,
"point_stacks": 4,
"time_sampling_interval_ps": 100,
"trigger_mode": "Free"}},
"timer": {"parameters": {"period_s": 1}}})}
ret = requests.put(("http://192.168.20.221:8080/api/nic/setup",
data=gpr_param)
Note that you cannot set the time window directly, you must calculate the appropriate number of
points per trace (time window = points per trace × sampling interval).
5.4.3
Beginning and Ending Collection
You must issue the command to start the collection through the acquisition endpoint. The "state"
parameter decides if collection should start or stop. For example:
acq_param = {'data': json.dumps({'state': 1})}
ret = requests.put((("http://192.168.20.221:8080/api/nic/acquisition",
data=acq_param)
Ending the acquisition is done through a similar command:
acq_param = {'data': json.dumps({'state': 0})}
ret = requests.put((("http://192.168.20.221:8080/api/nic/acquisition",
data=acq_param)
68
SPIDAR SDK

Advertisement

Table of Contents
loading

Table of Contents