Tcl command "ts"


The tcl command "ts" is a general purpose tcl command. It is the interface to the levels 0 and 1 of the TS library. Everything is implemented here.


Index


TS id

The access to the TS is implemented via channels. Each channel have its own TS id. In this way many applications can access the same ts' data simply using different ids.

All the routines present in ts package have a parameter of this type.


Query TS presence

Sometimes it is usefull to check if a TS is present. There are 2 types of TS (0=TSA; 1=TSB) Use
ts ispresent 0/1 for this task.


Initialization

As stated before, the access to the TS is implemented via a TS id. To obtain such an id you have to open a channel to the TS using
ts open 0/1. This id will be used for all the accesses to the TS.
When you finish using the TS, please call ts close 0/1 to close the channel associated to the id.


Read a register

ts read implements the reading actions from the registers. There are four pages 24 registers in total can be read.


Write a register

ts write implements the writing actions to the registers. There are four pages 13 registers in total can be written.


An example


# check ts is at present or not 0=TSA
set exist [ts ispresent 0]

# open the TS
set tscid [ts open 0]
...

# read/write a register
set data [ts read status $tscid]
...

set data 0x7812
ts write run $tscid $data
...

#close the ts
ts close 0 $tscid


Top of the page. Ts documention.
Send comments to: Wen Mei

Created:29.04.1998
Last modified:30.04.1998