INFICON SQC-122 User Manual

Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
Communications with the SQC-122
There are three possibilities for communicating with the SQC-122. The first is a DOS­based terminal program. The next is a 32 bit Windows DLL. The third is a Windows program that can configure and operate the SQC-122.
This simple DOS-based terminal program allows you to send a command and receive a response via the computer’s RS-232 port. The computer’s COM1 port baud rate must be set to match the SQC-122 before the program is run. Source code (SQM-TERM.C) is provided, so it can be customized easily. The command and response strings are detailed in the attached Communications Protocol.
This 32 bit DLL should be placed in your Windows System directory. No Windows registration is needed. The first call should be to InitCom to establish the comm port and baud rate. Functions and their calling convention are listed in the attached SIGMACOM.DLL Functions document.
SQC-122.EXE
This program uses SIGMACOM.DLL to communicate with the SQC-122. It must be installed in Windows using the Setup SQC-122 installation program. It allows you to set film parameters and names, download them to the SQC-122, and perform front panel functions. This program is written in Visual Basic, contact Sigma Instruments if you need the source code for this program.
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
SQC-122 Communications Protocol
The SQC-122 communicates with a host computer via an ASCII based protocol. The instrument defaults to 19200 baud, 8 data bits, and no parity. The baud rate can be changed in the System Menu of the SQC-122, but is always 8 data bits with no parity.
The basic protocol is:
<sync character> <length character> <1 to n data characters> <CRC1><CRC2>
Once a valid command has been transmitted to the SQC-122, a response is returned. The structure of the packet is identical in both the command and response. In the response, the first character is a Response Status. These are summarized in the following table.
Response Letter Meaning
A Command understood, normal response B Command understood, but instrument reset C Invalid command D Problem with data in command E Instrument in wrong mode for this command
The sync character is an exclamation point ‘!’. Anytime this character is received, the communications for that packet is reset. Following the sync character is the length character. This is the number of characters in the packet starting with the length and counting the 2 CRC characters. This character has a decimal 34 added to it so there cannot accidentally be a sync character embedded in the packet. The two character CRC is computed using the following algorithm:
1. The CRC is initialized to 3FFF hex.
2. Each character in the message is examined, bit by bit, and added to the CRC in the following manner:
a) The character is exclusive or’d with the CRC. b) The CRC is shifted right one bit position. c) If the character’s least significant bit is a 0 then the CRC is exclusive or’d
with 2001 hex.
d) Steps b and c are repeated for each of the 8 bits in the character.
The CRC contains 14 significant bits. This is split into two characters of 7 bits each, and then a decimal 34 is added to offset the character outside the range of the Sync
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
Character. See the code example in the SQM-TERM.C file for an example of managing the CRC.
These examples represent the data in unpacked format to better illustrate the function of the specific commands.
Command: @ Parameters: None Description: Returns the model number and software version number. Example: @ SQC122 Ver 1.2
Command: L Parameters: [1..2] Description: Read the current Rate for a channel. Example: L1 A9.32 Channel one’s rate is 9.32 Angstroms/S
Command: M Parameters: None. Description: Read the current Average Rate. Example: M A10.42 Average Rate is 10.42 Angstroms/S
Command: N Parameters: [1..2] Description: Read the current thickness for a channel. Example: N2 A1.187 Channel two’s Thickness is 1.187 Kilo Angstroms.
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
Command: O Parameters: None. Description: Read the current Average Thickness Example: O A2.376 The current Average Thickness is 2.376 kilo
Angstroms.
Command: P Parameters: [1..2 Description: Read the current Frequency for a channel. Example: P2 A5701563.2 Channel two’s current Frequency 5701563.2Hz
Command: R Parameters: [1..2] Description: Read the Crystal Life for a channel. Example: R2 A57.82 Channel two’s remaining life is 57.82%.
Command: S Parameters: None. Description: Zero Average Thickness and Rate. Example: S A
Command: T Parameters: None. Description: Zero Time
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
Example: T A Zeroes time display on unit.
Command: U Parameters: 0 to 33 Description: Controls operation of the SQC-122.
0 = Start Process 6 = Start Process 1 1 = Stop Process 7 = Start Process 2 2 = Start Layer 8-30 = Start Process 3-25 3 = Stop Layer 31 = Soak Hold 4 = Start Next Layer 32 = Zero Thickness 5 = Force Final Thickness 33 = Zero Time
Example: U1 A Starts the first layer of the active process.
Command: V Parameters: None Description: Controls operation of the SQC-122.
0 = Stopped 8 = Soak 2 16 = Start Next Layer 1 = Crystal Verify 9 = Soak Hold 17 = Crystal Fail 2 = Initialize layer 10 = Shutter Delay 18 = Stop Layer 3 = Manual Start Layer 11 = Deposit 19 = Manual Power 4 = Pocket Rotate 12 = Rate Ramp 5 = Ramp 1 13 = Rate Ramp Deposit 6 = Soak 1 14 = Timed Power 7 = Ramp 2 15 = Idle Ramp
Example: U1 A9 Units is in Soak Hold phase.
Command: Y Parameters: None. Description: Read the Power-Up Reset flag. The Power-Up Reset flag is set during
boot-up of the unit and stays set until read through the RS-232 interface.
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
After the flag is read, it is reset and will not be set again until the unit is power cycled.
Example: Y A1 Power-Up Reset flag is set.
Y A0 Power-Up Reset flag is reset.
Command: Z Parameters: None. Description: Set all Film and System parameters to defaults.
Note that this command can take over 1 second to complete
Example: Z A All Film and System parameters are set to defaults.
Sigma
instruments
?
1318 Duff Drive ? Fort Collins, Colorado 80524 ? (970) 416-9660 ? Fax (970) 416-9330
SIGMACOM.DLL Function Descriptions
This dll acts as an interpreter between an application and the SQC122. The dll
transforms function calls to specific command sequences that the unit understands.
Transfer of data to the unit, in general, requires two function calls. The first function call is to transfer the data to the unit. The data to be sent is usually contained in the function’s parameter(s). The second function call is to ChkCommDone. This function call ensures that the data was sent properly to the unit.
Data retrieval requires three function calls. The first function call is used to tell the unit what data is being requested. The second function call is to ChkCommDone. This function call is used to determine when all of the data has been transferred from the unit to the dll or if an error occurred in the communications. The third function call is used to retrieve the data from the dll.
InitComm
Parameters: 16 Bit Integer, 32 Bit Integer
Return : 16 Bit Integer.
InitComm is used to initialize the dll com port. The function’s first parameter is the
com port number to initialize (1 - 99 are valid). The second parameter is the baud
rate for the port. The function returns zero if initialization was successful or a bit
flag to indicate the failure of the initialization :
Example:
bit 0 : Communications Port handle is invalid. bit 1 : Communications Port Set parameters invalid (Baud Rate) bit 2 : Communications Port Set timeouts invalid. bit 3 : Communications Port Set mask invalid. bit 4 : Communications Port Error – Already exists. bit 5 : Communications Port Set Read Thread fail. bit 6 : Communications Port Set Read Thread priority fail.
ReturnVal =InitComm(1,19200) initialize Com1 to 19200 baud if (ReturnVal != 0) if port did not initialize correctly CloseComm() close the port
Loading...
+ 14 hidden pages