The reader of this document is assumed to be familiar with the et tcl implementation. See EPICS document ET: EPICS TCL/TK Interface by Bob Daly, for further information.
idl -serverStart it by typing:
it_wishIn the extensions source directory for it (i.e. extensions/src/tcl_it) is a subdirectory examples containing examples using it. These examples together with the following description of the idl command types should be used when learning to use it.
idl link ai1tcl ai1idl D 10000
idl link tcl1 idl1 S 512 idl link tcl3 idl3 D 1 idl linkpv wf wfidl idl get tcl1 idl put ai1 idl cmd plot,idl1 idl cmd {plot,wf,color=12,yrange=[2000,3000]} <<<<start multi-element (vector) record oriented types>>>>>>>>> idl vdef tcl1 {0 256 5} idl vset tcl1 idl vdis wf $graph line1
idl link tclVar idlVar typeVar nelementsVarDescription: Establish a link between a tcl variable and an idl variable. The type of variable (typeVar) i.e Byte (B), Int (I), Long (L), Float (F), or Double (D) and the number of elements (nelements) of the defined type are also specified. Both the tcl and idl variable are created. For scalar variables the tcl variable can be set or read directly; however, for vector variables the `vdef' and `vset' command types are used. Strings are not yet supported. All tcl values used at the script level are treated as doubles.
Return:
idl link tclvar1 idlvar1 F 1024 idl link tclai1 idlai1 F 1 set tclai1 11.1
idl linkpv tclVar idlVarsDescription: Establish a link between tcl variable (which has previously been linked with an IOC process variable via a `pv link' command) and an idl variable. The type of variable i.e Byte (B), Int (I), Long (L), Float (F), or Double (D) and the number of elements are determined by the IOC process variable. Strings are not yet supported. All values used at the tcl script level are treated as doubles.
Return:
pv linkw wf vong:xy566WaveformCh0 pv linkw ai1 T:ai1 idl linkpv wf wfidl idl linkpv ai aiidl
idl cmd IDLcommandDescription: Execute the idl command.
Return:
idl cmd plot,wf idl cmd {plot_io,freq,abs(fft(x,1)),title="TEST",ytitle="POWER"}
idl get tclvarDescription: Update the linked tcl variable to the current values stored in the idl variable.
Return:
pv linkw ai T:ai1 pv linkw wf vong:xy566WaveformCh0 idl link ai aitcl idl link wf wfidl idl get aitcl idl get wf
idl put tclvarDescription: Update the value of the linked idl variable to the tcl variable value.
Return:
pv linkw ai T:ai1 pv linkw wf vong:xy566WaveformCh0 idl link ai aitcl idl link wf wfidl idl put wf idl put aitcl set aitcl 11.1 idl put aitcl
idl vdef tclVar {base size precision} idl vset tclVar {list of values to be written to tclVars} idl vdis tclVar graph graph_elementDescription: All three of these command types are used to deal with multi-element and waveform records. For multi-element and single element records, the link, get, and put command types operate the same. However, for multi-element process variables, the linked tcl variable only reflects the value of the first element. The user reads/writes/displays multi-element data stored in the interface buffer using a "view" mechanism. A view is a defined subset of a multi-element record which will subsequently be used for accessing data from the record.
set graph .g blt_graph $graph -width 500 $graph element create line1 -symbol circle -bg red pack append . .g {} pv link {wf1 wf} {vong:xy566WaveformCh0 vong:xy566WaveformCh1} pv get {wf1 wf} idl linkpv wf wfidl idl vdef wf {0 256 5} idl vset wf idl vset wf {1 2 33 56.4 987.56 1.01} idl vdis wf $graph line1