beautypg.com

Teledyne LeCroy ST Automated Test Suite User Manual User Manual

Page 18

background image

18

If you have only one port for generation, you can use another pair of starting and stopping generation
functions, which require no board or port index, because Trainer can only be started on the single
Trainer port. Specify the Trainer port by the SetPortConfiguration function. Use the following code:


'--------- Set Port Configuration to DEVICE_CONFIG_AT_0_0_0 ---------
MySASAutomation.SetPortConfiguration 0, 72
If Err.Number <> 0 Then

MySTATS.ReportError Err.number, Err.Description

Else

MySTATS.ReportText ("Set port configuration is done")

End If

'--------- Start an generation file ---------
MySASAutomation.StartGeneration "E:\Projects\AnalyzerTrainer.ssg"
If Err.Number <> 0 Then

MySTATS.ReportError Err.number, Err.Description

Else

MySTATS.ReportText ("Generation is started")

End If

'--------- Stop Generation ---------
MySASAutomation.StopGeneration
If Err.Number <> 0 Then

MySTATS.ReportError Err.number, Err.Description

Else

MySTATS.ReportText ("Generation is stopped")

End If

To exit, call the GetTrainerExitCode function. Use the following code to exit generation for port 0 of
board 0.


ExitCode = MySASAutomation.GetTrainerExitCode(0, 0)
If Err.Number <> 0 Then

MySTATS.ReportError Err.number, Err.Description

Else

MySTATS.ReportText ("ExitCode is Received")

End If