修改TestStand Testsocket 从非0开始
Issue Details
I am running the parallel process model or batch model and want my test sockets to be numbered from 1 onwards. Currently my socket number settings are zero based. How do I make this change?
Solution
In order to change test socket numbers you need to edit the modelsupport2 source code. Before doing this, you should first copy over the components to the TestStand user directory. To accomplish these tasks, use the following steps:In TestStand 4.0 and earlier:
- Copy the directory
<TestStand>\Components\NI\Models\TestStandModels
to<TestStand>\Components\User\Models\TestStandModels.
- Open
<TestStand>\Components\User\Models\TestStandModels\ modelsupport2.prj
file in LabWindows™/CVI. If you are working in the parallel process model, openparalleluutdlg.c
in the workspace. If you are working in the batch model, openbatchuutdlg.c
- For either parallel process model or batch model, search for the line containing the code
- sprintf(tmpNumBuf, "%d", testSocketIndex);
- sprintf(tmpNumBuf, "%d", testSocketIndex+1);
- Save the file.
- Compile the project in CVI.
- In CVI 2012 and earlier: select Build»Create Debuggable Dynamic Link Library.
- In CVI 2013 and later: select Build»Target Type»Dynamic Link Library and then Build»Build.
In TestStand 4.1 and later:
- Copy the directory <TestStand>\Components\Models\TestStandModels to <TestStand Public>\Components\Models\TestStandModels, if those files are not already copied there.
- Open
<TestStandPublic>\Components\Models\TestStandModels\ modelsupport2.prj
file in LabWindows/CVI. If you are working in the parallel process model, open paralleluutdlg.c in the workspace. If you are working in the batch model, open batchuutdlg.c - Follow steps 3-5 from above. The Test UUT panel in TestStand will now show the desired numbering.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000015ClhSAE&l=zh-CN&OpenDocument=