11-23-2017 07:52 AM - edited 11-23-2017 07:55 AM
Hi All,
I would like to start teststand (for now just the development environment) with a given sequence file from a C# application.
The reason is as follows:
We have a C# TCIP server that can receive messages from clients connected to that server. When the server receives a message like "StartTestStand(C:/folder_bar/foobar.seq)" it should ideally startup teststand with the given sequence file, specified in the path.
it should close when the command "StopTestStand()" is recieved.
Can anyone guide me trough this process?
I have already found the following:
http://zone.ni.com/reference/en-XX/help/370052P-01/tsfundamentals/infotopics/net_ui_start_shutdown/
The first link only starts the engine, not the development environment, whilst I can't get the second link to work, since I don't really know where to find (or get) the engine class.
Background info: I've been looking into C# for a week, so I only have a basic understanding of it. I'm also not a "real" computer programmer, so please be gentle on me. :')
Thanks!
Solved! Go to Solution.
11-24-2017 10:36 AM
Hi,
Here is a link to Dynamically Set the Client Sequence File, this shows how to do this in LabVIEW however should show the process for C#,
I hope this is of help,
Thanks,
Amy
11-28-2017 09:37 AM - edited 11-28-2017 09:39 AM
Hi Amy,
Thank you for your answer. Unfortunately it was not really what I was looking for.
However, it made me look into the examples and found the "TestStand UI with Native Conrols".
This gave me a really good starting point.
To summarize what I have accomplished so far and the workflow:
- Initially there will be no teststand deployment running.
- A running TCPIP server will intercept a message, comming from a client. This message contains something like: DoMeasure(filepath, user).
- The server will then startup the deployment version, while automatically logging in to the given user and loading the sequence file, as given by the filepath.
- The sequence file automatically runs and finishes.
There is only one thing I want to do, that is automatically setting a UUT name at the start. As it is now, the user needs to fill this in and we don't want that.
For this, I want to make use of a CallBack override and then reading a FileGlobal variable "UUT_Serial" that I have created from within the server.
However, I have trouble creating this variable, since I can't find a way to find the Sequence Context. I want to use the API to retrieve the Sequence Context and not calling a function in teststand to hand it over to me.
My main question at the moment is:
Can the Sequence Context be obtained from the "AxApplicationMgr" or the "AxSequenceFileViewMgr" class?
(I will afterwards post my step-by-step solution here to this topic)
Thanks!
11-29-2017 07:34 AM
I have found the solution to the variable creation here:
https://forums.ni.com/t5/NI-TestStand/Globals-API-c-teststand/td-p/2254302
This means I have everything I need. I will document my solution later today or tomorrow.
11-29-2017 08:10 AM
Hi,
That's great I am glad you have everything you need now!
Thanks,
Amy
11-30-2017 08:56 AM
I have attached the notes that I have taken during this tryout.
Please don't pay attention to spelling and syntax in this document, since it is merely a quick note for me to pick up at a later time.
Also my primary language is not English.
I hope it can help some of you in the future!