5 running trainer, Running trainer – Teledyne LeCroy ST Automated Test Suite User Manual User Manual
Page 17

17
4.5 Running Trainer
To run a Trainer project, you must specify the SSG file for each port on which you want to start
Trainer. Call the StartGenerationByPort function and specify the Trainer file, board index, and port
index to start generation on the specified port. For example, if you have set port configuration to
DEVICE_CONFIG_AT_AT_0_0, then call StartGenerationByPort for the first and second ports. To
stop generation, call the StopGenerationByPort function for each port on which Trainer has started.
Use the following code to start and stop generation for ports 0 and 1:
'--------- Set port configuration to DEVICE_CONFIG_T_T_A_A ---------
MySASAutomation.SetPortConfiguration 0, 88
If Err.Number <> 0 Then
MySTATS.ReportError Err.number, Err.Description
Else
MySTATS.ReportText ("Set port configuration is done")
End If
'--------- Start first Generation on Port 0 ---------
MySASAutomation.StartGenerationByPort "E: \Projects\AnalyzerTrainer-Port one.ssg", 0, 0
If Err.Number <> 0 Then
MySTATS.ReportError Err.number, Err.Description
Else
MySTATS.ReportText ("Generation is started on Port 1")
End If
'--------- Start second Generation on Port 1 ---------
MySASAutomation.StartGenerationByPort "E:\Projects\AnalyzerTrainer-Port Two.ssg", 0, 1
If Err.Number <> 0 Then
MySTATS.ReportError Err.number, Err.Description
Else
MySTATS.ReportText ("Generation is started on Port 2")
End If
'-------- Stop Generation on Port 0 --------
MySASAutomation.StopGenerationByPort 0, 0
If Err.Number <> 0 Then
MySTATS.ReportError Err.number, Err.Description
Else
MySTATS.ReportText ("Generation is stopped on port 1")
End If
'-------- Stop Generation on Port 1 --------
MySASAutomation.StopGenerationByPort 0, 1
If Err.Number <> 0 Then
MySTATS.ReportError Err.number, Err.Description
Else
MySTATS.ReportText ("Generation is stopped on Port 2")
End If