932502G / 0618
4, 5. MCB PROPERTIES IN MAESTRO
3)
Establish a connection to the instrument using the OpenDet function (i.e.
WSO.OpenDet())
4)
Send commands to the instrument to set hardware properties and control the instrument
using the COMMAND function. This function returns the applicable command
responses described in Section 7.
string COMMAND(int iDetIndex, string strCmd, out int iErrMac, out int iErrMic)
•
iDetIndex specifies the MCA number (1 or 2).
•
strCmd is any command specified in Section 7 of this user manual.
•
iErrMac and iErrMic codes are returned by the function to indicate whether the
command was successful. See Section 7.1.2 to interpret the error codes.
5)
The acquisition data can be accessed using the GetData function.
string GETDATA(int iDetIndex, int iView, int iStartChan, int iNumChan)
•
iDetIndex specifies the MCA number (1 or 2)
•
iView is the spectrum as described for the Web Page. (0=Normal View, 1=Alt1,
2=Alt2 - The content for each depends on ZDT or Gate Route Mode acquisition.)
•
iStartChan is the starting channel.
•
iNumChan is the number of channels to load starting from the start channel.
The spectrum data is returned as a string where each 32-bit channel counts is represented by
eight hex characters. When in PHA data acquisition mode the counts in each channel are
determined by converting the hex code in each eight characters to an unsigned decimal value.
The most significant digit is always the ROI bit, so this bit should be masked when
converting to decimal counts. When in List Mode data acquisition each 32-bit record
consisting of eight hex characters must be interpreted as described in Appendix E.
6)
The full XML format N42 (2012) spectrum content can be loaded using the
GetSpectrumFile function.
string GetSpectrumFile(int iDetIndex)
•
iDetIndex specifies the MCA number (1 or 2)
7) After all operations have been completed then close the detector connection using the
CloseDet function (i.e. WSO.CloseDet())
65