LabBench SERVER
LabBench Device Server
The <server> device lets LabBench use a Device Server tactor through the normal IStimulator instrument contract. The first supported sub-instrument is tactor, so device mappings should refer to the sub-instrument ID as [server device id].tactor.
The setup contains exactly one <tactor> element. Its id defaults to tactor; keep that value unless the experiment needs another sub-instrument name. The tactor must contain one LabBench stimulator setup so LabBench knows the tactor modality, unit, and intensity range.
<devices>
<server id="server">
<tactor id="tactor">
<ds5 id="stimulator" name="Tactor stimulator" />
</tactor>
</server>
</devices>
<device-mapping>
<device-assignment instrument-name="Stimulator"
device-id="server.tactor" />
</device-mapping>
The physical Device Server connection is assigned in the site’s instrument map. A local server normally uses this connection string:
http://127.0.0.1:5000
The tactor candidate ID defaults to COM4. To select another serial candidate, append candidateId:
http://127.0.0.1:5000|candidateId=COM7
If the Device Server requires an API token, store the token in an environment variable and reference only the variable name with tokenEnv. Do not put token values in experiment XML, instrument maps, logs, screenshots, or support notes.
http://127.0.0.1:5000|candidateId=COM7|tokenEnv=DEVICE_SERVER_API_TOKEN
LabBench checks the server health and tactor availability when the root SERVER device starts. The tactor lease is requested before tactor output is generated and released when the device stops or setup fails.