MPT Studio Programming Language Reference (v1.8.5)
MPT Studio Programming Language Reference (v1.8.5)
MPT, MPT2, CTX, Multipoint Tester, Multipoint Tester 2, MPT for Windows, Studio, Engine and Discovery
are trademarks of Nexeya Canada Inc. (http://www.nexeyatestsolutions.com)
All other trademarks are the properties of their respective owners.
Warranty. NEXEYA warrants that the shipped Product will be free from defects in material and
workmanship in conformance with our specifications for a period of one year (1) from date of shipment by
NEXEYA. This is the only warranty, which NEXEYA makes relating to the Product. NEXEYA makes no
other warranty, express or implied, and specifically no warranty of merchantability or fitness for a particular
purpose. This warranty is limited to replacement or rebuilding of any Product and shall constitute the
exclusive remedy for breach of warranty and NEXEYA shall not be responsible for any incidental or
consequential damages. Products covered by this warranty must be returned prepaid and received within
the warranty period. No allowances will be made for labour, material, time, damage or transportation claims,
nor will Product be replaced or rebuilt if it was damaged from improper use. This warranty does not apply
to loss or damage caused by accidents; riot; labor disputes; acts of God; inadequate power sources; power
interruptions; use with hazardous or explosive chemicals and/or materials; unfit or inadequate
environmental control, including site conditions and chemicals used individually or in combination; improper
operation, maintenance, supervision, training, or use of safety precautions relating to the operation of the
Product; or other causes beyond the control of NEXEYA. No allowances will be made for the cost of work
done or repairs done by others.
THE FOREGOING WARRANTY IS EXCLUSIVE AND IN LIEU OF ALL WARRANTIES OF EVERY KIND
(EXPRESS, IMPLIED, OR STATUTORY) AND IS IN LIEU OF THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE.
Introduction ............................................................................................................................... 1
Welcome ....................................................................................................................................................... 2
Abbreviations and Symbols ........................................................................................................................... 3
Safety ............................................................................................................................................................ 4
Programming Guide Lines and Tips ................................................................................................................ 5
Net References .............................................................................................................................................. 7
Diagnose Options for Isolation, IR and DWV .................................................................................................. 8
Report Options .............................................................................................................................................. 8
Custom Reporting Options ............................................................................................................................ 9
Tare Options ................................................................................................................................................ 10
MPTLua by Feature....................................................................................................................11
AC High Voltage (Dielectric Withstand) Commands ..................................................................................... 12
Components (Resistors, Capacitors, Diodes, TVS, Inductors) ....................................................................... 12
DC High Voltage (Insulation Resistance) Commands .................................................................................... 12
Environment Functions/Variables ............................................................................................................... 12
Input/Output (Signal Lights, Palm Switches, PLC Interface) Commands ....................................................... 12
Low Voltage Continuity and Isolation Commands........................................................................................ 12
Report and Header Commands .................................................................................................................... 12
Probe Commands ........................................................................................................................................ 12
Program Control .......................................................................................................................................... 13
Programmable DC Sources/Instrument Control ........................................................................................... 13
Programming Tools ..................................................................................................................................... 13
Remote API Commands ............................................................................................................................... 13
Specialty Switch Cards(PAT40x4,PWR36)..................................................................................................... 13
Switching Configuration Control .................................................................................................................. 14
Test Control ................................................................................................................................................. 14
MPTLua Commands...................................................................................................................23
Abort() ......................................................................................................................................................... 24
Capacitor() ................................................................................................................................................... 25
CheckBox() .................................................................................................................................................. 27
ClearAllPoints() ............................................................................................................................................ 28
ClearHigh() .................................................................................................................................................. 29
ClearHighAuxiliary ....................................................................................................................................... 30
ClearHighExternal()...................................................................................................................................... 31
ClearLow() ................................................................................................................................................... 32
ClearLowAuxiliary() ..................................................................................................................................... 33
Returned Value: .......................................................................................................................................... 33
ClearLowExternal() ...................................................................................................................................... 34
ComboBox()................................................................................................................................................. 35
Conductor() ................................................................................................................................................. 36
ConfirmationPrompt() ................................................................................................................................. 37
Continuity() ................................................................................................................................................. 38
DataListBox() ............................................................................................................................................... 40
Diode() ........................................................................................................................................................ 41
DoCapacitance() .......................................................................................................................................... 43
DoHipot()..................................................................................................................................................... 45
DoInductance() ............................................................................................................................................ 47
DoPPSReadI()............................................................................................................................................... 48
DoPPSReadV() ............................................................................................................................................. 49
DoReadI ....................................................................................................................................................... 50
DoReadV() ................................................................................................................................................... 51
DoResistance() ............................................................................................................................................. 52
DSR() ........................................................................................................................................................... 54
DWV() .......................................................................................................................................................... 55
ErrorMessageBox() ...................................................................................................................................... 57
Failed() ........................................................................................................................................................ 58
FailureCounter() .......................................................................................................................................... 59
GetGlobalPersist() ....................................................................................................................................... 60
GetPersist().................................................................................................................................................. 61
GetSysPointInfo() ........................................................................................................................................ 62
Hipot() ......................................................................................................................................................... 63
Inductor() .................................................................................................................................................... 65
IncFailureCounter() ...................................................................................................................................... 67
InfoMessageBox() ........................................................................................................................................ 68
InputNumber() ............................................................................................................................................ 69
InputPassword() .......................................................................................................................................... 70
InputText() .................................................................................................................................................. 71
IR()............................................................................................................................................................... 72
IRSoakAndMeasure() ................................................................................................................................... 74
Isolation() .................................................................................................................................................... 76
LoadSwitching() ........................................................................................................................................... 78
Menu() ........................................................................................................................................................ 79
Miscellaneous.Beep() .................................................................................................................................. 80
Miscellaneous.ImportLibrary() .................................................................................................................... 81
Probe() ........................................................................................................................................................ 82
ProductName() ............................................................................................................................................ 83
ProductPath() .............................................................................................................................................. 84
PS36GetChannelType() ................................................................................................................................ 85
PS36SetChannel() ........................................................................................................................................ 86
PS36SetChannelType() ................................................................................................................................. 87
PS36SetFan() ............................................................................................................................................... 88
PS36SetSources() ......................................................................................................................................... 89
RadioBox() ................................................................................................................................................... 90
ReadHumidity() ........................................................................................................................................... 91
ReadI() ......................................................................................................................................................... 92
ReadTemperature() ..................................................................................................................................... 93
ReadUserIO() ............................................................................................................................................... 94
ReadV()........................................................................................................................................................ 95
RemoteAPIUserCallback() ............................................................................................................................ 96
Report.Fail() ................................................................................................................................................ 97
Report.Header() .......................................................................................................................................... 98
Report.Hint() ............................................................................................................................................... 99
Report.Info() .............................................................................................................................................. 100
Report.Pass() ............................................................................................................................................. 101
Report.Warning() ...................................................................................................................................... 102
Resistor() ................................................................................................................................................... 103
SetAllLow() ................................................................................................................................................ 105
SetGlobalPersist() ...................................................................................................................................... 106
SetHigh().................................................................................................................................................... 107
Welcome
Thank You. Congratulations and thank you for purchasing your MPT, MPT2 or CTX Series Tester. Nexeya
Canada Inc. is proud of its line of testers and warranty’s them for one (1) full year parts and labour (please
see our complete Warranty at the beginning of this manual).
This document details and explains all the functions/commands available for use with your Studio
environment. These features are unique to MPT, MPT2 and CTX systems.
MPT Studio is based on the LUA language, all standard LUA functions can be used in conjunction with the
MPTLua specific commands. For more information about this language, go to http://www.lua.org.
The following guide has been compiled to assist all users of the MPT Series Testers. If you are a first time
user do not be alarmed; it is not our expectation that you learn a new programming language just for the
MPT. Many of our commands are single-line commands and no complex programming structure is required
to commence a test.
Don’t know what you are looking for? Check out Section 2: MPTLua by Feature. Find a command by its
behaviour!
Europe:
Nexeya France
10 Rue Kepler
44 240 La Chapelle-sur-Erdre
France
Safety
Warning!
This product generates high potential as a test stimulus when programmed to do so.
To avoid the risk of shock do not attempt to service the supply beyond the described steps in the User’s
Manual.
To avoid the risk of shock or personal injury, do not remove the product covers while the unit is operating
or connected to the AC mains.
Use only a power cord rated greater than the input current rating of the external power supplies. Use only
a cord in good condition.
If a liquid is spilled on the unit, shut it off immediately and disconnect it from the AC mains.
Ensure the unit is properly grounded using a reliably grounded AC mains input at the external power
supplies.
Do not touch any exposed wiring on your product under test (PUT) while the High Voltage lamp is
illuminated.
For additional safety, it is recommended to use an approved EPO (Emergency Power Off) switch during
High Voltage testing.
Description:
Comments allow the test programmer to document his/her work so that any MPT knowledgeable
person can identify what is happening in the program. Comments allow you to remark out part of
a line, or entire sections when troubleshooting a new program. If you have added comments to
your program properly, anyone reading the comments knows what each line of the product code
does and why it’s there.
Naming Conventions
Overview:
The MPT accepts printable ASCII characters in the range A to Z, a to z, and 0 to 9, in various
string lengths. The only acceptable character in naming is the underscore (_). If you have
nomenclature with other characters, you can make use of the ALIAS feature of the product file.
Connector Names:
Connector Names can be alpha or numeric characters beginning with an Alpha Character
(required), but cannot contain PLUS SIGN, MINUS SIGN, SLASH, ASTERIX, or POUND SIGN.
We strongly recommend against using SPACES and advise substituting the UNDERSCORE
instead. If you have nomenclature with other characters, you can make use of the ALIAS feature
of the product file.
Point Name:
Point Names can be alpha or numeric characters, but CANNOT contain PLUS SIGN (+), MINUS
SIGN (-), SLASH (/), ASTERIX (*) or POUND SIGN (#). We strongly recommend against
embedding SPACES and advise substituting the UNDERSCORE instead. Point Names ARE
CASE SENSITIVE! If you have nomenclature with other characters, you can make use of the
ALIAS feature of the product file.
-- Tests continuity from test point name J1.1 to test point name J2.2.
Continuity('My Continuity Test', 'hi', ContinuityParams, {J1.1,J2.2})
Net Name:
The Net List is stored in the Net List section of the mpt product file.
Net Names are defined in the Net List. Learned products have the default Net Names of Net1 to
the total number of Nets#. Net Names can be any combination of letters and numbers (starting
with a letter (Alpha Character) and cannot include any illegal characters or spaces. If you have
nomenclature with other characters, you can make use of the ALIAS feature of the product file.
Group Name:
Group Names are stored in the Group List section of the mpt product file.
Group Names are tables of test points, Test Point Names, and/or Net Names. Please note that
grouping points together in a group create a virtual net. Continuity will be performed from each
point to every other point in all of the nets within the group. Isolation will be performed on all of
the points within all of the nets grouped together.
Group1 = {Net1,Net2}
Report Aliases:
Report Aliases are stored in the Report Aliases section of the mpt product file.
If you have net or connector labels that have illegal characters or start with a number, you can
make use of the aliases to have them replaced in the report during testing.
Example:
Net1=8Net1
c_1X24.A=1X24.A
In each of these cases whenever the report references Net1 it will automatically replace it with
8Net1. Likewise, whenever the report references c_1X24.A, it will automatically replace it with
1X24.A.
The Input and Output (I/O) of the MPT are commonly referred to as UserIO. The command
language also refers to the I/O as UserIO (E.g. SetUserIO()).
MPT Systems:
UserIO 1 through 6 can be either Inputs or Outputs depending on the Crydom module installed in
the MPT-IO6. For systems with an MPT-IO12, 6 additional programmable I/O are available (13 –
18).
Crydom 1 is by default a Start Test or Advance signal (i.e. Prompts or Pauses will be advanced by
setting this port high).
Crydoms 7 through 12 are reserved and can be used to activate the following system Outputs:
7 – Sonalert (Audio output of the MPT) – Automatically set during AC arc failures
8 – Cooling fan’s on systems that do not possess a Fan Control Board (MPT-FCB)
Automatically set during HV cycles and when system temperature exceeds 35C
9 – Start Lamp – Automatically set when a test program is loaded and ready for testing
MPT2/CTX Systems:
There is a total of five “General Purpose I/Os” or GPIO. These are user-controllable and can be designated
as either inputs or outputs. The I/O’s can only be manipulated by commands from a test program created
in MPT Studio.
Net References
Net References are used to call the points or nets you would like to perform specific commands
on. The following are examples of ways for referencing.
Test Point Name: Connector and Pin label, separated by a {J1.1, J2.1}
period.
System Point: Or actual system test point from the {102, 45}
switching module:
Net Name: A unique name assigned to each net in the {Net1, GND}
NetList.
Group: Group Specifies net numbers and/or points {{Net1,2,J1.1}}
to be treated as a single net (virtual nets).
Range: First and last sequential test point numbers {1..5, 20..100}
separated by two periods.
Group name: Group Names from the Group List – treated {Group1,Class2}
like virtual nets
Example:
Description of attributes:
scan - Select linear diagnostic or binary diagnostic (default is binary)
setup - modify device test parameters (voltage, dwell, etc..) (default is original test parameters.)
options = {}
optimize - if true (1) will remove passed nets from diagnostics search (default is 0)
high_search - if true (1) will isolate and display the ‘from’ point in a diagnosed failure (default is 1)
low_search - if true (1) will isolate and display the ‘to’ point in a diagnosed failure (default is 1)
max_faults_limits - maximum number of errors for each diagnosed test point (default is unlimited)
Example:
diagnose = {scan = ‘binary’, setup = {devices setup},
criteria = {pass criteria}, options = {optimize=1, high_search=1,
low_search=1, max_faults_limits = 2}
Report Options
Introduction:
All standard test algorithms have a default report behaviour.
Users have the option to control report behaviour with the report table.
Example:
report = {pass=1, fail=1, args=1} -- shows passed, failed and test parameters (arguments)
2. Control which information appears in the result data: connector references, net references,
system points, group names, wci names, and select the separator for the list.
Example:
report = {pass=1, fail = 1, args = 1, options = {allow_net_duplicates=1,
wci_info=1, sys_info=1, grp_info=1, net_info=1, separator='/'}},
Description of attributes:
allow_net_duplicates: Allows both Connector References and Net References to appear in the same
line.
connector_info: Add connector.pin label information to the report if Net info is set to true.
wci_info: Add WCI name from the WCI database, if no WCI exists will put separators next to each
other in the designated space. Leave absent or set to 0 for no WCI entry.
sys_info: Add MPT/2 system test point number to the result data.
grp_info: Add Group Name from Group Name List, if no Group Name exists will put separators next to
each other in the designated space. Leave absent or set to 0 for no Group Name entry.
net_info: Add Net Name from Net List, if not Net List exists will put separators next to each other in
the designated space. Leave absent or set to 0 for no Net Name entry.
The make_report table entry will be a function created by the user that captures the report table data they
wish to use and route that information to the PDF report or to other file structures as per their
requirements.
Please refer to each command for the report table return data that can be captured within your custom
function.
Continuity Example:
IR,DWV,Hipot Example:
Component Example:
Tare Options
Introduction
The tare is a resistive or capacitive value that is subtracted from the measurement.
The formula summarizing what it is: Result = measurement - tare
There are three different types of tare.
System Tare
The system tare is composed of two different types of tare. The system tare and the adapter tare. These
two tares are complementary.
The system tare is performed between the measurement device and the front connectors of the MPT.
The adapter tare is the tare for the adapter used between the MPT and the product under test.
The system tare adds the two previous tares. If one of them is not specified, the system will ignore it and
will do the tare with only one.
Once a tare is performed, the information is stored in a file that is exclusive to the switching configuration
file, on which it was performed. The system tare can be used by different programs. If the system
configuration does not match the currently loaded switching configuration file, then the tare data will not
be used when performing tests.
Product Tare
Product Taring is a unique form of taring. The concept of taring remains the same, however, unlike a
System Tare or Adapter Tare, the values are available only to the product file. This means no other test
program can make use of these values.
Generally, Product Tare is not used. There are scenarios where it can be useful. For example, if the test
program makes use of an external instrument for measurement, instead of the MPT System itself, then
having the values of the external device removed might be necessary.
Fixed Tare
The fixed tare is a tare which is specified for each measurement. Each tare can have a resistance value,
capacitance value and inductance value. For the resistance value, it must be expressed like this: xxmΩ,
xxΩ, xxkΩ, xxMΩ or xxGΩ. For the capacitance value, it must be expressed like this: xxnF, xxuF, xxmF or
xxF. For the inductance value, it must be expressed like this: xxnH, xxuH, xxmH or xxH. It is not
mandatory to enter the three values.
Environment Functions/Variables
--Functions-- --Variables--
ProductPath() Miscellaneous.Fingerprint
ProductName() Miscellaneous.UserName
GetSysPointInfo() Miscellaneous.LV
Miscellaneous.HVDC
Miscellaneous.HVAC
Probe Commands
Probe()
Program Control
SetResults.Abort() ComboBox()
SetResults.Add.Abort() ConfirmationPrompt()
SetResults.Add.Fail() DataListBox()
SetResults.Add.FailToTest() ErrorMessageBox()
SetResults.Add.Pass() InfoMessageBox()
SetResults.Add.PassedWarnings() InputNumber()
SetResults.Fail() InputPassword()
SetResults.FailToTest() InputText()
SetResults.Pass() Menu()
SetResults.Remove.Abort() RadioBox()
SetResults.Remove.Fail() ShowHTML()
SetResults.Remove.FailToTest() ShowHTMLFile()
SetResults.Remove.Pass() ShowTextBox()
WarningMessageBox()
Abort() UIInputText()
Failed() UIComboBox()
FailureCounter() UICheckBox()
IncFailureCounter() UIRadioButton()
Miscellaneous.Beep() UIDataList()
Sleep() UIInputPassword()
UIShowPrompt()
SetPersist()
GetPersist()
SetGlobalPersist()
GetGlobalPersist()
Programming Tools
DSR()
Miscellaneous.ImportLibrary()
Test Control
SetHigh() SetHighExternal()
ClearHigh() ClearHighExternal()
SetLow() SetLowExternal()
SetAllLow() ClearLowExternal()
ClearLow() ClearAllPoints()
SetHighAuxiliary()
ClearHighAuxiliary()
SetLowAuxiliary()
ClearLowAuxiliary()
Example:
setup = {i = 100mA, delay = 100ms, kelvin=1, tare = {mode=’system’}} --aceptable syntax
setup = {i = 0.1, delay = 0.1, kelvin=1, tare = {mode=’system’}} – equivalent syntax
Example:
setup = {i = 1uA, delay = 100ms, kelvin=1, tare = {mode=’system’}} --aceptable syntax
setup = {i = 0.000001, delay = 0.1, kelvin=1, tare = {mode=’system’}} -- equivalent syntax
Label: ‘hcs’
Purpose: Low voltage continuity, isolation and component testing as a Current Source or functional
testing as Voltage Source (2-wire and 4-wire capable).
Setup Table:
i = current, where current can be 1mA to 2.5A (5A optional) – required
v = voltage, where voltage can be 1mV to 28V (0.4V or 48V optional) -- required
tare = {mode = ‘tare_type’}, where tare_type can be ‘system’, ‘product’, or ‘fixed’ -- optional
kelvin = state, where state can be 0 (false) or 1 (true), default is 0 -- optional
delay = time, where time is a number in seconds (units allowed) – optional
skip_kelvin_validation: if true (1), skips verification of kelvin setup prior to measurement
Example:
setup = {i = 100mA, v = 5V, delay = 100ms, kelvin=1, tare = {mode=’system’}} --aceptable syntax
setup = {i = 0.1, v = 5, delay = 0.1, kelvin=1, tare = {mode=’system’}} – equivalent syntax
HVDC-1000,1500,2000,3000
Label: ‘hvdc’
Purpose: DC High Voltage IR and Leakage.
Setup Table:
v = voltage, where voltage is programmable from 50V to maximum of source – required
dwell = time, where time is programmable from .1s to 9999s – required
adaptive = time, where time is programmable from .1s to 9999s, default is 0 – optional
Example:
setup = {v = 500V, dwell = 1s, adaptive = 1s, rampup = 10s} --aceptable syntax
setup = {v = 500, dwell = 1, adaptive = 1, rampup = 10} --equivalent syntax
HVDC-5000
Label: ‘hvdc’
Purpose: DC High Voltage IR and Leakage.
Setup Table:
v = voltage, where voltage is programmable from 50V to maximum of source – required
dwell = time, where time is programmable from .1s to 9999s – required
adaptive = time, where time is programmable from .1s to 9999s, default is 0 – optional
rampup = time, where time is programmable from 0 to 9999s, default is 0 – optional
ldt = percent, where percentage is a percentage from 1 to 100 -- optional
hires_mode = table, where table is {state}, where state is either 0 (default) or 1 --optional
Example:
setup = {v = 500V, dwell = 1s, adaptive = 1s, rampup = 10s} --aceptable syntax
setup = {v = 500, dwell = 1, adaptive = 1, rampup = 10} --equivalent syntax
HVAC-1500,2000,2500,3000
Label: ‘hvac’
Purpose: AC High Voltage DWV and Leakage.
Setup Table:
v = voltage, where voltage is programmable from 50V to maximum of source – required
dwell = time, where time is programmable from .1s to 9999s – required
rampup = time, where time is programmable from 0 to 9999s, default is 0 – optional
rampdown = time, where time is programmable from 0 to 9999s, default is 0 – optional
Example:
setup = {v = 1kV, dwell = 1s, rampup = 10s, rampdown = 10s} --aceptable syntax
setup = {v = 1000, dwell = 1, rampup = 10, rampdown = 10} --equivalent syntax
Example:
setup = {i = 100mA, delay = 100ms, kelvin=1, tare = {mode=’system’}} --aceptable syntax
Example:
setup = {i = 1A, delay = 100ms, kelvin=1} --aceptable syntax
setup = {i = 1, delay = 0.1, kelvin=1} – equivalent syntax
Example:
setup = { } --aceptable syntax
Example:
setup = {v = 500V, dwell = 1s, adaptive = 1s, rampup = 10s} --aceptable syntax
setup = {v = 500, dwell = 1, adaptive = 1, rampup = 10} --equivalent syntax
ACS-Lite (1800VAC/25mA)
Label: ‘acs’
Purpose: AC High Voltage DWV and Leakage.
Setup Table:
v = voltage, where voltage is programmable from 30V to 1800V – required
dwell = time, where time is programmable from .1s to 9999s – required
Example:
setup = {v = 1kV, dwell = 1s, rampup = 10s, rampdown = 10s} --aceptable syntax
setup = {v = 1000, dwell = 1, rampup = 10, rampdown = 10} --equivalent syntax
Example:
setup = {v = 1kV, dwell = 1s, rampup = 10s} --aceptable syntax
setup = {v = 1000, dwell = 1, rampup = 10} --equivalent syntax
Label: ‘dlm’
Purpose: Energization using voltage.
Setup Table:
i = current, where current dependant on instrument – required
v = voltage, where voltage dependant on instrument -- required
Example:
setup = {v = 12V, i = .1A} --aceptable syntax
setup = {v = 12, i = .1} --aceptable syntax
Label: ‘smu’
Purpose: Multi-purpose instrument – Current Source, Voltage Source for testing resistance, components
and protection devices (2-wire and 4-wire capable).
Setup Table:
Resistance Mode:
i = current, where current dependant on instrument – required
v = voltage, where voltage dependant on instrument – required
i_max = current, where current dependant on instrument -- optional
v_max = voltage, where voltage dependant on instrument -- optional
tare = {mode = ‘tare_type’}, where tare_type can be ‘system’, ‘product’, or ‘fixed’ -- optional
kelvin = state, where state can be 0 (false) or 1 (true), default is 0 -- optional
skip_kelvin_validation: if true (1), skips verification of kelvin setup prior to measurement -- optional
delay = time, where time is a number in seconds (units allowed) – optional
rampup = time, where time is a number in seconds (units allowed) – optional
rampdown = time, where time is a number in seconds (units allowed) – optional
pulse_width = time – optional
Example:
setup = {i = 100mA, v = 5V, delay = 100ms, kelvin=1, tare = {mode=’system’}} --aceptable syntax
setup = {i = 0.1, v = 5, delay = 0.1, kelvin=1, tare = {mode=’system’}} – equivalent syntax
1Discontinued
2Discontinued
LCR-800 Series
constant_voltage: number 0 / 1
test_frequency: number from 12 to 100e+3
measurement_speed: string ‘SLOW’ / ‘MEDI’ / ‘FAST’
equivalent_circuit: string ‘SERI’ / ‘PARA’
signal_voltage: number from 0.005 to 1.275)
SR715/20
equivalent_circuit: number 0 / 1 (series / parallel)
constant_voltage_mode: number 0 / 1 (off / on)
drive_frequency: number 100 / 120 / 1000 / 10000 / 100000
measurement_rate: number 0 / 1 / 2 (fast / medium / slow)
range_hold: number 0 / 1(disabled / enabled)
z_range number: 100000 / 6400 / 400 / 25
Hioki IM3523
i = number (0.01mA to 50 mA)
v = number (0.005 V to 5.000 V)
frequency = number (40 Hz to 200 kHz)
speed = string (‘SLOW’,’MEDIUM’,’FAST’)
range = number (1,2,3,4,5,6,7,8,9,or 10)
auto_range = string (‘ON’, ‘OFF’)
dcr_speed = string (‘SLOW’,’MEDIUM’,’FAST’)
dcr_auto_range = string (‘ON’, ‘OFF’)
dcr_delay = number (0 s to 9.9999 s)
equivalent_circuit = string ('SERIES', 'PARALLEL')
Keysight E4980A
i = number (0.01mA to 50 mA)
v = number (0.005 V to 5.000 V)
frequency = number (40 Hz to 200 kHz)
speed = string (‘SLOW’,’MEDIUM’,’FAST’)
range = number (1,2,3,4,5,6,7,8,9,or 10)
auto_range = string (‘ON’, ‘OFF’)
dcr_speed = string (‘SLOW’,’MEDIUM’,’FAST’)
dcr_auto_range = string (‘ON’, ‘OFF’)
dcr_delay = number (0 s to 9.9999 s)
equivalent_circuit = string ('SERIES', 'PARALLEL')
Abort()
Purpose:
Abort the test program.
Description:
This function aborts the test program and displays an optional message to the user.
Syntax:
Abort(msg)
Result Flag:
Set To ‘Aborted’
Returned Value:
No value returned.
Parameters:
*msg (string) An optional message to explain to the user the cause of the abort. It must be
a string with Unicode characters.
Examples:
Abort()
Capacitor()
Purpose:
Perform a capacitor measurement between defined points or on an item in the Capacitor List.
Description:
Capacitor() performs a capacitance measurement on specified points with setup or on one or more items
in the Capacitor List.
Syntax:
Capacitor({label = 'Label1', device = 'device',
setup= {i=current, tare={mode=’tare_type’}},
criteria = {c=1uF ±5%},
terminals = {test = 1, com = 2}})
Capacitor({C1,C2}), where Label is the name of the component in the Capacitor List.
Capacitor(‘all’)
Result Flag:
This function sets the test result flag based on the measurement outcome.
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
CapacitorList A list of 1 or more capacitors based on setup; or a list of 1 or more named capacitors
(table) from the "Capacitor List".
Label (string) The label of the component. It must be a string with Unicode characters.
Device (string) Device Options: ‘msr’, ‘hi’, or ‘lcr’ (device availability depends on system configuration)
Setup (table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria (table) Pass or Fail Criteria.
Syntax with Units:
The value can be expressed with units: xxnF, xxuF, xxmF, xxF.
The tolerance must be in percent and with the symbol “%”.
c > 10uF, c < 15uF
c_min=10uF, c_max=15uF
10uF < c < 15uF
Terminals The tests point to make the measurement. It can be a system test point, a connector
(table) reference, list of system test points or connector references, a group name or nets.
If the table contains an item of the Capacitor List, the parameters are:
Item The name of an item in the Capacitor List is the label. It’s a string of Unicode characters
but without single quotes. All items must be separated by a comma.
Report Table:
Examples:
Capacitor() from Test List only :
Capacitor({label='C1', device='lcr',
setup={i=100uA, tare = {mode='product'}},
criteria = {c = 1nF ± 5%},
terminals = {test = J1.1, com = J2.1}})
Capacitor (‘all’)
CheckBox()
Purpose:
Show a dialog box with a checkbox.
Description:
Displays a dialog box containing a check box. A check box is commonly used as a user control to
manage flow execution of a program or to set a series of options before running a test.
Syntax:
CheckBox(Label, Default, Title)
Returned Value:
Boolean: result of the checkbox, true if is checked, otherwise false.
Parameters:
Msg (string) A description of the checkbox purpose. The string must contain only Unicode
characters.
*Default (Boolean) A default value for the checkbox (true or false). By default, is false.
*Title (string) A title for the header of the dialog box. Default title is "Prompt". The string
must contain only Unicode characters.
Examples:
isChecked = CheckBox ('This is a checkbox', false, 'Custom title')
ClearAllPoints()
Purpose:
Clear all MPT/MPT2 system points.
Description:
ClearAllPoints() resets all points on all buses back to their default state (OFF).
Syntax:
ClearAllPoints()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
ClearAllPoints()
ClearHigh()
Purpose:
Clear high relays of the specified points.
Description:
ClearHigh() resets the specified test point(s) on TEST bus to OFF, regardless of whether they are on the
Main, Auxiliary, or External Bus.
Syntax:
ClearHigh(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear high relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearHigh(1)
ClearHigh({1,3,6})
ClearHigh({'net2', 'net8'})
ClearHigh({group1, group2})
ClearHighAuxiliary
Purpose:
Clear high relays of the specified points from Auxiliary Bus only.
Description:
ClearHighAuxiliary() resets the specified test point(s) on TEST bus to OFF from the Auxiliary bus only.
Syntax:
ClearHighAuxiliary(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear high relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearHighAuxiliary(1)
ClearHighAuxiliary({1,3,6})
ClearHighAuxiliary({'net2', 'net8'})
ClearHighAuxiliary({group1, group2})
ClearHighExternal()
Purpose:
Clear high relays of the specified points from External Bus only.
Description:
ClearHighExternal resest the specified test point(s) on TEST bus to OFF from External Bus only.
Syntax:
ClearHighExternal(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear high relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearHighExternal(1)
ClearHighExternal({1,3,6})
ClearHighExternal({'net2', 'net8'})
ClearHighExternal({group1, group2})
ClearLow()
Purpose:
Clear low relays of the specified points.
Description:
ClearLow() resets the specified test point(s) on COM bus to OFF, regardless of whether they are on the
Main, Auxiliary, or External Bus.
Syntax:
ClearLow(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear low relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearLow(1)
ClearLow({1,3,6})
ClearLow({'net2', 'net8'})
ClearLow({group1, group2})
ClearLowAuxiliary()
Purpose:
Clear low relays of the specified points from the Auxiliary Bus only.
Description:
ClearLowAuxiliary() resets the specified test point(s) on COM bus to OFF from the Auxiliary Bus only.
Syntax:
ClearLowAuxiliary(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear low relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearLowAuxiliary(1)
ClearLowAuxiliary({1,3,6})
ClearLowAuxiliary({'net2', 'net8'})
ClearLowAuxiliary({group1, group2})
ClearLowExternal()
Purpose:
Clear low relays of the specified points from External Bus only.
Description:
ClearLowExternal() resets the specified test point(s) on COM to OFF from the External Bus only
Syntax:
ClearLowExternal(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to clear low relays. Can be a system test point, a
String or Table) connector reference, list of system test points or net references, or a group
name.
Examples:
ClearLowExternal(1)
ClearLowExternal({1,3,6})
ClearLowExternal({'net2', 'net8'})
ClearLowExternal({group1, group2})
ComboBox()
Purpose:
Show a combo box.
Description:
Creates a dialog box with a drop down combo box. The purpose is to get the user to choose a specific
item, and respond accordingly.
Syntax:
ComboBox(Label, Items, Default, Title)
Returned Values:
- Integer: a number representing the index of the selected item.
- String: a string containing the text of the selected item from the list.
Parameters:
Msg (string) A description of the combo box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialog box appears.
*Title (string) A title for the header of the dialog box. Default title is "Prompt". The string
must contain only Unicode characters.
Examples:
index, item = ComboBox ('Please select an item', {'Item 1', 'Item 2', 'Item 3', 'Item 4'},
'Item 2', 'This is the title')
Conductor()
Purpose:
Perform both Continuity and Isolation on each Net one at a time.
Description:
Conductor() performs both a Continuity Test and an Isolation Test. This function sets the test result flag.
Syntax:
Conductor (Label, ContinuityParameters, IsolationParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the conductor test. It must be a string with Unicode characters.
ContinuityParameters Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’, or ‘smu’ (device
(table) availability depends on system configuration)
Setup (table) Refer to MPT/MPT2 Instruments for Setup Table based on
the selected Device.
IsolationParameters Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’, or ‘smu’ (device
(table) availability depends on system configuration)
Setup (table) Refer to MPT/MPT2 Instruments for Setup Table based on
the selected Device.
TestPoints (Table or The tests point to make the measurement. It can be a system test point, a
String) connector reference, list of system test points or net references, a group name
or nets. If this parameter is not specified, the test will be executed on all nets
the same as specifying ‘all_net’. NOTE: ‘all’ is not applicable to Conductor()
Please refer to Continuity() and Isolation() for Criteria, Options, Report and Diagnose tables.
Examples:
Conductor('My conductor test.', {device = 'msr', setup = {i = 100mA},
criteria= {r < 30Ω},
diagnose = {}},
{device = 'msr', setup = {i = 1mA},
criteria = {r > 1kΩ},
diagnose = {scan = 'binary'}}, {Net1, {1,8}})
ConfirmationPrompt()
Purpose:
Asks the user to confirm Yes or No.
Description:
Show a dialog box allowing the user to answer yes, no or abort the test.
Syntax:
ConfirmationPrompt(Msg, Title)
Returned Value:
Boolean: result of the box, true for Yes, false for No.
Parameters:
Msg (string) What the dialog box should ask to the user. The string must contain only
Unicode characters.
*Title (string) A title for the header of the dialog box. Default title is "Question". The string
must contain only Unicode characters.
Examples:
boolean_result = ConfirmationPrompt ('Please answer by Yes or No',
'This is the title of the box')
Continuity()
Purpose:
Verify continuity between two or more points.
Description:
Tells the MPT System to run a Continuity test on the existing net list. This function sets the test result flag.
Syntax:
Continuity(Label, Device, TestParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the continuity test. It must be a string with Unicode characters.
Device (string)Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’, or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table - please refer to MPT/MPT2 Instruments for Setup Table based on the selected
(table) Device.
Criteria Table:
r < resistance (with or without units)
or
r_max = resistance without units (in ohms)
Options Table:
use_star_mode: if set to true (1) will change continuity from chain to star mode
Report Table:
Please refer to Report Options for more details.
Diagnose Table:
If diagnose = {} is in the parameter table, opens will be diagnosed for a percentage of open
from the first point of the continuity measurement. Please refer to Diagnose Options for
more details.
TestPoints The test points to make the measurement. If this parameter is not specified, the test will be
(Table or executed on all defined nets. The same as ‘specifying ‘all_net’. NOTE: ‘all’ is not applicable
String) to Continuity().
Note: Minimum 2 test points are required for each net. Shared test points between nets are
not allowed.
Examples:
Continuity ('My continuity test.', 'msr', {setup = {i = 100mA}, criteria= {r < 30Ω},
options = {user_star_mode = 1}, diagnose = {}})
local ContinuityParams = {
setup = {i = 100mA},
options = {use_star_mode=1},
report = {pass=1, fail = 1, args = 1,
options = {wci_info=1, sys_info=1, grp_info=1, net_info=1,
separator='#'}},
criteria={r < 5Ω},
diagnose = {}
}
DataListBox()
Purpose:
Show a data list box.
Description:
Displays a dialog box containing a data list box. The purpose is to get the user to enter an item
accordingly, and also display a list of selectable valid items. However, the benefit of a data list box is to
allow the user to enter other values besides the defaults.
Syntax:
DataListBox(Label, Items, Default, Title)
Returned Values:
- Integer: a number representing the index of the selected item. A "0" is returned if the user enters a
value other than the defaults.
- String: a string containing the text of the selected item from the list.
Parameters:
Msg (string) A description of the data list box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
*Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialog box appears.
*Title (string) A title for the header of the dialog box. Default title is "Prompt". The string
must contain only Unicode characters.
Examples:
index, item = DataListBox ('Please select an item', {'Item 1', 'Item 2', 'Item 3', 'Item 4'},
'Item 2', 'This is a custom title')
Diode()
Purpose:
Test a diode or transient voltage suppressor and verify directional voltage, current, and clamping values.
Description:
Diode() performs a diode measurement on all specified items in the diode list. This function sets the test
result flag
Syntax:
Diode(DiodeList)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
DiodeList A list of 1 or more diodes based on setup; or a list of 1 or more named diodes from
(table) the "Diode List".
Criteria Table:
The pass or fail criteria. It can be a value with tolerance or a min and a max. Only the
forward voltage value is specified for MSR and HI devices.
The value must be expressed like this: xxmV, xxV
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- v > 0.5V, v < 2V
- v_min=100mV, v_max=800mV
- 1V < v < 1.5V
Forward voltage value and reverse current value is specified for SMU device.
Current value must be expressed like this: xxnA, xxuA, xxmA, xxA
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- i > 0.5mA, i < 2 mA
- i_min=100mA, i_max=800mA
- 1mA < i < 1.5mA
If the table contain an item of the diode list, the parameters are:
Item The name of an item in the diode list. It’s a string of Unicode characters but without
single quotes. All items must be separated by a comma.
Examples:
Diodes based on "setup":
Diode ({label = 'D4', device = 'msr', setup = {i = 100 mA, i_rev = 100 mA},
criteria = {5 V < v < 10 V, i_rev < 10uA},
terminals = {test = 7, com = 8}})
DoCapacitance()
Purpose:
Run a capacitance measurement.
Description:
DoCapacitance tells the MPT System to perform a capacitance measurement on the current MPT
switching state This function does not accept criteria; it means the test flag is not set.
Syntax:
DoCapacitance (Device, TestParameters)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
clip_tbl (table) { short = 0/1 } if shorted clip_tbl.short = 1
{ timeout = 0/1 } if no measurement clip_tbl.timeout = 1
raw_value (number) The raw measured value in base units (F).
value_as_str (string) The measured value with the units (nF, uF, mF or F).
value (number) The measured value with only significant digits in base units (F).
tared_value (number) The measured value in base units (F) after the tare operation (if a tare is
specified)
tared_value_as_str (string) The measured value after the tare operation (if a tare is specified)
Parameters:
Device (string) Device Options: ‘msr’, ‘hi’, ‘lcr’ (device availability depends on system
configuration)
TestParameters (table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected
Device.
Examples:
msr_reading, msr_counter = DoCapacitance ('msr')
DoHipot()
Purpose:
Run an HiPot measurement.
Description:
Tells the MPT System to perform a HiPot test. A "DoHipot" test, as opposed to a "HiPot" test, gives you
no control over what you are testing. "DoHipot" just runs a HiPot test on the current MPT switching state
and then returns a reading. Its purpose is to provide a reading only and not determine any pass or fails.
Syntax:
DoHipot (Label, Device, TestParameters)
Parameters:
Label (string) The label of the HiPot test. It must be a string with Unicode characters.
Device (string) Device Options: ‘hvdc’, ‘hi’, ‘hvac’, ‘acs’or ‘smu’ (device availability depends on system
configuration)
TestParameters Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
(table)
Examples:
reading, counter = DoHipot('label','acs',{setup = {v = 500V, dwell = 1s},
criteria = {i<1mA}})
DoInductance()
Purpose:
Run an inductance measurement.
Description:
DoInductance tells the MPT System to perform an inductance measurement on the current MPT
switching state. If "setup" is not specified, the MPT performs the test by intelligently determining the setup
to use. This function does not accept criteria; it means the test flag is not set.
Syntax:
DoInductance(Device, TestParameters)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
raw_value (number) The raw measured value in base units (H)
value (number) The measured value with only significant digits in base units (H).
value_as_str (string) The measured value with the units (uH, mH or H)
Parameters:
Device (string) Device Options: ‘lcr’ (device availability depends on system configuration)
TestParameters (table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected
Device.
Examples:
lcr_reading, lcr_counter = DoInductance('lcr')
DoPPSReadI()
Purpose:
Read a current.
Description:
DoPPSReadI tells the MPT System to perform a current measurement using the specified PPS device in
the current switching state.
Syntax:
DoPPSReadI(Device)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
value (number) Measured value in base units (A)
value_as_str (string) Value of the read current in string with the unit (uA, mA or A).
Parameters:
Device (string) Device Options: ‘hcs’, ‘dlm’ or ‘smu’ (device availability depends on system
configuration)
Examples:
Mydlmresult = DoPPSReadI('dlm')
Mysmuresult = DoPPSReadI('smu')
DoPPSReadV()
Purpose:
Read a voltage.
Description:
DoPPSReadV tells the MPT System to perform a voltage measurement using the specified PPS device in
the current switching state.
Syntax:
DoPPSReadV(Device)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
value (number) Value of the read voltage in base units (V).
value_as_str (string) Value of the read voltage in string with the unit (mV, V or kV).
Parameters:
Device (string) The unit with which the measure must be performed. It must be a supported
device: HCS, SMU or DLM.
Examples:
DoPPSReadV('dlm')
DoPPSReadV('smu')
DoReadI
Purpose:
Make a current measurement.
Description:
DoReadI tells the MPT System to perform a current measurement using the specified device, on the
MPT's current switching state. This function does not accept criteria; it means the test flag is not set.
Syntax:
DoReadI(Device, TestParameters)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
value_as_str (string) The measured value with the units (mA, A ).
value (number) The measured value in base units (A).
Parameters:
Device (string) Device Options: ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
(table)
Examples:
smu_reading, smu_counter = DoReadI('smu')
DoReadV()
Purpose:
Make a voltage measurement.
Description:
DoReadV tells the MPT System to perform a voltage measurement using the specified device, on the
MPT's current switching state. This function does not accept criteria; it means the test flag is not set.
Syntax:
DoReadV (Device, TestParameters)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Reading table:
value_as_str (string) The measured value with the units (mV, V or kV).
value (number) The measured value in base units (V).
Parameters:
Device (string) Device Options: ‘msr’, ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters (table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected
Device.
Examples:
msr_reading, msr_counter = DoReadV('msr')
DoResistance()
Purpose:
Run a resistance measurement.
Description:
DoResistance tells the MPT System to perform a resistance measurement on the current MPT switching
state. If "setup" is not specified, the MPT performs the test by intelligently determining the setup to use.
This function does not accept criteria; it means the test flag is not set.
Syntax:
DoResistance (Device, TestParameters)
Returned Value:
Tables: 2 Lua "tables" containing the results of the readings.
Parameters:
Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs', ‘dmm’, or ‘smu’ (device availability depends
on system configuration)
TestParameters (table) Setup Table:
Refer to MPT/MPT2 Instruments for Setup Table based on the selected
Device.
Examples:
SetHigh(J1.1)
SetLow(J2.1)
Rresult,_ = DoResistance('msr',{i = 100mA, delay = 100ms})
ClearAllPoints()
if not Rresult.clip_tbl.low_or_high then
if Rresult.value > MinR and Rresult.value < MaxR then
SetResults.Add.Pass()
Report.Pass(string.format('%10s = %10s',"Resistance ",Rresult.value_as_str))
else
SetResults.Add.Fail()
Report.Fail(string.format('* %10s = %10s',"Resistance ",Rresult.value_as_str))
end
else
SetResults.Add.Fail()
Report.Fail(string.format('* %10s = %10s',"Resistance",Rresult.value_as_str.." (Open)"))
end
DSR()
Purpose:
Show the current state relays.
Description:
Display State Relays. Shows a dialog box (if the pause parameter is set to true) that updates the
Switching State in MPT Studio. The user can then view the current switching state as of the most recent
call to the DSR function. Useful for debugging large setups in a testing environment.
Syntax:
DSR(Pause, Msg)
Returned Value:
No value returned.
Parameters:
*Pause (Boolean) Defaults to false. Set to true if you wish for a dialog box to appear that waits
for the user to choose to continue the test program. Useful, when you wish
to view switching states at different points throughout program execution. If
false, DSR will update the switching state and continue program execution.
*Msg (string) Displays a message in the dialog box. Valid if the "pause” parameter is set
to true. It must be a string with Unicode characters.
Examples:
DSR ()
DSR(true)
DWV()
Purpose:
Run a dielectric withstand test.
Description:
Perform a Dielectric Withstand test on the specified nets. This function sets the test result flag.
Syntax:
DWV(Label, Device, TestParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the DWV test. It must be a string with Unicode characters.
Device (string) Device Options: ‘hvdc’, ‘hi’, ‘hvac', ‘acs’, or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
Specify maximum Leakage (for AC only) and/or maximum Total Current
i < total current (with our without units)
leakage < total leakage (with our without units)
i_max = total current
leakage_max = total leakage
or
Specify minimum IR value (for DC only)
r < minimum IR value (with our without units)
r_min = minimum IR value
Report Table:
Please refer to Report Options for more details.
Options Table:
float_unused - if set to true (1) points not defined in the Net List or the Mapping Table will
remain off/disconnected during the test cycle. Default set to false (0).
disable_mass_groups_split - if set to true (1) large groups created by the mass algorithm
that fail the pass criteria will not be reduced in size to reduce leakage due to grouping.
Default behaviour splits large groups.
mass_rpt_verbose - if set to true (1) each mass phase will enter result data and the
measurements of the phase. Default set to false (0).
max_test_faults - limit the number of failures and exit the command, test continues.
Default is unlimited.
Diagnose Table:
Please refer to Diagnose Options for Isolation, IR and DWV for details.
Examples:
local DWVParams = {
setup = {v = 1kV, dwell=5s},
criteria = {leakage < 1mA},
options = {test_mode = 'mass'},
diagnose = {scan = 'linear'},
}
DWV ('AC DWV Example', 'acs', DWVParams, 'all_net')
local xyz = {
setup = {v = 1kV, dwell=5s},
criteria = {i < 10nA},
options = {test_mode = 'linear'},
diagnose = {scan = 'linear'},
}
DWV ('DC DWV Example', 'hvdc', xyz, 'all')
ErrorMessageBox()
Purpose:
Display an error.
Description:
This function displays an error in a dialog box with a red title bar. The title and the message of the dialog
box are customizable. Wait for user input or abort the test (time out).
Syntax:
ErrorMessageBox(Msg, Title)
Returned Value:
No value returned.
Parameters:
Msg (string) Message to displays in the dialog box. The string must contain only Unicode
characters.
*Title (string) Optional title of the dialog box. By default, is ‘Error’. The string must contain
only Unicode characters.
Examples:
ErrorMessageBox('This is an error message box without title')
Failed()
Purpose:
Know if the global test failed or not.
Description:
This function returns a value to know if the global test failed or not.
Syntax:
Failed()
Returned Value:
Boolean: true if global test failed, otherwise false.
Parameters:
No parameters.
Examples:
test_fail = Failed()
if Failed() then
SetResuls.Add.Fail()
Report.Fail(‘It Failed’)
else
SetResuls.Add.Pass()
Report.Pass(‘It Passed’)
end
FailureCounter()
Purpose:
Know the number of errors.
Description:
This function returns the number of errors that occurred during the last test.
Syntax:
FailureCounter()
Returned Value:
Integer: the number of errors that occurred during the last test.
Parameters:
No parameters
Examples:
Nb_fail = FailureCounter()
GetGlobalPersist()
Purpose:
Read the value of a persistent global variable.
Description:
GetGlobalPersist allows the user to read a global persistent value. The value must have been created by
the SetGlobalPersist function.
Syntax:
GetGlobalPersist(Key)
Returned Value:
Integer, Boolean, String or Table: the value for the specified key
Parameters:
Key (string) The identification key of the variable. It must be a string with Unicode characters.
Examples:
my_global_number = GetGlobalPersist ('global_persist_val')
my_global_bool = GetGlobalPersist('global_persist_bool')
GetPersist()
Purpose:
Read the value of a persistent variable.
Description:
GetPersist allows the user to read a persistent value. The value must have been created by the
SetPersist function.
Syntax:
GetPersist(Key)
Returned Value:
Integer, Boolean, String or Table: the value for the specified key
Parameters:
Key (string) The identification key of the variable. It must be a string with Unicode characters.
Examples:
my_number = GetPersist('persist_val')
my_bool = GetPersist('persist_bool')
my_table = GetPersist('persist_tab')
my_string = GetPersist('persist_str')
GetSysPointInfo()
Purpose:
Get information about a system point.
Description:
This function allows to know different information about a system point. You can retrieve the net name,
the adaptor, WCI or connector of this system point.
Syntax:
GetSysPointInfo(connector reference)
Returned Value:
A table containing one or more information about the system point. It can be the net, connector, adaptor,
WCI. Each value is identified by a key.
Parameters:
SysPoint (Integer,string) The system points to get information.
Examples:
point_tbl = GetSysPointInfo(J1.1)
Report.Info(‘The point belongs to net: ’..point_tbl.net)
point_tbl = GetSysPointInfo(125)
Report.Info(‘The system point is: ’..point_tbl.con..’.’..point_tbl.pin)
Hipot()
Purpose:
Run a High Voltage Test.
Description:
Perform a High Voltage Test test on the specified nets. This function sets the test result flag.
Syntax:
Hipot(Label, Device, TestParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the Hipot test. It must be a string with Unicode characters.
Device (string) Device Options: ‘hvdc’, ‘hi’, ‘hvac', ‘acs’, or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
Specify maximum Leakage (for AC only) and/or maximum Total Current
i < total current (with our without units)
leakage < total leakage (with our without units)
i_max = total current
leakage_max = total leakage
or
Specify minimum IR value (for DC only)
r < minimum IR value (with our without units)
r_min = minimum IR value
Report Table:
Please refer to Report Options for more details.
Options Table:
float_unused - if set to true (1) points not defined in the Net List or the Mapping Table will
remain off/disconnected during the test cycle. Default set to false (0).
disable_mass_groups_split - if set to true (1) large groups created by the mass algorithm
that fail the pass criteria will not be reduced in size to reduce leakage due to grouping.
Default behaviour splits large groups.
mass_rpt_verbose - if set to true (1) each mass phase will enter result data and the
measurements of the phase. Default set to false (0).
max_test_faults - limit the number of failures and exit the command, test continues.
Default is unlimited.
Diagnose Table:
Please refer to Diagnose Options for Isolation, IR and DWV for details.
Examples:
local HipotParams = {
setup = {v = 1kV, dwell=5s},
criteria = {leakage < 1mA},
options = {test_mode = 'mass'},
diagnose = {scan = 'linear'},
}
Hipot ('AC Hipot Example', 'acs', HipotParams, 'all_net')
local xyz = {
setup = {v = 1kV, dwell=5s},
criteria = {i < 10nA},
options = {test_mode = 'linear'},
diagnose = {scan = 'linear'},
}
Hipot('DC Hipot Example', 'hvdc', xyz, 'all')
Inductor()
Purpose:
Do an inductance measurement in connection with an item of the inductor list.
Description:
Inductor tells the MPT System to perform an inductance measurement on one or more items in the
inductance list. This function sets the test result flag.
Syntax:
Inductor(InductorList)
Returned Value:
Boolean: True if command successful no failures counted. Otherwise, false.
Parameters:
InductorList (table) A list of 1 or more inductors based on setup; or a list of 1 or more named
inductors from the "Inductor List".
Label (string) The label of the inductor measurement. It must be a string with Unicode
characters.
Device (string) Device Options: ‘lcr’ (device availability depends on system configuration)
TestParameters (table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected
Device.
Criteria (table) The criteria to valid the test or not. It can be a value with tolerance or a min
and a max.
The value must be expressed like this: xxnH, xxuH, xxmH, xxH
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- l > 10uH, l < 15 uH
- l_min=10 uH, l_max=15uH
- 10uH < l < 15uH
Terminals (table) The tests point to make the measurement. It can be a system test point, a
connector reference, list of system test points or connector references, a
group name or nets.
If the table contain an item of the inductor list, the parameters are:
Item The name of an item in the inductor list. It’s a string of Unicode characters
but without single quotes. All items must be separated by a comma.
Examples:
Inductor ({label = 'L4', device = 'lcr', setup = {}, criteria = {50uH < l < 60uH}, terminals =
{test = 1, com = 3}})
IncFailureCounter()
Purpose:
Increases global failure counter.
Description:
This function increases the Failure Counter by 1.
Syntax:
IncFailureCounter()
Returned Value:
No value returned.
Parameters:
No parameters
Examples:
if FailureCounter() < 1 then
IncFailureCounter()
end
InfoMessageBox()
Purpose:
Display an information.
Description:
This function displays an information in a dialog box with a blue title bar. The title and the message of the
dialog box are customizable. Wait for user input or abort the test (time out).
Syntax:
InfoMessageBox(Msg, Title)
Returned Value:
No value returned.
Parameters:
Msg (string) Message to displays in the dialog box. The string must contain only Unicode
characters.
*Title (string) Optional title of the dialog box. By default, is ‘Information’. The string must
contain only Unicode characters.
Examples:
InfoMessageBox ('This is an info message box without title')
InputNumber()
Purpose:
Request a user input, require a number.
Description:
Displays a dialog box requesting the user to enter a number. Some parameters are customizable. The
entered value must be only a number, negative numbers are permitted.
Syntax:
InputNumber(Label, Default, Title, Min, Max, Placeholder)
Returned Value:
Integer: an integer containing the user's entered number. "nil" is returned if no number is entered.
Parameters:
Label (string) A descriptive message of what the user should enter. The string must
contain only Unicode characters.
*Default (integer) Default number that should be displayed when the dialog box first appears
*Title (string) Title of the dialog box. The string must contain only Unicode characters.
*Min (integer) A number that will be used for validation of input. The smallest allowed
value.
*Max (integer) A number that will be used for validation of input. The largest allowed value.
*Placeholder (string) A text which is display in the empty number box. Purpose is to show a
helpful hint to the user.
Examples:
users_input_number = InputNumber ('Please input a number: ', 42,
'InputNumber Custom Title', 10, 50, 'This is placeholder/hint text.')
InputPassword()
Purpose:
Requesting a user to input a password.
Description:
Displays a dialog box requesting the user to enter a password. Data entry by the user is masked.
Syntax:
InputPassword (Label, Default, Title, Placeholder)
Returned Value:
String: a string containing the user's entered text. "nil" is returned if no text is entered.
Parameters:
Label (string) A descriptive message of what the user should enter. The string must
contain only Unicode characters.
*Default (string) Default string that should be displayed masked when the dialog box first
appears
*Title (string) Title of the dialog box. The string must contain only Unicode characters.
*Placeholder (string) A text which is display in the empty password box. Purpose is to show a
helpful hint to the user.
Examples:
hipotpassword = InputPassword ('Please input the password to enable Hipot: ', ‘’, 'HiPot
Authorization', 'EnterPassword.')
InputText()
Purpose:
Requesting a text input.
Description:
Displays a dialog box requesting the user to enter text. Some parameters are customizable.
Syntax:
InputText (Label, Default, Title, Postfix)
Returned Value:
String: a string containing the user's entered text.
Parameters:
Label (string) A descriptive message of what the user should enter. The string must
contain only Unicode characters.
*Default (string) Default string that should be displayed when the dialog box first appears.
The string must contain only Unicode characters.
*Title (string) Title of the dialog box. The string must contain only Unicode characters.
*Postfix (string) A text which is added at the end of the user's answer. The string must
contain only Unicode characters.
Examples:
users_input_text = InputText ('Please enter something: ', 'Default answer',
'Optional Title', 'Postfix text.')
IR()
Purpose:
Run a IR Test.
Description:
Perform an Insulation Resistance Test on the specified nets. This function sets the test result flag.
Syntax:
IR(Label, Device, TestParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the Hipot test. It must be a string with Unicode characters.
Device (string) Device Options: ‘hvdc’, ‘hi’, or ‘smu’ (device availability depends on system configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
For results in Ohms specify minimum IR value
r > minimum IR value (with or without units)
or
r_min = minimum IR value
Report Table:
Please refer to Report Options for more details.
Options Table:
float_unused - if set to true (1) points not defined in the Net List or the Mapping Table will
remain off/disconnected during the test cycle. Default set to false (0).
disable_mass_groups_split - if set to true (1) large groups created by the mass algorithm
that fail the pass criteria will not be reduced in size to reduce leakage due to grouping.
Default behaviour splits large groups.
mass_rpt_verbose - if set to true (1) each mass phase will enter result data and the
measurements of the phase. Default set to false (0).
max_test_faults - limit the number of failures and exit the command, test continues.
Default is unlimited.
Diagnose Table:
Please refer to Diagnose Options for details.
Examples:
local IRParams = {
setup = {v = 500V, dwell=5s},
criteria = {r > 100M},
options = {test_mode = 'linear'},
diagnose = {scan = 'linear'},
}
IR('DC IR Example', 'hvdc', IRParams, 'all')
IRSoakAndMeasure()
Purpose:
Group Wire HiPot checks leakage between the nets charged by Soak Parameters.
Description:
After charging a group of nets with points/nets in the soak table, the command checks the
leakage between the nets charged by soak table and the nets in measure table. If the measured
resistance exceeds the limit specified using the parameter table, or if the measured current is less
than the limit specified using the parameter table, the test passes. This function sets the test
result flag.
After the Soak (dwell) time has elapsed, the first point connected to the COM Bus is ‘switched’ (extremely
quickly) to the TEST Bus and the leakage/resistance is measured. The point is then returned to the COM
Bus.
Syntax:
IRSoakAndMeasure(Label, Device, Parameters, SoakTestPointsList, MeasureKelvinTestPointsList)
Returned Values:
Pass: boolean
SoakOK: boolean
SoakIR: number
ScanOK: boolean
ScanIR: table
Parameters:
Label (string) The label of the Soak and Measure test. It must be a string with Unicode
characters.
Device (string) Device Options: ‘hvdc’, ‘hi’, or ‘smu’ (device availability depends on system
configuration)
TestParameters (table) Setup Table:
Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
For results in Ohms specify minimum IR value
r > minimum IR value (with or without units)
or
r_min = minimum IR value
Report Table:
Please refer to Report Options for more details.
Options Table:
float_unused - if set to true (1) points not defined in the Net List or the Mapping
Table will remain off/disconnected during the test cycle. Default set to false
(0).
SoakTestPointsList (Table) The table of test points/nets set for soaking the points/nets.
Table of system points, connector references or net references.
MeasureKelvinTestPointsList The table of test points/nets set for measuring the points/nets.
(table) Table of system points, connector references or net references. These points
must be wired in Kelvin.
Examples:
local SoakMeasureParams = {
setup = {v=500, soak_time = 10, dwell=.1, rampup=1, arc_retry_on_rampup=0},
criteria = {i_max = 10e-6},
}
IRSoakAndMeasure('My Soak and Measure', 'hvdc', SoakMeasureParams, {GND.1},
{J1.31,J1.36,J1.37,J1.39})
Isolation()
Purpose:
Verify low voltage isolation (no shorts) between nets and points.
Description:
Perform an Isolation Test on the specified nets. This function sets the test result flag.
Syntax:
Isolation(Label, Device, TestParameters, TestPoints)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the Hipot test. It must be a string with Unicode characters.
Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
Specify minimum Isolation value
r < minimum Isolation value (with our without units)
r_min = minimum Isolation value
Report Table:
Please refer to Report Options for more details.
Options Table:
float_unused - if set to true (1) points not defined in the Net List or the Mapping Table will
remain off/disconnected during the test cycle. Default set to false (0).
disable_mass_groups_split - if set to true (1) large groups created by the mass algorithm
that fail the pass criteria will not be reduced in size to reduce leakage due to grouping.
Default behaviour splits large groups.
mass_rpt_verbose - if set to true (1) each mass phase will enter result data and the
measurements of the phase. Default set to false (0).
max_test_faults - limit the number of failures and exit the command, test continues.
Default is unlimited.
Diagnose Table:
Please refer to Diagnose Options for Isolation, IR and DWV for details.
Examples:
local IsolationParams = {
setup = {i = 1mA},
criteria = {r > 1kΩ},
options = { test_mode = 'mass'},
diagnose = {scan = 'binary'},
}
LoadSwitching()
Purpose:
Change the switching configuration.
Description:
This function loads a new switching configuration during the program execution from a specified file.
Syntax:
LoadSwitching(Name)
Returned Value:
No value returned.
Parameters:
Name (string) The name of the configuration file to load. It must be a string with Unicode
characters. The name must correspond to an existing switching file in the
program database
Examples:
LoadSwitching('Switching Database 1')
Menu()
Purpose:
Show a menu.
Description:
Displays a dialog box containing a menu. The purpose of a menu is to control program flow and
execution. If you choose to have a "nested" menu, then a "Back" button will be displayed on the dialog
box, otherwise, just the typical "Abort" button will be displayed on the dialog box.
Syntax:
Menu(Items, Nested, Title)
Returned Value:
- Integer: a number representing the index of the selected item. A "nil" is returned if the user chooses
"Abort", "Back", or the "X" button on the dialog box.
- String: a string containing the text of the selected item from the menu. A "nil" is returned if the user
chooses "Abort", "Back", or the "X" button on the dialog box.
Parameters:
Items (string) A list of strings in a Lua "table", containing all selectable elements. The
string must contain only Unicode characters.
*Nested (Boolean) Controls if the menu is nested or not. Set to true to display a back button,
otherwise false. Defaults to false.
*Title (string) The header of the dialog box. By default, is "Menu". The string must contain
only Unicode characters.
Examples:
mindex, mvalue = Menu ({'Menu Item 1', 'Menu Item 2', 'Menu Item 3'}, true, 'My Menu')
mindex, mvalue = Menu ({'Menu Item 1', 'Menu Item 2', 'Menu Item 3'}, false, 'My Menu')
Miscellaneous.Beep()
Purpose:
Make an audible alert.
Description:
Activates the system speaker for MPT and the buzzer of a connected Light Tower for both MPT and
MPT2.
Syntax:
Miscellaneous.Beep(duration)
Returned Value:
No Returned Value
Parameters:
Duration (integer) Duration of the beep in milliseconds.
Examples:
Miscellaneous.Beep(2000)
Miscellaneous.ImportLibrary()
Purpose:
Import functions created with MPTLua Commands from a separate Lua file.
Description:
This function allows the user to load functions created in a separate Lua file that were created using
MPTLua Commands.
Syntax:
Miscellaneous.ImportLibrary(filenamewithpath)
Returned Value:
No returned value.
Parameters:
Filenamewithpath The file to be loaded with the path. If Path is absent file will be loaded from
(string) application root (e.g. c:\MPT Studio\)
Examples:
Miscellaneous.ImportLibrary('mylua.lua')
myfunction(10)
Miscellaneous.ImportLibrary('c:\\Custom Library\\mylua.lua')
myfunction(10)
Miscellaneous.ImportLibrary(ProductPath()..'mylua.lua')
myfunction(10)
Probe()
Purpose:
Ask user to probe.
Description:
Causes a dialog box to appear asking for the user to probe required test points. Some parameters are
customizable.
Syntax:
Probe (TestPoints, Options)
Returned Value:
Boolean: true upon probing successful return, otherwise false.
Parameters:
TestPoints (table) The tests point to test the continuity. It can be a system test point, a connector
reference, list of system test points or connector references, a group name or
nets.
*Options (table) A table with the next parameters:
• Title: The title of the dialog box. It must be a string with Unicode
characters.
• Timeout_sec: An integer which is an amount of time to wait for user to
probe pin in seconds.
• Timeout_visible_sec: An integer for when to begin showing time out
countdown in seconds.
Examples:
Probe ({2, J1.5})
Probe ({{2, 'Pin number 2'}, {3, 'Pin number 3'}}, {timeout_sec=10, timeout_visible_sec=5})
ProductName()
Purpose:
Get the current product name.
Description:
This function returns a string containing the current product name.
Syntax:
ProductName()
Returned Value:
String: a string containing the name of the product.
Parameters:
No parameters.
Examples:
date_stamp = os.date('%m%d%y%H%M%S')
if not Failed() then
SetReportFileName(ProductName()..'-'..date_stamp..'-PASSED')
else
SetReportFileName(ProductName()..''..date_stamp..'-FAILED')
end
ProductPath()
Purpose:
Get the current product path.
Description:
This function returns a string containing the path of the current product.
Syntax:
ProductPath()
Returned Value:
String: a string containing the relative path of the product.
NOTE: If mpt_product file is loaded via MPT Studio, the absolute path will be returned.
Parameters:
No parameters.
Examples:
path = ProductPath()
PS36GetChannelType()
Purpose:
Get the current channel type.
Description:
This function returns a number containing the channel type.
Syntax:
PS36GetChannelType({address,channel})
Returned Value:
String: a number containing the channel type.
[1] = pwr36.TYPE_PS1
[2] = pwr36.TYPE_PS2
[3] = pwr36.TYPE_PS3
[4] = pwr36.TYPE_DRY
Parameters:
address: The address of the PS36 board
channel: The channel to retrieve the type from.
Examples:
PS36GetChannelType({address=2, channel=1})
PS36SetChannel()
Purpose:
Turn on/off PS36 Channel.
Description:
This function turns on/off the specified channel
Syntax:
PS36SetChannel({address,channel,enable})
Returned Value:
No return value.
Parameters:
address: The address of the PS36 board
channel: The channel to turn on or off
enable: Turn on (1). Turn off (0)
Examples:
PS36SetChannel({address=2,channel=3,enable=1})
PS36SetChannelType()
Purpose:
Set Channel Type to its hardwired configuration (on the board).
Description:
Sets the channel type to the same type as the board is configured.
Syntax:
PS36SetChannelType({address,channel,type})
Returned Value:
No Return Value.
Parameters:
address: The address of the PS36 board
channel: The channel to set the type
type: number as per list below
[1] = pwr36.TYPE_PS1
[2] = pwr36.TYPE_PS2
[3] = pwr36.TYPE_PS3
[4] = pwr36.TYPE_DRY
Examples:
PS36SetChannelType({address=2,channel=5,type=1})
PS36SetFan()
Purpose:
Enable/Disable the fan on PS36 output.
Description:
This function enables and disables the fused (5A) output of the fan circuit on the PS36 board.
Syntax:
PS36SetFan({address,mode})
Returned Value:
No return value
Parameters:
address: The address of the PS36 board
mode: Enabled (1), Disabled (0)
Examples:
PS36SetFan({address=2,mode=1})
PS36SetSources()
Purpose:
Get the current product path.
Description:
This function returns a string containing the path of the current product.
Syntax:
PS36SetSources({address,src_tbl,disch_tbl})
Returned Value:
No return value
Parameters:
address: The address of the PS36 board
src_tbl: Enable/disable each of the three input sources {1,0,0} -- {PS1,PS2,PS3}
disch_tbl: Enable/disable each discharge circuit {1,0,0} -- {disch1,disch2,disch3}
Examples:
-- Enable PS1 and channel 1:
PS36SetSources({address=4,src_tbl={1,0,0}, disch_tbl={0,0,0}})
PS36SetChannel({address=4,channel=1,enable=1})
RadioBox()
Purpose:
Show a radio box window.
Description:
Creates a dialog box with radio buttons. The purpose is to prompt for uneditable user input and respond
accordingly. Some parameters are customizable.
Syntax:
RadioBox (Label, Items, Default, Title)
Returned Value:
Integer: The numeric representation of the selected item. For example, if the second item in the list is
chosen, then the number "2" will be returned.
Parameters:
Msg (string) A description of the radio box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialog box appears.
*Title (string) A title for the header of the dialog box. Default title is "Prompt". The string
must contain only Unicode characters.
Examples:
num_radio_button = RadioBox ('Please, select an item.', {'Box 1', 'Box 2', 'Box 3'},
'Box 2', 'Custom title')
ReadHumidity()
Purpose:
Read the environment humidity.
Description:
ReadHumidity() to take a humidity reading of the surrounding environment. It is reported in Relative
Humidity (RH).
Syntax:
ReadHumidity (Device, SkipReport)
Returned Value:
Integer: containing the humidity value read
Parameters:
Device (string) The unit with which the measure must be performed. The only approved and
supported device is Comet T3311 Temperature and Humidity RS232 Probe
(referred to as "ths" by the MPT).
SkipReport (Boolean) A Boolean value which defaults to false. If false, tells the MPT system to
print out the humidity reading to the console, otherwise do not print anything.
Examples:
ReadHumidity ('ths', false)
humidity, humidity_unit = ReadHumidity ('ths', true)
ReadI()
Purpose:
Perform a current measurement.
Description:
ReadI() performs a current measurement using the specified device, on the MPT's current switching
state. It returns a test result depending of criteria. This function sets the test result flag.
Syntax:
ReadI (Label, Device, TestParameters, Criteria)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the current measurement. It must be a string with Unicode characters.
Device (string) Device Options: ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
The criteria to valid the test or not. It can be a value with tolerance or a min and a
max.
The value must be expressed like this: xxuA, xxmA, xxA
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- i > 5mA, i < 2mA
- i_min=150mA, i_max=300mA
- i_min = 150e-3, i_max = 300e-3
- 1mA < i < 9mA
Examples:
ReadI ('Test current', 'dmm', {i_range=100mA, i_resolution=1mA, nplc=0.2, delay=0},
{i_min = 90mA, i_max = 110mA})
ReadTemperature()
Purpose:
Read the environment temperature.
Description:
ReadTemperature tells the MPT System to take a temperature reading of the surrounding environment. It
is reported in Celsius (˚C).
Syntax:
ReadTemperature (Device, SkipReport)
Returned Value:
Integer: containing the temperature value read
Parameters:
Device (string) The unit with which the measure must be performed. The only approved and
supported device is Comet T3311 Temperature and Humidity RS232 Probe
(referred to as "ths" by the MPT).
SkipReport (Boolean) A Boolean value which defaults to false. If false, tells the MPT system to
print out the temperature reading to the console, otherwise do not print
anything.
Examples:
ReadTemperature ('ths', false)
ReadUserIO()
Purpose:
Interact with external discrete inputs to the MPT or MPT2.
Description:
This function is used to read inputs present on the MPT IO-6, MPT-12 boards or the MPT2 User I/O.
Syntax:
ReadUserIO(Index)
Returned Value:
Integer: corresponds to the value on the input. 1 if a voltage is present, otherwise 0.
Parameters:
Index (integer) The index of the input to read.
Examples:
state = ReadUserIO(6)
ReadV()
Purpose:
Perform a voltage measurement.
Description:
ReadV tells the MPT System to perform a voltage measurement using the specified device, on the MPT's
current switching state. It returns a test result depending of criteria. This function sets the test result flag
Syntax:
ReadV (Label, Device, TestParameters, Criteria)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
Label (string) The label of the current measurement. It must be a string with Unicode characters.
Device (string) Device Options: ‘msr’, ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters Setup Table:
(table) Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria Table:
The criteria to valid the test or not. It can be a value with tolerance or a min and a
max.
The value must be expressed like this: xxmV, xxV
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- v > 5V, v < 2V
- v_min=15V, v_max=30V
- v_min=15, v_max=30
- 1V < v < 9V
Examples:
ReadV ('Test voltage', 'msr', { }, {v_min = 4.9V, v_max = 5.1V})
RemoteAPIUserCallback()
Purpose:
Send information to the remote API program.
Description:
“User Callback Return Data” is information returned from the test program whenever it executes a
function called “RemoteAPIUserCallback”.
The purpose of this feature is to provide the programmer of a Remote API program with the ability to
obtain information beyond the basic Pass/Fail data. It can be useful in situations, such as:
- Remote test program debugging
- Obtaining detailed information for logging
Syntax:
RemoteAPIUserCallback(value)
Returned Value:
No value returned.
Parameters:
Value (string) String with Unicode characters to send to the remote API program.
Examples:
RemoteAPIUserCallback ('Test program finished: PASS')
Report.Fail()
Purpose:
Add a fail line in the report.
Description:
Prints a customized red line on the report output, representing a Test Failure. This is useful for more
advanced testing under scenarios where the user wishes to control failure output, instead of using the
standard MPT Fail.
Syntax:
Report.Fail(Line)
Returned Value:
No value returned.
Parameters:
Line (string) Text to output as fail. It must be a string with Unicode characters.
Examples:
Report.Fail('This is a fail report line')
Report.Header()
Purpose:
Customize the report header.
Description:
All ".PDF" generated reports have a predefined header with basic information. This function allows you to
append additional information to this header. The format of information in the header is, "Left Side: Right
Side".
Syntax:
Report.Header(Name, Value)
Returned Value:
No value returned.
Parameters:
Name (string) Text for the left side of the header field. It must be a string with Unicode
characters.
Value (string) Text for the right side of the header field. It must be a string with Unicode
characters.
Examples:
Report.Header('Header Left Side', 'Header right side')
Report.Hint()
Purpose:
Add a hint line in the report.
Description:
Prints a customized light gray line on the report output. This is useful for more advanced testing under
scenarios where the user wishes to provide less common information or hints.
Syntax:
Report.Hint(Line)
Returned Value:
No value returned.
Parameters:
Line (string) Text to output as hint. It must be a string with Unicode characters.
Examples:
Report.Hint('This is a hint report line')
Report.Info()
Purpose:
Add an info line in the report.
Description:
Prints a customized gray line on the report output. This is useful for more advanced testing under
scenarios where the user wishes to provide general information or other customized information on the
report output, instead of the MPT Standard reporting.
Syntax:
Report.Info(Line)
Returned Value:
No value returned.
Parameters:
Line (string) Text to output as information. It must be a string with Unicode characters.
Examples:
Report.Info('This is an info report line')
Report.Pass()
Purpose:
Add a pass line in the report.
Description:
Prints a customized green line on the report output, representing a MPT Pass. This is useful for more
advanced testing under scenarios where the user wishes to control pass output, instead of using the
standard MPT Pass.
Syntax:
Report.Pass(Line)
Returned Value:
No value returned.
Parameters:
Line (string) Text to output as pass. It must be a string with Unicode characters.
Examples:
Report.Pass('This is a pass report line')
Report.Warning()
Purpose:
Add a pass line in the report.
Description:
Prints a customized orange line on the report output, representing a MPT Pass. This is useful for more
advanced testing under scenarios where the user wishes to control the output.
Syntax:
Report.Warning(Line)
Returned Value:
No value returned.
Parameters:
Line (string) Text to output as a warning. It must be a string with Unicode characters.
Examples:
Report.Warning('This is a warning report line')
Resistor()
Purpose:
Do a resistance measurement in connection with an item of the resistor list.
Description:
Resistor() performs a resistance measurement on one or more items in the resistor list. This function sets
the test result flag.
Syntax:
Resistor(ResistorList)
Returned Value:
Boolean: True if command successful and no failures counted. Otherwise, false.
Parameters:
ResistorList A list of 1 or more resistors based on setup; or a list of 1 or more named resistors
(table) from the "Resistor List".
Label (string) The label of the resistor measurement. It must be a string with Unicode characters.
Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’, ‘smu’ or ‘lcr’ (device availability depends on
system configuration)
Setup Table Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
Criteria (table) The criteria to valid the test or not. It can be a value with tolerance or a min and a
max.
The value must be expressed like this: xxmΩ, xxΩ, xxkΩ, xxMΩ, xxGΩ
The tolerance must be in percent and with the symbol “%”.
If the minimum and maximum are used, the syntax is:
- r > 10Ω, r < 15Ω
- r_min=10Ω, r_max=15Ω
- r_min=10, r_max=15
- 10Ω < r < 15Ω
Terminals The tests point to make the measurement. It can be a system test point, a connector
(table) reference, list of system test points or connector references, a group name or nets.
If the measurement is a 4-wire measurement, each test and com value must contain
2 points.
If the table contains an item of the resistor list, the parameters are:
Item The name of an item in the resistor list. It’s a string of Unicode characters but
without single quotes. All items must be separated by a comma.
Examples:
Resistor command from test list:
or
SetAllLow()
Purpose:
Set all relays to the COM of the Main Bus.
Description:
SetAllLow() sets all the points on the Main Bus to COM.
Syntax:
SetAllLow()
Returned Value:
No value returned.
Parameters:
No parameters
Examples:
SetAllLow()
SetGlobalPersist()
Purpose:
Create of modify a global persistent variable.
Description:
This function allows to create a global persistent value. This value is available in all MPT programs. This
value is not deleted when you restart MPT Studio, MPT Engine or the computer.
Syntax:
SetGlobalPersist (Key, Value)
Returned Value:
No value returned.
Parameters:
Key (string) The identification key of the variable. It must be a string with Unicode
characters.
Value (Integer, Boolean, The value of the global persistent variable. It can be an integer, a string, a
Table or String) Boolean, or a table. If it’s a string, it must be a string with Unicode
characters.
Examples:
SetGlobalPersist ('my_global_val', 6)
SetHigh()
Purpose:
Set relays of the specified points.
Description:
SetHigh() sets the specified test point(s) on the Main Bus to TEST.
Syntax:
SetHigh(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set high relays. Can be a system test point, a
String or Table) connector reference, list of system test points or connector references, or a
group name.
Examples:
SetHigh(1)
SetHigh({1,3,6})
SetHigh({'net2', 'net8'})
SetHigh({group1, group2})
SetHighAuxiliary()
Purpose:
Set relays of the specified points.
Description:
SetHighAuxiliary() sets the specified test point(s) on the Auxiliary Bus to TEST.
Syntax:
SetHighAuxiliary(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set high auxiliary relays. Can be a system test point,
String or Table) a connector reference, list of system test points or connector references, or
a group name.
Examples:
SetHighAuxiliary(1)
SetHighAuxiliary({1,3,6})
SetHighAuxiliary({'net2', 'net8'})
SetHighAuxiliary({group1, group2})
SetHighExternal()
Purpose:
Set relays of the specified points.
Description:
SetHighExternal() sets the specified test point(s) on the External Bus to TEST.
Since MPT2 can define multiple external buses you can also call the specific name of the bus.
Syntax:
SetHighExternal (TestPoints, Name)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set high external relays. Can be a system test point,
String or Table) a connector reference, list of system test points or connector references, or
a group name.
*Name (string) Name of external bus. -- Optional parameter for MPT2
Examples:
SetHighExternal (1)
SetLabelPrinterData()
Purpose:
Setup label format for printing.
Description:
This function allows sets up the data to be used with the configured label printer.
Note: Limited printer support - please contact Nexeya Canada for details.
Syntax:
SetLabelPrinterData (Data, Config)
Returned Value:
No value returned.
Parameters:
Data (table) A string table with information to print. Each value of the table will be printed on a
different line. This function allows a maximum of ten values. The different values
must be string with Unicode characters.
*Config (table) Config is for display or not a border in the printed label. It is possible to modify the
width and the height of this border with three parameters:
• border_on: Boolean to determinate if a border will be printed or not.
• border_width: integer to indicate the width of the border. The value is in dots.
• border_height: integer to indicate the height of the border. The value is in dots.
Examples:
data= {"ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN"}
params= {border_on=true, border_width=500, border_height=400}
SetLabelPrinterData (data, params)
SetLogFileName()
Purpose:
Customize the log file name.
Description:
MPT Studio test programs automatically create a log file, with the same name as the product, in the
default log directory (db\tests\logs). The log file is in a ".CSV" format. This function allows the user to
change the default name of the log file. It is recommended that the function be used at the start of a test
program, or before any form of logging begins.
NOTE: This log file is for service support only and is not customizable nor can user data be
entered. Please refer to the CSV File Generator for Custom Reporting for more details.
Syntax:
SetLogFileName(Name)
Returned Value:
No value returned.
Parameters:
*Name (string) The optional name of the log file (product name by default). It must be a
string with Unicode characters.
Examples:
SetLogFileName ()
SetLogFileName('mpt2documentation_log')
SetLow()
Purpose:
Set relays of the specified points.
Description:
SetLow() sets the specified test point(s) on the Main Bus to COM.
Syntax:
SetLow(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set low relays. Can be a system test point, a
String or Table) connector reference, list of system test points or connector references, or a
group name.
Examples:
SetLow(1)
SetLow({1,3,6})
SetLow({'net2', 'net8'})
SetLow({group1, group2})
SetLowAuxiliary()
Purpose:
Set relays of the specified points.
Description:
SetLowAuxiliary() sets the specified test point(s) on the Auxiliary Bus to COM.
Syntax:
SetLowAuxiliary(TestPoints)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set low auxiliary relays. Can be a system test point, a
String or Table) connector reference, list of system test points or connector references, or a
group name.
Examples:
SetLowAuxiliary(1)
SetLowAuxiliary({1,3,6})
SetLowAuxiliary({'net2', 'net8'})
SetLowAuxiliary({group1, group2})
SetLowExternal()
Purpose:
Set relays of the specified points.
Description:
SetLowExternal() sets the specified test point(s) on the External Bus to COM. Since MPT2 can define
multiple external buses you can also call the specific name of the bus.
Syntax:
SetLowExternal (TestPoints, Name)
Returned Value:
No value returned.
Parameters:
TestPoints (Integer, Specified test points to set low external relays. Can be a system test point, a
String or Table) connector reference, list of system test points or connector references, or a
group name.
*Name (string) Name of external bus. -- Optional parameter for MPT2
Examples:
SetLowExternal(1)
SetLowExternal({1,3,6}, 'ext_named_bus')
SetPersist()
Purpose:
Create or modify a persistent variable.
Description:
This function allows to create a persistent value. This value is not deleted when you restart MPT Studio,
MPT Engine or the computer.
Syntax:
SetPersist (Key, Value)
Returned Value:
No value returned.
Parameters:
Key (string) The identification key of the variable. It must be a string with Unicode
characters.
Value (Integer, Boolean, The value of the persistent variable. It can be an integer, a string, a
Table or String) Boolean, or a table. If it’s a string, it must be a string with Unicode
characters.
Examples:
SetPersist('my_val', 6)
SetPersist('my_tab', {6,21,15,47})
SetPersist('my_str', 'hello')
SetPersist('my_bool', false)
SetPPSOff()
Purpose:
Switch of the generated voltage or current.
Description:
SetPPSOff() turns off an external Programmable Power Supply (PPS).
Syntax:
SetPPSOff (Device, Parameters)
Returned Value:
Boolean: True if the sequence execution did not encounter any error, otherwise false.
Parameters:
Device (string) Device Options: ‘hi’, ‘hcs’, ‘dlm’ or ‘smu’ (device availability depends on system configuration)
Examples:
SetPPSOff('dlm')
SetPPSOff('smu')
SetPPSOn()
Purpose:
Generate a voltage or a current.
Description:
Turn on an external Programmable Power Supply (PPS).
Syntax:
SetPPSOn (Device, Parameters)
Returned Value:
Boolean: True if the sequence execution did not encounter any error, otherwise false.
Parameters:
Device
(string) Device Options: ‘hi’, ‘hcs’, ‘dlm’ or ‘smu’ (device availability depends on system configuration)
Parameters Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
(table)
Examples:
SetPPSOn ('dlm', {v = 50V, i = 10mA})
SetReportFileName()
Purpose:
Customize the report file name.
Description:
Report files are named with the same name as the product, in the default report directory
(db\tests\results). The report file is in ".PDF" format. This function allows the user to change the default
name of the report file. It is recommended that the function be used at the start of a test program, or
before the report gets created.
Please note that this function applies to the MPT Studio environment's "Auto File" feature. This will not
affect the "Save To PDF" feature.
Syntax:
SetReportFileName(Name)
Returned Value:
No value returned
Parameters:
*Name (string) The optional name of the report file (product name by default). It must be a
string with Unicode characters.
Examples:
date_stamp = os.date('%m%d%y%H%M%S')
if not Failed() then
SetReportFileName(ProductName()..'-'..date_stamp..'-PASSED')
else
SetReportFileName(ProductName()..''..date_stamp..'-FAILED')
end
SetReportLeftOffset()
Purpose:
Customize the left offset in the report.
Description:
This function allows to add an offset to the text in the report. It means that the text will be shifted to the
right.
Syntax:
SetReportLeftOffset(LeftOffset)
Returned Value:
No value returned.
Parameters:
LeftOffset (integer) Spacing in number of character to be added between the left margin and the
text. It adds a specified number of “hidden” characters before the text.
Examples:
SetReportLeftOffset(20)
SetReportLocation()
Purpose:
Customize the report location.
Description:
This function allows to change the location of report. By default, is (db\tests\results).
Syntax:
SetReportLocation(Path)
Returned Value:
No value returned.
Parameters:
Path (string) Full path of the location of the report. It must be a string with Unicode
characters.
Examples:
SetReportLocation('C:\\Users\\<username>\\Desktop')
SetReportPageOrientation()
Purpose:
Customize the page orientation of the report.
Description:
This function allows to change the page orientation. By default, the orientation is portrait.
Syntax:
SetReportPageOrientation(PageOrientation)
Returned Value:
No value returned.
Parameters:
PageOrientation Orientation of the report page. There is only two value accepted:
(string) • ‘PORTRAIT’: for a portrait orientation (by default)
• ‘LANDSCAPE’: for a landscape orientation
The string must be in capitals.
Examples:
SetReportPageOrientation('LANDSCAPE')
SetReportPageOrientation('PORTRAIT')
SetResults.Abort()
Purpose:
Set the test result to abort.
Description:
This function set the final test result to abort.
Syntax:
SetResults.Abort()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Abort()
SetResults.Add.Abort()
Purpose:
Add an abort state into the test result.
Description:
Adding abort state into the test result.
Syntax:
SetResults.Add.Abort()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Add.Abort()
SetResults.Add.Fail()
Purpose:
Add a fail state into the test result.
Description:
Adding fail state into the test result. Increments the fail count.
Syntax:
SetResults.Add.Fail()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Add.Fail()
SetResults.Add.FailToTest()
Purpose:
Add a fail to test state into the test result.
Description:
Adding fail to test state into the test result. Increments the FailToTest count.
Syntax:
SetResults.Add.FailToTest()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Add.FailToTest()
SetResults.Add.Pass()
Purpose:
Add a pass state into the test result.
Description:
Adding pass state into the test result.
Syntax:
SetResults.Add.Pass()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Add.Pass()
SetResults.Add.PassedWarnings()
Purpose:
Add a passed with warnings state into the test result.
Description:
Adding passed with warnings state into the test result.
Syntax:
SetResults.Add.PassedWarnings()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Add.PassedWarnings()
SetResults.Fail()
Purpose:
Set the test result to fail.
Description:
This function set the final test result to fail.
Syntax:
SetResults.Fail()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Fail()
SetResults.FailToTest()
Purpose:
Set the test result to fail to test.
Description:
This function set the final test result to fail to test.
Syntax:
SetResults.FailToTest()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.FailToTest()
SetResults.Pass()
Purpose:
Set the test result to pass.
Description:
This function sets the final test result to pass.
Syntax:
SetResults.Pass()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Pass()
SetResults.Remove.Abort()
Purpose:
Remove an abort state into the test result.
Description:
Removing abort state into the test result.
Syntax:
SetResults.Remove.Abort()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Remove.Abort()
SetResults.Remove.Fail()
Purpose:
Remove a fail state into the test result.
Description:
Removing fail state into the test result.
Syntax:
SetResults.Remove.Fail()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Remove.Fail()
SetResults.Remove.FailToTest()
Purpose:
Remove a fail to test state into the test result.
Description:
Removing fail to test state into the test result.
Syntax:
SetResults.Remove.FailToTest()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Remove.FailToTest()
SetResults.Remove.Pass()
Purpose:
Remove a pass state into the test result.
Description:
Removing pass state into the test result.
Syntax:
SetResults.Remove.Pass()
Returned Value:
No value returned.
Parameters:
No parameters.
Examples:
SetResults.Remove.Pass()
SetUserIO()
Purpose:
Interact with the external environment.
Description:
This function is used to drive relays present on the MPT IO-6, MPT-12 and MPT2 UserIO boards.
Syntax:
SetUserIO (Index, Value)
Returned Value:
No value returned.
Parameters:
Index (integer) The index of the relay to switch.
Value (integer) A number equivalent to the state of the relay (0 to open, 1 to close).
Examples:
SetUserIO (1, 0)
SetUserIO (6,1)
ShowHTML()
Purpose:
Show an HTML page.
Description:
Causes a dialogue box to appear displaying the rendered (end result) of an HTML code.
Syntax:
ShowHTML(StringStream, Title, Options)
Returned Value:
No value returned.
Parameters:
StringStream (string) The entire HTML code. Take into consideration the escape characters in a
programming language. For example, if in your HTML code you have a
quote (") then the program code equivalent would be \".
*Title (string) Title of the HTML window.
*Options (table) full_window = boolean
width = size in pixels (integer)
height = size in pixels (integer)
timeout_sec = time in seconds (number)
timeout_visible_sec = time in seconds (number)
Examples:
ShowHTML("<html><head><title>MPT 2 Documentation</title></head><body>MPT 2
Documentation</body></html>")
ShowHTMLFile()
Purpose:
Show an HTML page.
Description:
Causes a dialogue box to appear displaying the rendered (end result) HTML file.
Syntax:
ShowHTMLFile(FileName, Title, Options)
Returned Value:
No value returned
Parameters:
FileName (string) The filename of your ".html" file. The default location that the test program
will look for the HTML file is the root of the MPT Studio directory. The string
must contain Unicode characters.
*Title (string) Title of the HTML window.
*Options (table) full_window = boolean
width = size in pixels (integer)
height = size in pixels (integer)
timeout_sec = time in seconds (number)
timeout_visible_sec = time in seconds (number)
Examples:
ShowHTMLFile("mpt2.html",’MyHTMLWindow’,{full_window=false,width=800,height=800,timeout_sec=160})
ShowHTMLFile("c:\\temp\\mpt2.html",{full_window=true,timeout_sec=160,timeout_visible_sec=20})
ShowTextBox()
Purpose:
Display a multiline text box for operator data entry
Description:
Opens a framed text box with an area for data entry.
Syntax:
status,message = ShowTextBox({title=title,message=mymessage,position={width=width},timeout_sec =
60,timeout_visible_sec = 60})
Returned Value:
status: boolean
message: table
Parameters:
title (string) The entire HTML code. Take into consideration the escape characters in a
programming language. For example, if in your HTML code you have a
quote (") then the program code equivalent would be \".
message (string) Title of the HTML window.
position (table) width = size in pixels (integer)
height = size in pixels (integer)
timeout_sec (number) Dialogue box timeout in seconds
Examples:
status,message = ShowTextBox({title='Non-Conformance Report',message='Enter Non-
Conformance',position = {width=800,height=640},timeout_sec = 60,timeout_visible_sec = 60})
if status then
Report.Info('Data Entered:')
for x=1,#message do
Report.Info(message[x])
end
end
Sleep()
Purpose:
Make a pause in the program.
Description:
This function does a pause during the program execution, it can also display a message to the user.
Syntax:
Sleep (Seconds, Label)
Returned Value:
No value returned.
Parameters:
Seconds (integer) Time of the pause in seconds.
*Label (string) An optional message to explain to the user the cause of the pause. It must
be a string with Unicode characters.
Examples:
Sleep (10)
UICheckBox()
Purpose:
Add a checkbox to a form with other UI items.
Description:
Adds a checkbox to UI forms
Syntax:
UICheckBox({label, default })
Returned Value:
Boolean: result of the checkbox, true if is checked, otherwise false.
Parameters:
Label (string) A description of the checkbox purpose. The string must contain only Unicode
characters.
*Default (Boolean) A default value for the checkbox (true or false). By default, is false.
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
UIComboBox()
Purpose:
Adds a ComboBox to a form.
Description:
Add a ComboBox to a form.
Syntax:
UIComboBox (Label, Items, Default)
Returned Values:
- Integer: a number representing the index of the selected item.
- String: a string containing the text of the selected item from the list.
Parameters:
Msg (string) A description of the combo box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialog box appears.
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
UIDataList()
Purpose:
Adds a Data List to a form.
Description:
Add a DataList to a form.
Syntax:
UIDataList (Label, Items, Default)
Returned Values:
- String: a string containing the text of the selected item from the list.
Parameters:
Msg (string) A description of the data list box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
*Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialogue box appears.
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
UIInputPassword()
Purpose:
Requesting a user to input a password.
Description:
Displays a dialog box requesting the user to enter a password. Data entry by the user is masked.
Syntax:
UIInputPassword (Label, Default)
Returned Value:
String: a string containing the user's entered text. "nil" is returned if no text is entered.
Parameters:
Label (string) A descriptive message of what the user should enter. The string must
contain only Unicode characters.
*Default (string) Default string that should be displayed masked when the dialog box first
appears
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
UIRadioBox()
Purpose:
Add a RadioBox to a form.
Description:
Add a RadioBox to a form.
Syntax:
UIRadioBox (Label, Items, Default)
Returned Value:
Integer: The numeric representation of the selected item. For example, if the second item in the list is
chosen, then the number "2" will be returned.
Parameters:
Label (string) A description of the radio box’s purpose. The string must contain only
Unicode characters.
Items (table) A list of string items in a Lua table, containing all selectable elements. Items
must be strings with Unicode characters.
Default (string) One of the values from the "Items" parameter. This will be the default
selected item when the dialog box appears.
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
UIShowPrompt()
Purpose:
Show an HTML form with user entry fields.
Description:
Show a form that allows users to enter data or select items for test setup.
Syntax:
UIShowPrompt({ui_controls = table, position={width=800,height=900}, timeout_sec=600,
timeout_visible_sec=60})
Returned Value:
Table of results returned
Parameters:
ui_controls Table Table of UI elements to be shown in the form.
Position Table Adjust the width and height of the form
Timeout_sec How long the form remains before aborting
Timeout_visible_sec The number of seconds for the count down to aborting
Examples:
Report.Info('CREATE A FORM')
local ui_controls = {title='Combination Input FORM'}
ui_controls[#ui_controls + 1] = UIInputText({label = 'Input Text', default = 'default1'})
ui_controls[#ui_controls + 1] = UIComboBox({label = 'ComboBox', items = {'cb1', 'cb2', 'cb3',
'cb4'}, default = 'cb2'})
ui_controls[#ui_controls + 1] = UICheckBox({label = 'CheckBox', default = true})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIRadioButton({label = 'RadioButton1', items = {'rd1', 'rd2',
'rd3'}, default = 'rd2'})
ui_controls[#ui_controls + 1] = UIDataList({label = 'label6', items = {'dl1', 'dl2', 'dl3'},
default = ''})
ui_controls[#ui_controls + 1] = UIInputPassword({label = 'label7', default = 'password'})
WaitForContinuity()
Purpose:
Wait for continuity.
Description:
Wait for continuity informing the user of what is happening with a dialog box. Continues when continuity
appears or when user selects This function sets the test result flag.
Syntax:
WaitForContinuity (Title, Message, from_pts, to_pts, device, TestParameters, r_max, timeout_sec)
Returned Value:
Boolean: True if command successful no failures counted. Otherwise, false.
Parameters:
Title (string) Title of the dialog box.
Message (string) A text to inform the user of what is happening.
From_pts (Table, Starting points of continuity to wait. Can be a system test point, a connector reference, list
Integer or String) of system test points or connector references, or a group name.
To_pts (Table, Ending points of continuity to wait. Can be a system test point, a connector reference, list
Integer or String) of system test points or connector references, or a group name.
Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’ or ‘smu’ (device availability depends on system
configuration)
TestParameters Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
(table)
R_max (number) Maximum resistance to validate the test in base units ()
Examples:
WaitForContinuity ('Wait for continuity', 'Connect 1 to 2', J1.1, J1.2, 'msr',
{i = 100mA}, 20, 60)
WaitForNoContinuity
Purpose:
Wait for a no continuity.
Description:
Wait a no continuity informing the user of what is happening by a dialog box. This function sets the test
result flag.
Syntax:
WaitForNoContinuity (Title, Message, from_pts, to_pts, TestParameters, setup, r_min, timeout_sec)
Returned Value:
Boolean: True if command successful no failures counted. Otherwise, false.
Parameters:
Title (string) Title of the dialog box.
Message (string) A text to inform the user of what is happening.
From_pts (Table, Starting points of no continuity to wait. Can be a system test point, a connector
Integer or String) reference, list of system test points or connector references, or a group name.
To_pts (Table, Ending points of no continuity to wait. Can be a system test point, a connector
Integer or String) reference, list of system test points or connector references, or a group name.
Device (string) Device Options: ‘msr’, ‘hi’, ‘hcs’, ‘dmm’ or ‘smu’ (device availability depends on
system configuration)
TestParameters Refer to MPT/MPT2 Instruments for Setup Table based on the selected Device.
(table)
R_min (number) Minimum resistance to validate the test in base units ()
Examples:
WaitForNoContinuity ('Wait for no continuity', 'Disconnect 1 to 2', J1.1, J1.2, 'msr', {i =
1mA}, 1000, 60)
WarningMessageBox()
Purpose:
Display a warning.
Description:
This function displays a warning in a dialog box with an orange title bar. The title and the message of the
dialog box are customizable. Wait for user input or abort the test (time out).
Syntax:
WarningMessageBox (Msg, Title)
Returned Value:
No value returned.
Parameters:
Msg (string) Message to displays in the dialog box. The string must contain only Unicode
characters.
*Title (string) Optional title of the dialog box. By default, is ‘Warning’. The string must
contain only Unicode characters.
Examples:
WarningMessageBox ('This is a warning message box without title')
General Information
This API is for remote control of a MPT Engine. Its purpose is to provide the customer with the ability to
automate their testing process.
API Functions
MPT_OpenConnectionA
What it does
Attempts to open a connection to the specified computer running MPT Engine.
Compatibility function for the programmer if is preferred to use ASCII characters only.
Parameters
const char * address
▪ The IP Address/Computer Name of the computer to connect to running MPT Engine.
Returns
int
▪ 0 – Successful connection to MPT System.
▪ 1 – Connection to MPT System Failed.
Use “MPT_GetOpenConnectionErrorMessageA” to get the error message.
MPT_OpenConnection:
What it does
Attempts to open a connection to the specified computer running MPT Engine.
Parameters
const wchar_t * address
▪ The IP Address/Computer Name of the computer to connect to running MPT Engine.
Returns
int
▪ 0 – Successful connection to MPT System.
▪ 1 – Connection to MPT System Failed.
Use “MPT_GetOpenConnectionErrorMessage” to get the error message.
MPT_OpenConnectionLabViewA
What it does
LabView integration function. If designing a VI module in LabView, use this function to open a connection
the computer running MPT Engine.
Attempts to open a connection to the specified computer running MPT Engine.
Compatibility function for the programmer if is preferred to use ASCII characters only.
Parameters
const char * address
▪ The IP Address/Computer Name of the computer to connect to running MPT Engine.
Returns
int
▪ 0 – Successful connection to MPT System.
▪ 1 – Connection to MPT System Failed.
Use “MPT_GetOpenConnectionErrorMessageA” to get the error message.
MPT_OpenConnectionLabView
What it does
LabView integration function. If designing a VI module in LabView, use this function to open a connection
the computer running MPT Engine.
Attempts to open a connection to the specified computer running MPT Engine.
Parameters
const wchar_t * address
▪ The IP Address/Computer Name of the computer to connect to running MPT Engine.
Returns
int
▪ 0 – Successful connection to MPT System.
▪ 1 – Connection to MPT System Failed.
Use “MPT_GetOpenConnectionErrorMessage” to get the error message.
MPT_CloseConnection
What it does
Closes the connection to the specified MPT System.
Parameters
const int id
▪ The ID of the MPT System to close the connection to.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_Abort
What it does
Sends a request to MPT Engine to abort the test.
Parameters
const int id
▪ The ID of the MPT System to force the abort on.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_StartTest
What it does
Sends a request to MPT Engine to start the test.
Parameters
const int id
▪ The ID of the MPT System to have start the test.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_GetPDFReport
What it does
Sends a request to MPT Engine to provide the PDF report of the last completed test.
Parameters
const int id
▪ The ID of the MPT System to retrieve the report from.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_LoadUUTByNameA
What it does
o Sends a request to MPT Engine to load the specified product file.
o Product is local to the system with MPT Engine.
o Compatibility function for LabView integration or if the programmer prefers to use ASCII characters
only.
Parameters
const int id
▪ The ID of the MPT System.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_LoadUUTByName
What it does
Sends a request to MPT Engine to load the specified product file.
Product is local to the system with MPT Engine.
Parameters
const int id
▪ The ID of the MPT System.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_LoadUUTByFileNameA
What it does
Sends a request to MPT Engine to load the specified product file by file name. The file name can either
be a relative path (MPT Engine executable location is the base) or an absolute path.
File name is local to the system with MPT Engine.
Compatibility function for LabView integration or if the programmer prefers to use ASCII characters only.
Parameters
const int id
▪ The ID of the MPT System.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_LoadUUTByFileName
What it does
Sends a request to MPT Engine to load the specified product file, by file name. The file name can either
be a relative path (MPT Engine executable location is the base) or an absolute path.
File name is local to the system with MPT Engine.
Parameters
const int id
▪ The ID of the MPT System.
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_LoadUUTByData
What it does
Sends a request to MPT Engine to load product by binary data. The data is parsed into a product file and
then loaded and executed by the MPT System.
Note: The MPT System assumes the binary data being received is correct Product Data. If the
data is not valid, the MPT System will not be able to parse the data correctly and an error will
occur.
Parameters
const int id
▪ The ID of the MPT System to send the data to.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_ReloadUUTDatabase
What it does
Sends a request to MPT Engine to reload the product database.
This is used if a new product has been designed and should be reflected in the product database.
Parameters
const int id
▪ The ID of the MPT System to reload the product database.
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_GetFileA
What it does
Sends a request to MPT Engine to get the specified file from the MPT System.
Compatibility function for LabView integration or if the programmer prefers to use ASCII characters only.
Parameters
const int id
▪ The ID of the MPT System to get the file from.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_GetFile
What it does
Sends a request to MPT Engine to get the specified file from the MPT System.
Parameters
const int id
▪ The ID of the MPT System to get the file from.
▪ This is the ID provided by the
“MPT_OpenConnection”/”MPT_OpenConnectionA”/”MPT_OpenConnectionLabView”/”MPT_OpenConnec
tionLabViewA” function(s).
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_SetPingConfig
What it does
Sets the PING configuration for all MPT Systems connected to MPT Engine.
The reason for this is eliminate the client’s need to depend of the Operating System’s ability to handle the
TCP protocol.
By providing our own control values over TCP, the operating system is eliminated and removes potential
network bottlenecks.
Parameters
const PPINGCONFIG * data
▪ Refer to MPT Structures section for structure definition
Returns
int
▪ 0 – Specified ID was valid.
▪ 1 – Specified ID was not found or invalid.
MPT_GetOpenConnectionErrorMessageA
What it does
Gets the most recent error message.
Compatibility function for LabView integration or if the programmer prefers to use ASCII characters only.
Returns
char *
▪ String containing the error message.
MPT_GetOpenConnectionErrorMessage
What it does
Gets the most recent error message.
Returns
wchar_t *
▪ String containing the error message.
MPT Structures
CALLBACKDATA Structure
Definition
typedef struct CALLBACKDATA {
int id;
int event_id;
void *pdata;
} *PCALLBACKDATA;
This is the “parent” structure. All basic information is located in this structure. Depending on the result of
the function call, all data pertaining to the function will be contained in a sub-structure accessible via the
pdata variable.
Parameters
int id
▪ The handle/ID of the MPT System the results are originating from.
int event_id
▪ Contains one of the 9 event constants (see “MPT Constants”)
void *pdata
▪ Pointer to one of the sub-structures containing the results of the function call.
CALLBACKDATALABVIEW Structure
Definition
Structs in LabView are called Clusters:
This is the structure for all LabView related commands. Contained within this Cluster is the unique Event
ID generated by LabView and the results of all remote function calls.
Parameters
integer32 EventID
▪ LabView’s uniquely generated ID.
Msg pData
▪ The results of the function calls.
CALLBACKSTRINGDATA Structure
Definition
typedef struct CALLBACKSTRINGDATA {
char data;
wchar_t dataw;
} *PCALLBACKSTRINGDATA;
This is a sub-structure. Contains all information for functions expecting a string result.
Parameters
char data
▪ Data in ASCII compatible format. Any function call that uses LabView or ASCII will have the return
data in here.
wchar_t dataw
▪ Functions that do not request ASCII for return data will have its information stored in this variable.
CALLBACKINTEGERDATA Structure
Definition
typedef struct CALLBACKINTEGERDATA {
int data;
} *PCALLBACKINTEGERDATA;
This is a sub-structure. Contains all information for functions expecting an integer result.
Parameters
int data
CALLBACKGETFILEDATA Structure
Definition
typedef struct CALLBACKGETFILEDATA {
int len;
unsigned char * data;
CALLBACKSTRINGDATA filename;
} *PCALLBACKGETFILEDATA;
This is a sub-structure. Contains all information for functions expecting a binary data result.
Parameters
int len
▪ Length of data received. 0 if no data was received.
CALLBACKSTRINGDATA filename
▪ The pointer to sub-structure “CALLBACKSTRINGDATA”, which contains the file name of the
corresponding from which the data was retrieved.
PINGCONFIG Structure
Definition
typedef struct PINGCONFIG {
int ping_timeout_ms;
int ping_interval_ms;
} *PPINGCONFIG;
This is a sub-structure. Contains the information used for setting the ping information on MPT Engine.
Parameters
int ping_timeout_ms:
▪ The amount of time to wait before the ping times out in milliseconds. Default value is 5000ms.
int ping_interval_ms:
▪ The amount of time to wait between pings in milliseconds. Default value is 1000ms.
MPT Constants
MPT_EVENT_TESTER_CONNECTED
Value: 1
Meaning: The MPT System is connected to MPT Engine.
Structure Containing Information:
CALLBACKINTEGERDATA
Integer Value:
0 – Connected
1 – Not connected
MPT_EVENT_TESTER_READY
Value: 2
Meaning: The MPT System is ready to start testing.
Structure Containing Information:
CALLBACKINTEGERDATA
Integer Value:
0 – Ready
1 – Not ready
MPT_EVENT_TESTER_BUSY
Value: 3
Meaning: The MPT System is busy (i.e. In the middle of a test, initializing, probing, etc…).
Structure Containing Information:
CALLBACKINTEGERDATA
Integer Value:
0 – Busy
1 – Not busy
MPT_EVENT_TESTER_PUT_TEST_START
Value: 4
Meaning: The test has been started. This signal is sent before the start of a test.
Structure Containing Information:
No structure used.
MPT_EVENT_PUT_TEST_DONE
Value: 5
Meaning: The MPT has finished testing.
Structure Containing Information:
Refer to “MPT_EVENT_PUT_TEST_DONE Sub-Constants” section
MPT_EVENT_PUT_LOADED
Value: 6
Meaning: The product file has been loaded/unloaded.
Structure Containing Information:
CALLBACKSTRINGDATA
MPT_EVENT_ERROR_MSG
Value: 7
Meaning: There is an error message.
Structure Containing Information:
CALLBACKSTRINGDATA
MPT_EVENT_TESTER_PUT_UI
Value: 8
Meaning: User interaction is required with the MPT System for the testing process to continue.
Structure Containing Information:
CALLBACKINTEGERDATA
Integer Value:
0 – Interaction with MPT System required.
1 – No interaction with MPT System required.
MPT_EVENT_TESTER_RPT_DATA
Value: 9
Meaning: Report data is available.
Structure Containing Information:
CALLBACKGETFILEDATA
MPT_EVENT_PUT_TEST_DONE Sub-Constants
This event has associated sub-constants that can be found in the sub-structure
CALLBACKINTEGERDATA (see “MPT Structures”).
This is an integer variable. Below are the values:
Value Meaning
2 Passed
4 Passed with warnings
8 Failed
16 Failed to measure
32 Aborted
Example
If your test “Failed to measure”, then you would receive the integer value 16 in the sub-structure
CALLBACKINTEGERDATA.