1 methods – INFICON STM-2XM 2-Channel Rate/Thickness Monitor User Manual

Page 94

Advertising
background image

5 - 14

PN

07

4-

61

4-

P1

A

STM-2XM Operating Manual

5.6.1 Methods

Open . . . . . . . . . . . . . . . . . . . . . . . . (file name)

Attempts to acquire communications port
and allocate resources. Open does not need
to be called; if the port was not opened it will
automatically be opened when the
DoTransaction function is called.

DoTransaction . . . . . . . . . . . . . . . . (addr, SmdpCmd, Msg, Rsp, resetflag)

Initiates communication with STM-2XM, and
waits for a reply (or timeout) before returning.

In: addr is the SMDP address of target
instrument.

In: SmdpCmd is the SMDP command
opcode enumeration constant. The value
to use is based on the CMD_RSP most
significant nibble value, less one. For
example, a hexadecimal 60 AckPF
command will pass a value of 5 as the
SmdpCmd code.

NOTE: All command codes for

DoTransaction SmdpCmd argument
are one less than the CMD3 to
CMD0 bit field used in the SMDP
packet (refer to

Table 5-1 on page

5-7

).

In: Msg is the message to send, may be
a string or byte array.

Out: Rsp is string response from
instrument.

Out: Boolean resetflag is true if
instrument has been reset since the flag
was acknowledged last.

Close() . . . . . . . . . . . . . . . . . . . . . . . Clears resources associated with the

instance. Will also close the communications
port if there are no instances communicating
on the port.

NOTE: In most cases it is not necessary to

call this function. The programming
environment will unload the control
when it is finished, and the control
automatically closes the resources
when it is unloaded.

Advertising