Sunday, April 9, 2017

SecsDriver, the cross-flatform SECS-II driver

1. Overview


The SecsDriver is the SEMI Standard software, implement the E4, E37 and E5 of SEMI Standard. We can use the SecsDriver to communitace with the semiconductor equipment via TCP/IP or RS-232 (COM port). With one SecsDriver, we can control many equipments. (maximum is 32).

OS support:
- Windows
- Linux x86 architecture
- Raspbian for Raspberry Pi ( ARM CPU)

2. How does it work


When the SecsDriver run, it will load:
1. The master config file, specific how many controler (equipment), and detail configuration for each equipment.
2. For each equipment, need 2 files: one for SECS-II message defined, and the other for the control logic (writen by LUA language)

3. Example of the master config

[HOST]
# HOST_TCPPORT: Will open this TCP port for listening.
# The Host will connect to this port to SEND request and RECV data collection report.
HOST_TCPPORT=5555

# HOST_FORMAT: Define format of mesage from HOST. We support XML and JSON
# XML, JSON 
HOST_FORMAT=XML

# SERVICE_TCPPORT: Will be implement later. 
SERVICE_TCPPORT=6666

[CONTROLS]
# CONTROL_COUNT: count of control.
# Each control is the Secs Entity (HSMS or SECS-I) 
# MingwSecs will load from index 0. Ignore from index count
CONTROL_COUNT=2

# Define configuration for each control.
# Type=SECS-I OR HSMS(HSMS-SS)
# DeviceId=n (unsigned short 2 byte): Device ID
# LUA= file name of LUA script file.
# XSML= file name of SML file to define SECS-II message 
# Port: for SECS-I, PORT=0-31 ( 0: COM1, 1: COM2, .... so on...)
#   for HSMS, PORT is the int value. If mode is PASSIVE, will open the listening port.
#            If mode is ACTIVE, will connect to the remote port.
# FOR SECS-I
# Role: value is: Host or Equipment
# T1: Only for SECS-I. T1 timeout
# T2: Only for SECS-I. T2 timeout
# T3: For both SECS-I and HSMS. T3 timeout (wait for secondary message)
# T4: Only for SECS-I. T4 timeout (Inter block timeout)
# RETRY: Only for SECS-I. Retry limit. Value range:(0-31)
# MS: Only for SECS-I. MASTER/SLAVE
# BAUDRATE: Only for SECS-I. BAUDRATE param for RS-232

# FOR HSMS
# Role: value is: Host or Equipment
# IpAddress: only for HSMS-SS. This is the remote IP address
# Mode: only for HSMS-SS, value is: Active or Passive
# T3: For both SECS-I and HSMS. T3 timeout (wait for secondary message)
# T5: Only for HSMS. T5 timeout
# T6: Only for HSMS. T6 timeout
# T7: Only for HSMS. T7 timeout
# T8: Only for HSMS. T8 timeout
# TCA: Only for HSMS. Linktest timeout

#CONTROL 0: HSMS
CONTROL0=Type=HSMS-SS;Log= 0log;DeviceId=0;LUA=lua2.lua;XSML=varian_host.xsml;Port=9000;IpAddress=192.168.1.1;Mode=Passive;Role=HOST;T3=10;T5=60;T6=10;T7=10;T8=10;TCA=5

#CONTROL 1: SECS-I
CONTROL1=Type=SECS-I;Log= 1log;DeviceId=0;LUA=lua2.lua;XSML=varian_host.xsml;Port=1;Role=HOST;baudrate=9600;T1=10;T2=5;T3=10;T4=10;T8=10;retry=3;MS=MASTER

4. Example for equipment  SECS Message Defined

**************************************************
** Stream 1 Abort
**************************************************
S1F0 = S1F0 .

**************************************************
** Are You There
**************************************************
S1F1 = S1F1 input.

**************************************************
** On Line Data
**************************************************
S1F2 = S1F2 output
    <V> .

S1F1 = S1F1 w output
 <L[2]
  <A 'Test eqp'>
  <A 'SecsDriver-1.0'>
 >.

**************************************************
** On Line Data
**************************************************
S1F2 = S1F2 input
    <L>.

5. Example of control logic file

--====================================================
-- PROCESS MESSAGE FROM EQUIPMENT
--====================================================
--====================================================
-- MESRequest
-- THIS FUNCTION WILL BE CALLED WHEN SECSDRIVER RECEIVED
-- MES REQUEST FROM MESCLIENT
-- INPUT: XML REQUEST
-- 
-- example request
-- <mesRequest name="GoOnline">
--     <param name="param1">12</param>
--     <param name="param2">123</param>
--     <param name="param3">124</param>
--     <param name="param4">125</param>
--     <param name="param5">126</param>
-- </mesRequest>
-- 
--====================================================
function MESRequest(xmlRequest)
    print("MESRequest Begin");
    -- print("-RequestName="..requestname);
    print("-XML="..xmlRequest);
    xml = xmlParser( xmlRequest );
    -- print_r( xml );
    requestname = xml[1].xarg.name;
    -- print( "SIZE="..#xml[1] );
    param={};
    for i=1,#xml[1] do
        param[xml[1][i].xarg.name]=xml[1][i][1];
    end
    print( "Request Name: ["..requestname.."]\n" );
    print( "Parameter:\n-----------------" );
    print_r( param );
    print( "-----------------\n" );
 SendRecvMessage( "S6F11_1236_S" );
    print("MESRequest End\n");
end

--====================================================
-- EQPReceived
-- THIS FUNCTION WILL BE CALLED WHEN SECSDRIVER RECEIVED
-- SECS-II PRIMARY MESSAGE FROM EQUIPMENT.
-- 
-- INPUT: 
--    1. s: Stream
--    2. f: Function
--    3. sys: System byte. ( this used for input to
--        the API SendSecondaryMessage()
--====================================================
function EQPReceived(s,f,sys)
    print("EQPReceived Begin");
    print("-S="..s);
    print("-S="..f);
    print("-System Byte="..sys);

 if( f%2==1 ) then
  SendSecondaryMessageByID(s, f+1, sys);
  if( s==1 and f==13){
   print("EQPReceived PROCESS S1F13------------------------");

   SendMessageXML("S1F1 = S1F1_ARE_YOU_THERE_API output W .");
  }
 end
    print("EQPReceived END\n");
end


3 comments:

  1. Please let me know if you're looking for a author for your weblog. You have some really great articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd really like to write some articles for your blog in exchange for a link back to mine. Please blast me an email if interested. Kudos! paypal login my account

    ReplyDelete

  2. Do you have any video of that? I'd care to find out some additional information. hotmail email sign in

    ReplyDelete
  3. Whatever the variable rate is recognized as riskier, it may be advantageous to opt because of this type of loan to reduce the first costs. mortgage payment calculator After use, the amounts are simply added back on the mortgage principal. canadian mortgage calculator

    ReplyDelete

About Me

Work as the developer. c++, cpp, java, c#...
vuzzan@gmail.com

Popular Posts

Search This Blog