Content

Scrip Instruction
Sect 1 field indicates the command. The following list is the command group.
Prefix related to log file naming.
Picture Load picture Section.
Delayms Delay ?ms command.
ITTS
Position&Size , Start Conditions ,
Message SEND , control multi-iTTS. send message in between
Show Pass Fail , PASS TIMER
Variable
Field_Show
Field_Proc
compare / calculate / assignment variable ....
Share Memory
TPE:
Scrip File editor flow control control command.
please refer to TestPlanEditor.CHM
Expression Process 9+8*7+(6+5)*(4+-1*2+3)+SIN(1)*100+2^3
Smart Format &XXX reserved word
Change Format ['XXX':S([1][2])] ['XXX':X1610([all])]
"{}" Brace process
Pass Fail Judgment example
DLL
DLL Load
DLL Execute
DLL Free
VERSION CHECK
END End the test.
Clean Data Clean program register and screen.
Barcode


Parameter

Variable function
Description:
This function allow you to assign variable ( a floating point value or string) and using some operon (+ - * / ) to calculate or process it.
Section1:
Variable
Section2:
variable name
example:
A, A2, AAA, BBB, xxx, abc,..... ( some of reserve word can't be assign as a variable)
if there is brance "{}" inside the process string please refer to Brance process
reserve word:
Field_Proc
Field_Show or
Date_Proc ( see more help Example 4)
&xxxxx ( start with "&" character ) => see more help Smart Format

ITTS_xxxx ( start with "ITTS_" character ) => see more help for ITTS share memory

Command :
Str=:Assign string to an Variable ( but not suport >,<,>=,<=,== function)  (see example 0)
=:Assign variable =some value. (Extend function:please see Example 5)
Remark:
num of variables: limited under 256
name length limited under 64
variable type is Double (range from : 5.0 x 10^-324 .. 1.7 x 10^308)
num of string variables limited under 256
name length limited under 64
string variables string length : no limited
abs: variable =ABS(P3),  absolute value
+:variable = P3+P4
-:variable = P3-P4
*:variable = P3*P4
/:variable = P3/P4
AND  : variable = P3 and P4  ( only allow integer). 0x01 and 0x10 => 0x00
OR  : variable = P3 or P4  ( only allow integer).      0x01 or 0x10 =>0x11
XOR  : variable = P3 xor P4  ( only allow integer). 0x11 xor 0x10 =>0x01
    NOT : variable = NOT( P3)  ( only allow integer)
P4:  show number of nibbles.
P3= 0x0011, p4 =4    =>65518 (0xFFEE, )
MIN:variable =MIN(P3,P4)
MAX:variable =MAX(P3,P4)
CTF:variable = SQRT(P3*P4)  , formula to get center frequency
POWER: variable = power(P3,P4)  ,
SQRT:variable = SQRT(P3) , sqrt (2) = 1.414
>:Judgement bigger
<:Judgement smaller
>=:Judgement equal or bigger
<=:Judgement equal or smaller
==:Judgement equal
<>:Judgement not equal
P1 ( Parameter 1): min spec
P2 ( Parameter 2): max spec
P3 ( Parameter 3): Could be a Smart format
P4 ( Parameter 4): Could be a Smart format

Example 1:
Description | Test Item
Section1 | Variable
Section2 | stringA
Command | Str=
min |
max |
value3 | ["AAA"+"BBB"]
Example 2:
Description | Test Item
Section1 | Variable
Section2 | A
Command | =
MIN | 158
MAX | 158
value3 | 0xFF0/0xFF+1010.b+ROUND(sin(1.5)+100)+ ABS(-1)+INT(1.9)+ROUND(1.6)+log10(10^4)+ log2(2^4)+max(1,2,min(3,4,5))+(1<<4)
P4 |
Example 2:
Description | Field_Process
Section1 | Variable
Section2 | Field_Proc
Command |
FieldName | Field1;Field2
FailAction |
Min |
Max |
value3 | ['Field1';'Field2']
Example 3:
Description | Field_Process
Section1 | Variable
Section2 | Field_Show
Command |
FieldName |
MIN |
Max |
value3 | ["AAA"+'Field1']
P4 (color) | $FF0000
P4 (Font size) | 25
Field_Proc:
get specific PIS result field and do some process (could be a smart format )
See Example 2
support multi field format but you must put value3 as ["f1_value;f2_value;f3_value"] instead of f1_value;f2_value;f3_value.
Field_Show:
Command: 1 or 2
1: show on bottom of image area
2: show on above of 1's area
value3 Show information (could be a smart format ) on bottom of image area.
value4 to set color, default is black (if value4 not exist)
value5 to set Font Size, default is 16 (if value5 not exist)
Date_Proc:
Date + ? days or Date - ? days
Command: "+" or "-"
Value 3: Date, "20031119" means 2003/11/19
Value 4: ? day , 365 means 365 days
Result = Value 3 + Value 4 ( date + days)
or
Result = Value 3 - Value 4 ( date + days)
Depending on sign of command
See example 4
[color #]
Black = $000000
Maroon =$000080
Green = $008000
Olive = $008080
Navy = $800000
Purple = $800080
Teal = $808000
Gray = $808080
Silver = $C0C0C0
Red = $0000FF
Lime = $00FF00
Yellow = $00FFFF
Blue = $FF0000
Fuchsia = $FF00FF
Aqua = $FFFF00
LtGray = $C0C0C0
DkGray = $808080
White = $FFFFFF
See Example 3
Example
example: field_proc
example: variable assign
example: variable field_show
example: variable expression
expression related Expression_Process.


TPE

Embedded Command

Section1: TPE
Section2: Stack

Command:

The TPE will have one command in section2:  Stack which has four commands:  Goto, Save,Back,Next, Next Grupe, Call.

1.Goto
Purpose: Jump to the specific Node.
Value3: The name of the Node you want to jump.
If it can not find the string in the Scrip tree, this command would fail.
The string can be smart format.goto to some where out of 4 main section. you must use stack save (do something) then stack back or stack next to back to previous line index.

2.Save
Purpose: Push the Node ID, which is executed just before this node and is TPE non-embedded command, into Nodes Stack.
Nodes Stack will maintain by the Scrip Editor software and will be cleared when each time the main program execute the Scrip.

3.Back
Purpose: Go back to the Node ID in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

4.Next
Purpose: Go back to the Node ID +1 in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

5.NextGroup
Purpose: Go back to the next Group of the Node ID in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.

6.Call
Purpose: Push the next executable Node ID into Nodes Stack and jump to the specific sub-function (Group) . In that group, you should call at the last command to go to next executable node.
If it can not find the string in the Scrip tree, this command would fail.
following command will be:  back

Example
Description | stackcall | stackNextGroup
Section1 | TPE | TPE
Section2 | Stack | Stack
Command | Call | NextGroup
min |  |
max |  |
value3 | Label Name |
Example
Description | stacksave | stackback | stacknext
Section1 | TPE | TPE | TPE
Section2 | Stack | Stack | Stack
Command | Save | Back | Next
min |  |  |
max |  |  |
value3 |  |  |

Example

example: tpe stack call function

funciton must put outside of 4 main groups

Example Scrip, click copy and paste to ScripEditor.

example: Scrip call and back
example: Scrip fail action and back action


UTS

ITTS
Section1: ITTS or UTS
Section2:
Fa il
let ITTS test fail
Run
RUN test plan
EXIT
Exit ITTS
Pass Fail Show
show information on Pass/ fail dialog box support smart format
the default show string is UID filed contents. ['UID']
example:
Value3 : "['&VAR:UID2']"
Live_DB_Upload
force black jack enable & intranet connection must enable.
if V3=0 Local PC will save to temporary file when BJ not connected.
if V3=1 Local PC must connect to BJ or current test result will be fail and ,in the local PIS file, the current record will have pass fail flag with "DF_" Prefix.
Show Pass Fail
show pass fail dialog box earlier.
if V3=0 hide the pass fail dialog box immediately
if V3=1 Show the pass fail dialog box immediately
Position&Size
Value3: Left position
Value4: Right position
Value5:Width
Value6:Height
Value7: alwaysontop setting 1:true, 0: fail
Value8: keep Minimize setting 1:true, 0: fail
return value: Desktop Width; Desktop Height; Monitor Width; Monitor Height;
if value3=AUTO, all ITTS will arrange the windows size and position automatically
Example: Position&Size

Example Scrip, click copy and paste to ScripEditor.

PASS_TIMER (support since ver 2.7.10.11)
Value3: time ( mini-second )
example:
value3 : 5000 ==>show Pass dialog box only 5 sec.
value3 : 0 ==>show Pass dialog box all the time until next test or ESC was pressed.
value3 : -1 ( < 0 ) ==>Hide Pass dialog box immediately (useful for start condition )
value4 : 1 ==>if fail, need to press ESC key before start new test.
value5 : 1 ==>if fail, the fail dialog box will keep showing. not hide when pass timer appear.
Start Conditions
Adjust Start Conditions interval time,
Disable Start Conditions
value 3: 1 : force enable START CONDITIONS
0 or none 1 value : force Disable START CONDITIONS
value 4: 300 mS
Setting / Adjust start conditions interval time
Explain: ITTS will run Start Conditions automatically, start conditions interval time =300 mS
if [ Start Conditions ] exist and ITTS testing result =PASS, ITTS will start the [ Start Conditions ] checking,
if you want to stop [ Start Conditions ], just uncheck the "Repeatedly" on main form of ITTS.
MODE
set ITTS UI MODE
value3:
1: MP Mode
2: Operator Mode
3: Engineer Mode
Example: Engineer mode, Example Scrip, click copy and paste to ScripEditor.
Message
Link: Message


copy scrip template

Braces Process

brace is: {}

Brace could use in
variable assignment
Expression process
smart format process

when each process string has brace appear, it will send this formation to brace process to pre-process the formation

Example:
variable assignment:
A{1}=1 means A1=1
B{['&VAR:A1']}=200
==> B{1} ==200
==> B1=200
smart format :
S1:STR=ABCD (string variable S1=ABCD
A1=1
A2=4
['&STR_VAR:S1':S([{['&VAR:A1']}][{['&VAR:A2']}])]
==>['&STR_VAR:S1':S([1][4])]
=AD

expression:
S{['&VAR:A2']}:STR=['&STR_VAR:S1':S([{['&VAR:A1']}][{['&VAR:A2']}])]
S4:STR=['&STR_VAR:S1':S([1][4])]
String variable S4=AD

Example
example: Scrip1 assign variable a0~A9 as 00~90
example: Scrip 2
example: Scrip 3
example: Scrip 4


barcode

Barcode display function

Section 1
Barcode
Commands:
Show / Hide
value3
the string you want to show
value4
type of QR_code
case value4 of
0:
QRCodeEncoding := qrAuto;
1:
QRCodeEncoding := qrNumeric;
2:
QRCodeEncoding := qrAlphanumeric;
3:
QRCodeEncoding := qrISO88591;
4:
QRCodeEncoding := qrUTF8NoBOM;
5:
QRCodeEncoding := qrUTF8BOM;
else
QRCodeEncoding := qrAuto;
end;
example: show barcode

Example Scrip, click copy and paste to ScripEditor.

example: hide barcode

Example Scrip, click copy and paste to ScripEditor.


Change Format
Similar with smart format
support other's DLL call,
DLL can sent original string and now format formula to ITTS. ITTS will process those and send back to DLL
for example:
Original string ="1234567890abcdWXYZ"
format formula =S([1][2][3][4][5][6][7][8][9][10])
Process result::"1234567890"
format formula =S([ALL])
Process result::"1234567890abcdWXYZ"
format formula =S([1..5])
Process result::"12345"
format formula =S([1..-1]) //from 1 until last 1
Process result::"12345"
format formula =S([1..-6]) //from 1 until last 6
Process result::"1234567890abc"
format formula =S([-6..-1]) //from last 6 until last 1
Process result::"cdWXYZ"
format formula =S([1][2][3][4][5]);S([1][2][3][4][5])
Process result::"12345;12345"
format formula =S([1][2][3][4][5];[1][2][3][4][5])
Process result::"12345;12345"
format formula =S([11][12][13][14])
Process result::"abcd"
format formula =U([11][12][13][14])// upper case
Process result::"ABCD"
format formula =S([15][16][17][18])
Process result::"WXYZ"
format formula =L([15][16][17][18])//lower case
Process result::"wxyz"
format formula =LEN([all])//length of string
Process result::"18"
format formula =V10([1][2]) //decimal
Process result::"12"
format formula =V16([1][2]) //hex
Process result::"18"//1*16^1 +2*16^0
format formula =V2([1][2]) //binary
Process result::"4" //1*2^1 +2*2^0
format formula =X1610([1][2]) //16 base to 10 base
Process result::"18"
format formula =X1608([1][2]) //16 base to 8 base
Process result::"22"
format formula =X1602([1][2]) //16 base to 2 base
Process result::"00010010"
format formula =X1016([1][2]):4 //10 base to 16 base fill with 4 digit
Process result::"000C"
format formula =A10([1][2][3]) //Change String to ASC Code No. 1=ASC 49
Process result::"495051"
format formula =A16([1][2][3]) //Change String to ASC Code No. 1=ASC =0x30
Process result::"313233"
format formula =C16([3][1]) //Change ASC Code No. to String = ASC code 0x31 ="1"
Process result::"1"
format formula =C10([6][5][6][6][6][7]) //Change ASC Code No. to String = ASC code 65 ="A"
Process result::"ABC"
format formula =CRC([1][2] [3][4]) // Calculate the CRC 16 bit
format formula =CRC16([1][2] [3][4]) // Calculate the CRC 16 bit
Process result::"0EC9"
format formula =CRC8([1][2] [3][4]) // Calculate the CRC 8 bit
Process result::"57"
CRC calculation describe in : FWS-762967-0000
page 19: 16 bit CRC
page 21: 8 bit CRC
New CRC for all 8 and 16
format formula =CRC_8_FF_00_1D_1_1([all]) = CRC8([all])
| | | | +- reverse result bool
| | | +----Reverse_data Bool
| | +-----Polynom
| +------Final xor
+--------- ini value
format formula =CRC_16_FFFF_0000_1021_0_0([all]) =CRC16([all])
| | | | +- reverse result bool
| | | +----Reverse_data Bool
| | +-----------Polynom
| +------Final xor
+--------- ini value
format formula =CRC_16_FFFF_0000_1021_0_0([all]) (CRC16/CCITT)
format formula =LRC([1][2] [3][4]) // Calculate check sum checksum
Process result: "BA"
format formula =MD5_Str([1][2][3][4]) // Calculate MD5 of string you giving
Process result: 81DC9BDB52D04DC20036DBD8313ED055
format formula =MD5_File(full_path_filename) // Calculate MD5 of file you giving
format formula =M2(#h[1][2],) // extract 2 character form original string, mask and repeat until string empty
Process result::"#h12,#h34,#h56,#h78,#h90,#hab,#hcd,#hWX,#hYZ,"
Separator change 1:
Original string ="123,456,789,0abc,dWXYZ"
as T44([ALL]) ASC (44)= ','
then T44([ALL]) return '123;456;789;0abc;dWXYZ;'
Separator change 2:
Original string ="123 456 789"
as T32([ALL]) ASC (32)= ' '
then T32([ALL]) return '123;456;789;'
'R': remove specific character form result 123_456_789, R95([ALL]) ==> 123456789;
This function is for converting the integer to the ASCII code
such as R44([ALL]) ASC (44)= ','
such as R32([ALL]) ASC (32)= ' '
such as R95([ALL]) ASC (95)= '_'
Example:
if [ALL]= '123,456,789,' then R44([ALL]) return '123456789;'
if [ALL]= '123 456 789,' then R32([ALL]) return '123456789;'
Bit Select:
Example:
Original String: "AB" (10101011 )
S([2:3210][1:3210]) ==> "10111010"
S([2:0123][1:3210]) ==> "11011010"
S([2:10][1:32]) ==> "1110"
X0216([2:3210][1:3210]) ==> "BA"
X0210([2:3210][1:3210]) ==>186
['Keylist':S(['&var:i']['&var:j'])]
['Keylist':S([2]['&var:j'])]
['Keylist':S([2:3210]['&var:j'])]
['Keylist':S(['&var:j':3210])]
['Keylist':S(['&MACHINEID'])]
Example:
a0,a1,a2 are the FieldName.
['&Str_var:MapTable':s(['a2']['a1']['a0'])]
Str_Var CryptoSelectString = ["S([151][152][154][155])"]
Str_Var KBCryptoKey = ['KBDataBuffer':'&Str_Var:CryptoSelectString']
['&STR_VAR:SA':V10(['f2']['f1'])]
['&STR_VAR:S':X1610(['f3']['f2']['f1'])]
['Test3':s(['f3']['f2']['f1'])]
if there is brace "{}" inside the process string please refer to Brace process


Debug
Trigger Setting (will be obsolete )
Example:
Setting Trigger on PCI6025
Port A, Bit 0;
Sect 1: 'Debug'
Sect 2: 'Trigger'
Command:'Setting'
Value 1:
Value 2:
Value 3: 'PCI6025'
Value 4: 'A:0'
Set Scrip File item with toggle point. Test system will toggle this IO pin from low to high or from high to low


Delayms
Section 1
Delayms
Section 2
--
Commands:
--
Description:
Delay ? mS
Syntax:
Section1: delayms
value3= ?ms (also support smart format )
Example
-------------------------- | -------------------- | ------Example----
Section1 | Delayms |
Section2 |  |
Command |  |
FailAction |  |
FieldName |  |
FieldNumber |  |
ErrorCode |  |
RetryTimes |  |
RetrySDelay(ms) |  |
Parameter: |  |
Min |  |
Max |  |
Delay(ms) | Delay ?ms | 100
Value4 |  |


DLL Execute
EXECUTE the DLL function will depend on the DLL itself.
Each DLL could ask AP for parameter to do specific test or setting
Example:
Min/Max value could be a Smart format,


DLL Free
Free DLL
Free a specific DLL
if Command field is empty AP will free all DLL
Examole:
Example
example: Scrip1


DLL Load
Load DLL ( Dynamic Link Library) in order to perform a test just like the way in FT
Min: DLL minimum version requirement
Max:DLL maximum version requirement
if DLL version =1.0.0.1 system will translate to ==>01000001
if DLL version =2.1.3.4 system will translate to ==>02010304
Examole:
Dll name field could be a smart format
For example: ['&TestPlanPath'+"ITTS_HASH.DLL"]
example: ITTS_RUN_AP.dll
example: UTS_Drivers.dll
example: ITTS_MD5.dll
example: Scrip 4


DLL VERSION CHECK
Use this function to check specific DLL (even not belong to UT'S) version.
DLL
VERSION CHECK
Example
example: Scrip1
example: Scrip 2


End

Begin/End
Section 1
Begin/End
Section 2
--
Commands:
--
Description:
Begin: Test system will run start from here next time. (will be obsolete )
End:Test system will stop immediately if End appear , ( useful for debug)
Syntax:
Sect 1 | Sect 2 | Command | Description | Value 1 | Value 2
31 | End | -- |  | -- | -- | --
Value 3 | Value 4 | Error Code | Skip | Field Name | Field No.
-- | -- | -- | -- | -- | --
Examples:
�Antu_dual-usb , Antu_Dual , boogie_rf , Minnow_ww , Napoleon_2ch , pumori , shark2ch
Sect 1
Begin
Sect 1
End


Expression Process
What is Expression:
9+8*7+(6+5)*(4+-1*2+3)+SIN(1)*100+2^3 <======= that is expression
ITTS support expression when:
1: variable assignment
2: the field of "Process" exist expression value

Expression support following operator:
+ - * / ^
> return 1 if true return 0 if false
< return 1 if true return 0 if false
>= return 1 if true return 0 if false
<= return 1 if true return 0 if false
== return 1 if true return 0 if false
<> or != not equal return 1 if true return 0 if false
>> shift right n bit 4.61168601842739E18>>62 =1
<< shift left n bit (n<=62) 1<<62 = 4.61168601842739E18
&& AND test, return 1 if both result<>0 return 0 if one of data =0
|| OR test,return 1 if one of data <>0 return 0 if both of data =0
sin(), cos(), tan()
arcsin(), arccos(), arctanh()
( )
ABS()
INT(1.6)=1
ROUND(1.4)=1
ROUND(1.5)=2
ROUND(2.5)=2
ROUND(3.5)=4
FRAC(1.6)=0.6
EXP(1)=2.71828182845905
LOG10()
LOG2()
Ln()
x0210(1010)=10 bin to dec
x1610(10) =16 hex to dec
AND
OR
XOR
nnnnn.b =binary of (nnnn)
Array process to manage array data
MIN(v1,v2,v3....)
take minimum value from those values.
v1,v2,... could be an expression also
example: MIN(1,2,3) =1
MAX(v1,v2,v3....)
take maximum value from those values.
v1,v2,... could be an expression also
example: MAX(1,2,3) =3
example: MAX(['&VAR:v1'], ['&VAR:v2'], ['&VAR:v3']+900)
AVG(v1,v2,v3....)
calculate the average value from those values.
v1,v2,... could be an expression also
example: AVG(1,2,3)=2
CNT(v1,v2,v3....)
return the total count of variable
example: AVG(1,2,3,5)=4
STDEVP(v1,v2,v3....)
calculate The "Population Standard Deviation
example: STDEVP((1,2,3,4,5,6,7,8,9,10)=2.872281

STDEVS(v1,v2,v3....)
calculate The "Sample Standard Deviation"
example: STDEVS(1,2,3,4,5,6,7,8,9,10)=3.02765

SORT(v1,v2,v3....); // this is an experimental formula please don't use.
sorting from low to high
example: SORT(10,2,3,9,7,4,5,6,8,1)=1,2,3,4,5,6,7,8,9,10

POS(sub_str,main_str,v_start_search_pos)
search the sub string's position match in main string, search position starting form v_start_search_pos, ignore v_start_search_pos search will starting form 1
sub_str and main_str only support smart format, not support expression,
v_start_search_pos could be an expression
example: POS(ccc,aaabbbcccddd,1)=7
example: POS(["ddd"],["aaabbbcccddd"]) =10
SIN()
COS()
TAN()
ARCCOS() ARCCOS(0) = 1.5707963267949 = (pi/2)
ARCSIN() ARCSIN(1) = 1.5707963267949 = (pi/2)
ARCTANH()
0xFF=255
0xFFFFFFFF = -1 ( expression use sign int64 to convert )
0x80000000 = -2147483648 ( expression use sign int64 to convert )
0x7FFFFFFF = 2147483647
in ITTS, expression support smart format.
also you could direct assign expression to variable or string variable :
A=1+2+3+4 variable A=10
B:Str=ABCDE string variable B=ABCDE
For this feature, you could direct assign some of result data to variable in same test item, don't to add additional test item assign the field value to variable
Example:
assign variable
a=100,
str1:str=FF
['&VAR:A']+['&STR_VAR:str1':x1610([all])] +1 = 356
if there is brance "{}" inside the process string please refer to Brance process
Example for variable assignment:
Example 1
variable a1 will assigned as 18
Example 2
Expression also could work with smart format
a2 = 10 + a1 (in Example 1, a1 was assigned as 18 )
=10+18
=28
Example 3
multiple variable assignment
you could assign many variable in one single test item.
a1=1+2+3=6
a2=2
a3=3+a1 = 9
Example 4
Process the field
the field of Process existing x1002(['&var:a1']):8 this will change value3 to binary code with 8 digit
PIS field data of a1_as_bin = 00000110 ( if a1=6 )
Example 5
work with smart format : '&ANS' and '&F:n'
final answer=100+1=101
variable assignment:
a1 = 1 , a2 = 2 , a3 = 3
final answer in Pis result fieeld:
x1 in field 9 = 3 (expression ['&F:3'] will get the 3'rd pos of answer "1;2;3" =3 )
x2 in field 10 = 2 (expression ['&F:2'] will get the second pos of answer "1;2;3" =2 )
x1 in field 9 = 11 (expression ['&F:3'] +10 will get the first pos of answer "1;2;3" =1 then + 10 =11)
Example 6
Direct assign answer to variable
Take the answer then calculate with expression
also assign the processed answer to variable a1
PIS field x =101
variable a1=101
Example in Delphi
in ITTS
converter_value= ['&STR_VAR:EP':X1610([1][2][3])]
// it should be setting in ITTS ini section
in Delphi
Btn_str := 'EP:str='+Btn_str; // ex: EP:str=FFF
strcopy(pContent, PAnsiChar(Btn_str));
lAccessMain(pContent, 1024, PAnsiChar(Btn_str), Expression_Process); // let ITTS get the information EP=FFF
lAccessMain(pContent, 1024, PAnsiChar(converter_value), Expression_Process); // process
s1 := pContent; // s1 is the process result


Message / Multiple ITTS application

ITTS could accept message form other's AP since version 2.3.0.8
Section 1: ITTS or UTS
Section 2: Message
Command: SEND
value 1: MIn
value 2: Max
value 3: Handle, the others ITTS handle number that you want to send
value 4: command type
value 5: sub command
value 6: Label string
command type:
001 run ITTS ( some other AP send message, ask ITTS to run)
101 run ITTS one node (sub command :node number in that target ITTS test plan
201 run ITTS from node Value 5 (sub command :node number in that target ITTS test plan
3nn get node ID by test plan label ( value 6)
label string will store in ITTS global share memory ITTS_G_S_MEMnn (nn=1..64)
target ITTS will get the label string form ITTS_G_S_MEMnn to search his test plan, return the Node ID
40n
401 arrange ITTSn's position as best arrangement ( for multiple ITTS widows arrangement )
402 set ITTS to normal size 780* 620
41x (ITTS 20.13.12.05 or later)
410
minimize ITTS UI
411
restore (show ITTS UI from minimum )
412
maximum window size
501 get others ITTS status
// 0: dead
// 1: ready
// 2: running
related link : share memory
Example | Example 1 | Example 2 | Example 3 | Example 4
Section 1 | ITTS | ITTS | ITTS | ITTS
Section 2 | Message | Message | Message | Message
Command | SEND | SEND | SEND | SEND
Value 1 (min) |  |  |  |
Value 2 (max) |  |  |  |
Value 3 | ['&ITTS_1_HANDLE'] | ['&ITTS_2_HANDLE'] | ['&ITTS_3_HANDLE'] | ['&ITTS_4_HANDLE']
Value 4 | 001 | 101 | 201 | 310
Value 5 |  | 112 | 112 |
Value 6 |  |  |  | X_Label001
Explain | ask ITTS1 run | ask ITTS2 run node 112 only | ask ITTS3 run start from Node 112 | ask return node id of ITTS4 test plan's X_Label001
Example1
Example2
example: Scrip 3


Pass Fail Judgment
This page will describe how ITTS judge pass or fail, please see following example
Case 1:
value:1, 1.01 or ... value between 1 and 2
min:1
max:2
result: Pass
Case 2:
value:1.01
min:1
max:2
result: Pass
Case 3:
value:1
min:1
max:none
result: Pass (if there is no max value, ITTS thought it just like a string,use String compare )
Case 4:
value:["A"]
min:["a"]
max:none
result: Pass (if there is no max value, ITTS thought it just like a string & no case sensitive)
Case 5:
value:A
min:a
max:none
result: Fail (ITTS thought it just like a string & case sensitive)
Case 6:
value:QWERT
min:["XXXXT"]
max:none
result: Pass (ITTS will just compare "T" & ignore "XXXX"
Case 7:
value:0123
min:["xxx3"]
max:none
result: Pass (ITTS will just compare "3" & ignore "XXX"
Case 7:
value:0123
min:["xxx$"]
max:none
result: Pass (ITTS will just compare "$" (none zero value) & ignore "XXX"
Case 7:
value:0123
min:["$123"]
max:none
result: Fail (ITTS will just compare "$" (none zero value)


Picture

Section 1
Picture
Section 2
--
Commands:
Load , Clear, Load Status Picture, Clear Status Picture
TextOut,OPTIMIZE
Description:
The action to the specific picture.
Load: load picture. picture support file format JPG. BMP
clear: clear picture
Load Status Picture: instruction Picture under MP mode, picture support file format JPG. BMP,GIF ITTS will search
.\ resource\[language path]\*.* under ITTS directory.
picture has :
enter.gif
Load.gif
unload.gif
plug.gif
unplug.gif
enter.gif
wait.gif
clear Status Picture: clear Status picture
language path is : ENG, CHS, Default ....
or Optimize
: the picture name.
if Command is Optimize, val3= 1 or True. ITTS will enlarge the Picture area
set Val3 = 0 or False , ITTS will change back to default picture area.
Examples:
------------------------------ | ----------------------- | ------Example------
Section1 | Picture | Picture
Section2 |  |
Command | Load | Clear
FailAction |  |
FieldName |  |
FieldNumber |  |
ErrorCode |  |
RetryTimes |  |
RetrySDelay(ms) |  |
Parameter: |  |
Min |  |
Max |  |
Value3 | ['&TESTPLANPATH'+"Plugin.BMP"] |
Value4 |  |
Value3 could support Smart Format
------------------------------ | ----------------------- | ------Example------
Section1 | Picture | Picture
Section2 |  |
Command | Load Status Picture | Clear Status Picture
FailAction |  |
FieldName |  |
FieldNumber |  |
ErrorCode |  |
RetryTimes |  |
RetrySDelay(ms) |  |
Parameter: |  |
Min |  |
Max |  |
Value3 | unPlug.GIF |
Value4 |  |
TestOut:
---- | ----------------------- | ------Example------
Section1 | Picture | Picture
Section2 |  |
Command | TextOut | TextOut
FailAction |  |
FieldName |  |
FieldNumber |  |
ErrorCode |  |
RetryTimes |  |
RetrySDelay(ms) |  |
Parameter: |  |
Min |  |
Max |  |
Value 3 text X position |  | 100
Value 4 text Y position |  | 100
Value 5 font name | Wingdings | Wingdings
Value 6 font size |  | 110
Value 7 font color BGR |  | $00ff00
Value 8 bk color BGR |  | $888888
Value 9 character |  | ['&STR_VAR:P_code':C16([all])]
color format $BBGGRR (blue green red)

Example Scrip, click copy and paste to ScripEditor.

Example1: picture text out

example: Load / clear picture


Prefix
Set the PIS prefix file name.Setting PIS log file prefix name. (also include Scrip File version, Owner, release date, Scrip File file name information
Value1: Prefix Name (SCOPE_LT)
Value2: Product Part Number (810-000033)
Value3: Scrip File (ini) Part Number and Information (700-000250 028,%V,%O,%D,%N,)
Value4: Primary Dir. Example: ['&CSVPrimaryDrive'+"\bbb"] (will be obsolete )
Value5: Secondary Dir. Example:['&CSVSecondaryDrive'+"\"] (will be obsolete )
if Value1=UNIONXML
Today's date: 2002 /12 /12
PC name:
if PC name's last 4 digits are hex code. it will direct to use on log file name last two combination.
For example: pc name is xxxAB12 => &productionlineid is AB, &machineID=12
Log file, File name will be UNIONXML_021212_AB_12.CSV
if PC name's last 4 digits are not hex code. ITTS will translate to hex code
For example: pc name is QQQQwxyz
PIS_Production_Line="wx"
PIS_Machine ="yz"
i := ABS(((ord(PIS_Production_Line[1]) - 64) * 10 + (ord(PIS_Production_Line[2]) - 64))) mod 256;
PIS_Production_Line := inttohex(i, 2);
i := ABS(((ord(PIS_Machine[1]) - 64) * 10 + (ord(PIS_Machine[2]) - 64))) mod 256;
PIS_Machine := inttohex(i, 2);
PIS_Production_Line="FE"
PIS_Machine ="14"
Log file, File name will be UNIONXML_021212_FE_14.CSV
Special Format for Value3:
if Value3= "700-000250,INI Date:,%D,INI Owner:,%O, INI Name:,%N,"
PIS will save as:
781234-1123,INI Date:,2002/12/5 17:42,INI Owner:,Vincent Cheng, INI Name:,D:\data\delphi\myproj\mouse\bon-xp\gpib_dll.tpe,
%D: System will translate Scrip File saved day.
%N:System will translate Scrip File full Path and name.
%O:System will translate Scrip File Release Owner.
%V:System will translate Scrip File Version Number.
Value4: ['&CSVPrimaryDrive'+"\bbb"]
Value5: ['&CSVSecondaryDrive'+"\"]
CSVPrimaryDrive & CSVSecondaryDrive setting on PIS Page
if CSVPrimaryDrive = c: then ['&CSVPrimaryDrive'+"\bbb"] = "c:\bbb"
if CSVSecondaryDrive= c: then ['&CSVSecondaryDrive'+"\"] = "c:\"
Those two parameter (CSVPrimaryDrive/CSVSecondaryDrive )will save in ITTS.ini
Primary Dir. default value = c:\aaa
Secondary Dir. default value = c:\
Those two parameter will change and save to PIS.INI once prefix command setting another new value.
Those information will save in Log file title block.
Examples:
------------------------------ | ----------------------- | ------Example------
Section1 | Prefix | Prefix
Section2 |  |
Command |  |
FailAction |  |
FieldName |  |
FieldNumber |  |
ErrorCode |  |
RetryTimes |  |
RetrySDelay(ms) |  |
Parameter: |  |
INI P/N |  | 8xxXXX-00XX
INI P/N |  | 780XXX-00XX,Ver:%V,Owner:%O,Date:%D,FileName:%N
Primary Dir |  |
Secondary Dir |  |
: the string which specify the prefix name of the pis file.


Share Memory
Purpose: share memory in between ITTS and other AP even others ITTS
&ITTS_Number : return the ITTS(n) under run.
&ITTS_Count: return the total number of ITTS is opening.
&ITTS_n_Handle: return ITTSn's handle number
&ITTS_n_testplan_name: return ITTSn's Scrip File name
ITTS_G_S_MEMn (n=1..64): return the value in ITTS global memory (original is 1..10 change to 1..64 since 2.10.8.7)
ITTS_P_S_MEMn (n=1..8): return the value in ITTS private memory ( each ITTS has his own private memory )
if current ITTS number is 1. assign ITTS_P_S_MEM =ITTS_P_S_MEM1
if current ITTS number is 2. assign ITTS_P_S_MEM =ITTS_P_S_MEM2
...
ITTS_G_S_MEMn and ITTS_P_S_MEMn could treat as variable or string variable (String length<128)
Reference:
Data type:
num_of_global_mem =64;
max_of_ITTS_allow =8 ;
type
Share_Memory_csv_sno = record
Share_Mem_csv_name: array[0..127] of char;
Share_Mem_sno: integer;
end;
type
Share_Memory_UTS = record
Share_Mem_UTS_num: byte;
Share_Mem_UTS_handle: integer;
Share_Mem_UTS_tp_name: array[0..255] of char;
Share_Mem_private_data: array[0..127] of char;
end;
type
Share_Memory_Public_data = record
Share_Mem_Public_data: array[0..127] of char;
end;
type
Share_Memory = record
csv_sno: array[1..max_of_UTS_allow] of Share_Memory_csv_sno;
UTS: array[1..max_of_UTS_allow] of Share_Memory_UTS;
Public_data: array [1..num_of_global_mem] of Share_Memory_Public_data;
end;


Start Conditions

Start Condition

Start Condition is Advance technique to handle the ITTS start test in Scrip file

If test scrip file has been tested and pass test at the end.

and test scrip contents start condition section group.

ITTS will run start condition section once after finished test.

if all section in start condition is pass. ITTS will run the test scrip again.

by using the feature. test system could start test triggered by some of test condition. (external hardware button, time condition, signal form outside)

for more information, please check the test scrip example.


Trackbar

Section 1
Trackbar
Section 2:
Setting
Value
Hide
Setting:
value1:TrackBar.min
value2: TrackBar.max
value3: TrackBar.selStart
value4: TrackBar.selEnd
value5: TrackBar.Position = (Test_items.value3 + Test_items.value4) / 2;
Value:
TrackBar.Position :=Test_items.value3
Hide: Hiding the trackbar
Example
example: Trackbar setting
Example Scrip, click copy and paste to ScripEditor.
example: Trackbar show
Example Scrip, click copy and paste to ScripEditor.


Clean Data
Command:
--
Description:
Clean program register and screen. (will be obsolete )
Syntax:
Sect 1 | Sect 2 | Command | Description | Value 1 | Value 2
Clean Data |  | -- | -- | -- | -- | --
Value 3 | Value 4 | Error Code | Skip | Field Name | Field No.
-- | -- | -- | -- | -- | --


Smart Format
String process , Min/Max , parameter value could be a smart format,
for Example:
Input = ["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"]
if test result field A:= "1B 24 43 02 99 05"
then Output = "aaa 5 bbb!"
please refer Change format to check the means of "V10"
["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"]
="aaa " +9905 - 9900 +"bbb!"
=aaa 5 bbb!
if there is brance "{}" inside the process string please refer to Brance process
More IN/Out example:
Input | Output
["aaa " + 'field_A':V10([13][14][16][17])-9900 +" bbb!"] | aaa 5 bbb!
[ 'Field_A' ] | 1B 24 43 02 99 05
12345 | 12345
['field_A':S([1][2])] | 1B
V10([13][14][16][17]) : Decimal of those character ( only allow number )
S([1][2])  : Get String's 1st & 2nd character ( see more detail)
Remark:
'field_A' Could be another option:
'&Today+10'
if Today = '2003/1/14'  ==>Today+10 = 2003/1/24'
this will return String: '20030124'
'&Time+20'
if Today = '11:20:30'  ==>Time+20 = '11:40:30'
this will return String: '11:40:30'
'&VAR:A1'
if varable A1 = 20
this will return String: '20'
'&F:n'  n could be 1~99
This key word let got the current test item's result.
if test result ="11;22;33;44;55"
'&F:1' = 11
'&F:2' = 22
'&F:3' = 33
'&F:5' = 55
'&ANS'
This key word let got the latest test result. with one specific answer
see more help in Expression Process
'&STR_VAR:A1'
if varable A1 = ABCDEFG
this will return String: ' ABCDEFG'
'&UTSPATH'
if test ITTS path = c:\Program Files\Logitech\ITTS\
this will return String: 'c:\Program Files\ITTS\'
'&ITTSPATH'
if test ITTS path = c:\Program Files\Logitech\ITTS\
this will return String: 'c:\Program Files\ITTS\'
'&TESTPLANPATH'
if Scrip File = c:\aaa\bbb\NAME.tpe
this will return String: 'c:\aaa\bbb\'
'&TESTPLANNAME'
if Scrip File = c:\aaa\bbb\NAME.tpe
this will return String: 'c:\aaa\bbb\NAME.tpe'
'&YIELD_RATE'
return test result yield rate
'&EXPIREDATE'
return Scrip File EXPIRE DATE
example:  2008/03/17 10:12:08
'&CREATEDATE'
return Scrip File create date  "YYYY/MM/DD hh:nn:ss"
'&PC_NAME'
return test PC name
'&CSVLOGFILENAME'
CSV (log) file name ( including full path)
example: "c:\aaa\MARIGOT_030701_02_A.CSV"
'&PRODUCTIONLINEID' with hex code
Return Production Line ID
if PIS.ini
[Mass Production Config]
Production Line#=15
will take PCNAME as PRODUCTIONLINEID since ITTS version 2.8.x.x
&PRODUCTIONLINEID will return 0F
'&MACHINEID' with hex code
Return machine  ID:
A==>01
B==>02
.
.
Z==>1A
1 ==>01
15==>0F
will take PCNAME as PRODUCTIONLINEID ITTS version 2.8.x.x
'&IMAGE_POS_X'
Return MainForm Image area's position of X
'&IMAGE_POS_Y'
Return MainForm Image area's position of Y
'&IMAGE_WIDTH'
Return MainForm Image width
'&IMAGE_HEIGHT'
Return MainForm Image Height
'&SCREEN_WIDTH'
Return current screen width
'&SCREEN_HEIGHT'
Return current screen height
'&DESKTOP_WIDTH'
Return desktop width      //different with "screen width" when desktop was two or more monitor.
'&DESKTOP_HEIGHT'
Return desktop height   //different with "screen height" when desktop was two or more monitor.
'&SNO'
Return Serial number with hex code
if sno=65535
will return "FFFF"
'&UUID'
Return UUID
Example
       A7F71887-D1DA-11E7-8364-E82A44FF2F22
       to get last 6bte of UUID  :     ['&UUID':S([-12..-1])] =E82A44FF2F22
'&ITTS_VER' or '&UTS_VER'
Return version of ITTS
if ITTS  version=2.2.0.16
will return "02020016"
'&TOPSTACK'
Return Top Stack (Scrip File Index)  form Scrip File Editor
'&TICKCOUNT'
Return PC system tick count ( resolution = 1 mS)
'&CSVPrimaryDir'
Return CSV Primary Drive ( for PIS Log file)
'&CSVSecondaryDir'
Return CSV Secondary Drive ( for PIS Log file)
'&TESTRESULT'
Return Test result Psss(1) or Fail (0) until now.
'&ERRORLINE'
Return Test Error Line.  ( if pass, return nothing)
'&WeekOfTheYear'
Return the Week(s) of the Year
'&DayOfTheYear'
Return the day(s) of The Year
'&FreeMemory'
Return  free physical memory bytes
'&DLLPATH:dllname.dll'
Return  DLL full path
example: '&DLLPATH:ITTS_Drivers.dll'
result probably ='C:\Program Files\Logitech\ITTS\ITTS_Drivers\'
'&MAC_Address'
Return  MAC address of this PC
Example: 00-11-43-9F-CD-F6
'&IP_Address'
Return  IP_Address of this PC
Example: 172.17.123.37
'&PASS'
Return 1
'&FAIL'
Return  0
'&ITTS_Number' : return the ITTS(n) under run. ( Share Memory )
'&ITTS_Count': return the total number of ITTS is opening.
'&ITTS_n_Handle': return ITTSn's  handle number  ( Share Memory )
'&ITTS_n_testplan_name':  return ITTSn's Scrip File name  ( Share Memory )
'&ITTS_n_testplan_fullname':  return ITTSn's Scrip File name include path ( Share Memory )
Please refer Change format for more example.
Example 1
[""""+'&CSVLOGFILENAME'+""""]
"C:\AAA\DLLTEST_030702_02_A.CSV"
[""""+'&CSVLOGFILENAME'+""""]
"C:\AAA\DLLTEST_030702_02_A.CSV"
list of all smart_format:
['&ANS']
['&CREATEDATE']
['&CSVLOGFILENAME']
['&CSVPRIMARYDIR']
['&CSVSECONDARYDIR']
['&DAYOFTHEYEAR']
['&DESKTOP_HEIGHT']
['&DESKTOP_WIDTH']
['&DLLPATH:']
['&ERRORCODE']
['&ERRORLINE']
['&EXPIREDATE']
['&F:n']
['&FALSE']
['&FREEMEMORY']
['&IMAGE_HEIGHT']
['&IMAGE_POS_X']
['&IMAGE_POS_Y']
['&IMAGE_WIDTH']
['&IP_ADDRESS']
['&ITTSPATH']
['&ITTS_VER']
['&MACHINEID']
['&MAC_ADDRESS']
['&PC_NAME']
['&PRODUCTIONLINEID']
['&SCREEN_HEIGHT']
['&SCREEN_WIDTH']
['&SNO']
['&STR_VAR:']
['&SYNTAX_CHECK']
['&TESTPLANNAME']
['&TESTPLANPATH']
['&TESTRESULT']
['&TICKCOUNT']
['&TIME']
['&TODAY']
['&TOPSTACK']
['&TRUE']
['&UTSPATH']
['&UTS_VER']
['&UUID']
['&VAR:']
['&WEEKOFTHEYEAR']
['&YIELD_RATE']


copy scrip template

Example of scrip

click copy text button. paste to test scrip area

Example
example: Scrip1
example: Scrip 2
example: Scrip 3
example: Scrip 4


Goto

Section1:TPE
The TPE will have one command in
Section2: Stack
which has four
commands: Goto, Save,Back,Next, Next Grupe, Call.
1.Goto
Purpose: Jump to the specific Node.
Value3: The name of the Node you want to jump.
If it can not find the string in the Scrip tree, this command would fail.
The string can be smart format.
2.Save
Purpose: Push the Node ID, which is executed just before this node and is TPE non-embedded command, into Nodes Stack.
Nodes Stack will maintain by the Scrip Editor software and will be cleared when each time the main program execute the Scrip.
3.Back
Purpose: Go back to the Node ID in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.
4.Next
Purpose: Go back to the Node ID +1 in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.
5.NextGroup
Purpose: Go back to the next Group of the Node ID in the up of the Node Stack and pop it out.
If the Nodes Stack is empty, this command would fail.So before you call this command, you should call at first.
6.Call
Purpose: Push the next executable Node ID into Nodes Stack and jump to the specific sub-function (Group) . In that group, you should call at the last command to go to next executable node.
If it can not find the string in the Scrip tree, this command would fail.
Example
1. Goto
Sect 1Sect 2Command
TPEStackGoto
Value 1Value 2Value 3Value 4
------
: the text of the node you want to jump to.
2. Save
Sect 1Sect 2Command
TPEStackSave
Value 1Value 2Value 3Value 4
--------
3. Back
Sect 1Sect 2Command
TPEStackBack
Value 1Value 2Value 3Value 4
--------
4. Next
Sect 1Sect 2Command
TPEStackNext
Value 1Value 2Value 3Value 4
--------
5. NextGroup
Sect 1Sect 2Command
TPEStackNextGroup
Value 1Value 2Value 3Value 4
--------
1. Call
Sect 1Sect 2Command
TPEStackCall
Value 1Value 2Value 3Value 4
------
: the text of the node you want to jump to.
for more detail, please refer to ScripEditor.CHM