SetSimulateProcedures Procedure

Version 9

 

 

Add the specified procedure(s) to the simulation procedures or IO Tables  list.

 

Syntax

[ bStatus= ] SetSimulateProcedures ( [sProcedureOrSubModule] )

The SetSimulateProcedures procedure syntax has the following parts:

 

Name

Type

Description

bStatus

Bool

True for success  and False for Failure (incorrect procedure or sub-module name)

sProcedureOrSubModule

Val String

Procedure or IO Table path name or a Procedures or IO Tables sub-module name or a module shortcut

Comments

Use this function to set the procedures (or IO tables) to be simulated. You can pass in a module shortcut name, sub-module name or procedure included in the sub-module. The name should be specified with full path name for the  procedure. The full path name will have the following format:

ProgramShortcutName | System | DriverShortcutName][.SubModule[.DLLLibraryName].Procedures | IOTables][.ProcedureName | IOTableName]

For example:

"DMM"

"DMM.Procedures"

"DMM.IOTables"

"DMM.SetRange"

"Language.User32."

"Language.User32.Procedures"

Example

The following example check if simulation is ON and if not, it prompt the user to enable simulation. If the simulation is enabled, it will select the simulated procedures using SetSimulateProcedures procedure:

 

Procedure OnInit(): Void

--------------------------------------------------------------------------------

{

if App.Simulate=False

if MsgBox("This example shows how to use ATEasy 9 Simulation.\r\n" \

"The example program simulate Agilent 34401A DMM and the Language example.\r\n" \

"When running with Simulate flag turn ON, set from ATEasty conditions menu, \r\n" \

"It will call the OnSimulate() event instead of calling the actual instrument driver calls.\r\n" \

"Missing hardware interfaces/instruments will not generate any errors.\r\n\r\n" \

        "Do you want to turn On the simulation?\r\n", aMsgYesNo)=aIdYes

! turn on simulations, same as selecting Simulate from the Conditions menu

TestExec Execution SetSimulation (True) ! similar to app.Simulate=True

endif

endif

! Select what to simulate

! code to handle these reside in OnSimulate of this driver! code to handle these reside in OnSimulate of this driver

if App.Simulate

! simulate all the  DMM procedures and IO Tables

SetSimulateProcedures("DMM.IOTables")   ! all DMM driver IO Tables

SetSimulateProcedures("DMM.Procedures") ! all DMM driver Procedures

SetSimulateProcedures("DMM.SetRange")   ! one DMM procedure just as an example

! the following 3 functions achieve the same thing

SetSimulateProcedures("Language.User32.Procedures.GetSystemMetrics")

SetSimulateProcedures("Language.GetSystemMetrics")

SetSimulateProcedures("Language.User32.GetSystemMetrics")

! this one does all the DLL procedures

SetSimulateProcedures("Language.User32.Procedures")

 

! two language program procedures

SetSimulateProcedures("Language.MultipleMatrix")

SetSimulateProcedures("Language.FillTestResultInfo")

endif

}

See Also

AApp.Simulate, OnSimulate Event, GetSimulateParameter