TestStand'​s container type from LabVIEW
Hi,
With a LabVIEW's VI, I'd would like to set a TestStand cointainer as a TDMS file properties.
So i tried to get all the elements of my container using PropertyObject Class (ThisContext.AsPropertyObject)
with this method :PropertyObject.GetValVariant
( lookupString, options)
But i get an error because of Set TDMSproperty method doesn't accept the variant type i got.
So I'd like to get the type (string, number....) of each elements of this container to setting them as TDMS properties one by one through a for loop.
How can i do that?
Alex
I have a TestStand sequence. In this sequence i have defined a container (filesGlobals) who contains some results of the current Sequence execution. At the end of the sequence execution (in the cleanup) i want to get all the container's values to set them in a TDMS file.
So i have made a VI who gets all these datas using ActiveX properties. This VI will be called as a TS step.
But i don't know what are the types (string, number, boolean, array of...) of the varaibles of my container, so i use a method to get Variant. When i want to set my TDMS with this variant an error appears because the variant type is not allowed for TDMS files. So i need to make a VI who could get the type of each variable of my container to convert it in this type and so send it in my TDMS.
TestStand FileGlobals LabVIEW
MyContainer{} TabName TabValue TabType
Name (string) (0) Name (0) AlexString String
Reference (Number) ==>> (1) Reference (1) 1003214 Number
ResultOfTest (Boolean) (2) ResultOfTest (2) True Boolean
Errors (Arrays of string) (3) Errors (3) String
.... [0] ErrorA
[1] ErrorB
With this 3 tabs i could send each varaibles of my TS container elements by elements usisng a for loop as define here:
for (i=0, i++, i<sizeof(TabName))
if (Tabtype(i) == String)
{TabValue(i) = getStringVal}
if (Tabtype(i) == Number)
{TabValue(i) = getStringVal}
if (Tabtype(i) == Boolean)
{TabValue(i) = getStringVal}
Set TDMSNameProperty
Set TDMSValue
So i need to get the type of all my container's varaibles.
Like that i will not obliged to get only Variant and could get the correct type to send to the TMDS...
Alex
Similar Messages
-
I would like to build a data base in teststand which collect data from labview program , if you have example (sequence) that give me some way to build sequence that have step of action for labview and step
data baseThere is an example in the \TestStand\Examples\Database directory. Basically there are two ways to connect to your database.
1. You can use the TestStand database step types. There are steps for opening/closing a database connection, opening/closing an SQL statement, and a step for performing a data operation.
2. The other way is to use the TestStand database logging capability to write your results to the database. This is the way I would recommend. With database logging, you use the step results container to record all your results as the sequence runs. (This is done automatically by TestStand). When the sequence is complete, the process model calls a "Log to Database" sequence that will write the results to the database. You must define your datab
ase schema using Configure->Database Options. There are some default (or example) schema definitions already defined. Refer to chapter 18 of your TestStand manual.
Another way to log the data as the sequence is running is shown in the \TestStand\Examples\OnTheFlyReports. This has the advantage of recording data as it is obtained, but it is not as efficient in terms of using a database connection. I don't recommend using this method.
Please post again if you have any more questions. If you are using stored procedures with your database, I can probably give you some tips.
Mark -
Retrieving teststand step type from labview
Hi
I am looking for help/advice about being able to read the type of step that has just been executed from labview. I am current using "Runstate.Step.StepType" and saving the result to a local variable that is being read from labview. The issue I have is the function does not return meaningful data. The function always returns "StepType, IID = {39B81800-2FE4-11D3-AFAC-006097B79EF5}" regardless of the type of step.
Does anyone know of another command that will return the type of step i.e. Numeric, multi Numeric, string or Boolean.
Many Thanks
DaveSee if this helps: http://zone.ni.com/devzone/cda/epd/p/id/2738
It uses TypeOf() function and then stores the step type in local varaible.
CLD,CTD -
Display "About NI TestStand..." from LabVIEW
I'm creating a LabVIEW UI that calls TestStand to run sequence files and I want to include a menu Item to display the "About NI TestStand..." window, but I can seem to figure out to tell TestStand to launch the window from LabVIEW.
Can anyone direct me to the appropriate API call or example?
Ryan Podsim, CLA
BEI Precision Systems and Space Company
www.beiprecision.com
Solved!
Go to Solution.The Example you mentioned was informative, but I see can't seem to find a way to display the "About NI TestStand..." dialog. The list of commands to bind to menu itemsm via Insert Command into Menu.vi, has just about every item in the TestStand help except the About item.
This is the dialog I'm looking for.
Ryan Podsim, CLA
BEI Precision Systems and Space Company
www.beiprecision.com -
How to Pass Container in a queue from LabVIEW to TestStand?
I was succussful to pass simple type(string, number) using queue from LabVIEW to TestStand base on the example: Use TestStand Queue.seq.
I want to pass a container variable from LabVIEW to TestStand. But there are some errors happen.
Anyone who can help on this issue?
Thanks in advance.
Attachments:
Sequnce and VI.zip 28 KB
VI Error.jpg 61 KB
Run_time Error -17001.jpg 41 KBYou ought to have a listener somewhere that calls a function
to then set up the loaded swf. In that function you can do this
kind of thing:
var ldrmc:MovieClip;
function swfloaded (e:Event) {
ldrmc = null;
if (e.target.content is MovieClip) {
ldrmc = e.target.content as MovieClip;
If the swf was published for AS3, then ldrmc will end up
being a pointer to the root of the swf, and you can call functions
or set variables however you like. If it was an AS2 swf, ldrmc
would be null.
Inside the loaded swf you could try trace statements, to make
sure you're looking up the hierarchy far enough. Like this:
trace(MovieClip(parent.parent));
If that doesn't trace MainTimeLine, then maybe you're not
looking up far enough. Don't forget that the swf itself is in a
loader, and so may be one level down from where you thought it was. -
Change numeric format type under edit limits from Labview
Hello,
is it possible to change under Edit Limits the numeric format type (Hex, Decimal, Real...) from LabView?
Is there any way to change this types from Labview. Because i can't found an variable like step.result.numeric or what ever.
I hope somebody know what i mean.
thank you and best reguardsHi Tumbler,
Within the TestStand Sequence Editor for a step which has limits, then on the Edit Limits dialog should be a control which will allow you to change the format which is set to <default>. I think you might have to click on another button which will bring up another dialog which will allow you to change the format. ( I haven't got testStand to hand at the moment, so I am working from memory).
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer -
How to access the Custom Data type variable given in Expression edit control To and From LabVIEW
Hello, I would like to know how to access the custom data type variable given in the Espression Edit Control from LabVIEW and vice-versa
Say, the FileGlobals.Reference_Handle (Custom Data Type Variable) contains the
VISA I/O session (Which in turn contains VISA_DeviceName: String, Session: Number),
Channel1: Number and
Channel2: Number
I am expecting the user to give FileGlobals.Reference_Handle as the input at the ExpressionEdit Control in the edit screen of the VI Call.
I would like to know how to get the values of this custom data type to LabVIEW?
Say, if I have the Cluster in LabVIEW like VISA I/O session (Deive Name and Session Number), Channel1 and Channel2
how do i need to set this cluster to the Custom Data type variable in TestStand?
Thanks and Regards
PrakashHi,
TestStand to LabVIEW: i didnt understand what you r trying to achieve. But if you are using references, Use Property nodes and Invoke nodes to achieve what you want in LabVIEW.
LabVIEW to TestStand: check the image below: You need to click the button next to 'container'. I have used a cluster output in the VI.
Hope this helps
.......^___________________^
....../ '---_BOT ____________ ]
...../_==O;;;;;;;;_______.:/
Attachments:
1.JPG 187 KB -
Change element type of an array of containers (from LabVIEW)
Hi,
I have an empty Array of Container type and need to insert an element of a custom data type definition. If I already have an element of the type definition, it is simple to copy that element and insert it as a new element. But inserting a new element to a empty array I need to specify that the element should be of this data type.
Getting the type definition with the Method "GetTypeDefinition" and inserting this as a new value simply "moves" my type definition to the inserted element (which is not suppose to happen). Can't find a method to change data type and seems that none of the property options does the trick to.
I just need to do the same as "change type" in the TestStand editor, just inside LabVIEW.
What did I miss??
Thanks
Note: Use edit of the step in the attached sequence file. Collapse and expand "Locals" after running the Edit function to see the result.
Attachments:
InsertElementInArrayOfContainersOfTypeDef.seq 5 KB
InsertArrayElement.vi 35 KBHi,
When i am writing my stuff i was not able to open your SequenceFile. Now i was.
My upper example is only working for arrays of Types. It is also working on empty Arrays, too.
Please tell me why you do not use an array of types ?
Regards
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e= -
How do I return a Boolean array from LabView to TestStand?
I am trying to return a Boolean array from Labview to TestStand and have TS evaluate the results. I can do this for arrays of integers or reals but booleans do not work. I tried copying the PassFailTest step type and adding an array of Bool but I couldn't get it to evaluate the array. It simply always passed. How can this be done?
Bob A.I have thought about evaluating the Boolean data in TestStand but, as you say, this is a lot of work. What I have been doing is to map the boolean data to integers in LV (very easy) and then use the multiple numeric step type to evaluate the integer array automatically. This feels kludgy and I have tried a couple of times to create a "multiple boolean" step type with little success. I'm surprised TS hasn't anticipated a test returning multiple pass/fail results. I do this all the time for production code.
What I have tried is to copy MultipleNumericLimitsTest data type to a custom type and add a BooleanArray with a data type Array of Boolean[0..empty]. Then when I specify module, I select Step.BooleanArray as the value. The last step (that I know of) is to select Step.BooleanArray as the data source in the edit limits window. At this point if I run the test, I get the error "expect numeric, found boolean" (or something similar). When I look at the properties of my custom step type, the Substeps has DoMultiNumericMeasEvaluation as the Post-Step. I believe this is the root of my problem but I can't figure out how to change this to "DoMultiBooleanMeasEvaluation" or similar. Any Ideas? -
Change teststand post actions from labview
Hi,
Is there a way to change the post action of a test in teststand from Labview.
At the moment, if one of the tests fail out of limits then the post action is set to 'ON FAIL - GO TO NEXT STEP' but if the unit does not run then a diagnostics labview routine runs and at the end of that I would like to change the teststand post actions to 'ON FAIL - GO TO CLEANUP'
Can you tell me if this is possible
Thanks
ChrisHi
Yes it should possible.
Step step = m_SequenceContext.Step; if(nValue == 0) {
step.FailAction = "Next";step.FailActionTarget = ""; }
else{step.FailAction = "Goto"; step.FailActionTarget = "<End>";
Regards
Juergen
EDIT: This example Goto Endgroup --Sorry!
Message Edited by j_dodek on 04-21-2010 01:51 PM
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Attachments:
DotNet.zip 17 KB -
Pass error cluster from labview dll to teststand
Hello,
I just want to pass an error cluster from a dll compiled in LV7.1 to TestStand 3.1. I never receive the contents of the LV error cluster in TS. I compiled my function with standard calling convention option, this should work. In my VI I generate only an error and pass to error output.
LV Settings:
TS settings:
regards
MBMB,
please follow the info in this KB:
http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67?OpenDocument
Please note that using "By Value" will never return any values to TestStand!
You cannot use the default error-container in TestStand to receive data from the LV error cluster if you compile the VI into a LV DLL.
So either you choose to follow the KB or you split up the error cluster in your LV VIs to return error.occurred (boolean), error.code (numeric i32) and error.msg (LV String) .
hope this helps,
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
Add limits to step settings via TestStand API from LabVIEW
Dear LabVIEW and TestStand Community!
I'm trying to add FileGlobal Variables as limits to TestStand step NumericLimit programmatically, via LabVIEW, via TS API. I attach screenshot of the code, which I use (part of it - the module, which only sets values to low and high limit of the step), and also I attach, what I manage to get.
In TS, when I open sequence file, after running of the code, I can see in the description line of the test, that it accepted limits, which I set from LV - you can see it from the screenshot, it is marked with yellow. But in the Tab "Limits", there are still default numeric values, not FileGlobal Variables.
Could anyone explain, what doest it mean, and how to set up them correctly?
Thanks a lot in advance!
Solved!
Go to Solution.
Attachments:
Limits.PNG 33 KB
Add Limits.PNG 15 KBIt's kind of sequence generator what I'm doing now...
Thank you very much for fast reply, but when I setup "UsexxxExpr" to true, it doesn't change the situation... Could you, please, check my attachment? Maybe, some mistake in syntax?
Attachments:
Add Limits.PNG 23 KB -
Opening TestStand Ref from LabView sometimes fails
I'm having an intermitten problem when opening a TestStand reference from LabView. The error explaination just says, "LabVIEW: (Hex 0x80004005) Unspecified error." Attached is a little vi that can reproduce the problem when set to run continuously.
Any idea on how to fix this? Thanks a lot.
Note that because of compatibility requirements I have to use TestStand 2.0 with LabView 7.1.
Attachments:
TS_Ex.vi 24 KBAttached is a screen shot of the error message. This is one of at least 2 error messages. I will get the other one when I can get time on the equipment. Right now, I would like to get the error log (mentioned in the screen shot), but I can't find it. Where should it be?
Unfortunately, the equipment is being shared and I haven't received time to debug it more. But this is what I have seen.
Trying to Highlight Execution with breakpoints seemed to point the vi closing the reference to TestStand as the source of the error message. Using the Simplified TestStand Operator Interface vi that came with TestStand, and some fake tests, we did not have this error. Only when we use our customized OI with dynamic test sequence generation do we get the error. This error doesn't occur with LabView 6.1. So I think it may be another incompatibility between LV 7.1 and TS 2.0.
Thanks for your help.
Attachments:
Exit-Crash-1.doc 24 KB -
Calling Teststand from labview
Hi,
I am trying to open teststand(3.0) from labview(7.1). When run the VI In highlight mode it works fine and opens the Teststand login panel.When try to run the VI in normal mode the VI Hangs and it doesn't open the Teststand also i have to terminate the application using taskmanger. I have attached the VI and the snap shot in highlight mode for your reference.Any suggestion will be appreciated.
Thanks & regards,
sathyendra N
Attachments:
VIANDSNAP.zip 90 KBHi,
Thanks for your Response. I am trying to use customize the Opertor Interface developed in labview.
Regarding the complete Application Back ground.
The complete Application was developed previously using labview 6.1 and Teststand 3.1 and it was working fine. Now i am trying to port the application to Labview 7.1 and Teststand 3.1 at that time it is not all opening the Teststand login so i thought tried only the basic part out of my code and that given the inconsistent problem so i am trying to slove that part first so i have made a simple vi which i included in my last mail.I want to maintain the same functionality previously developed in Labview 6.1 without any major changes so i am trying the same way in labview 7.1.can you please suggest some examples or suggestion.Waiting For Your Response.
Regards,
sathyendra N -
Read variable type and value from LabView
By using the TS. Sequence class i'm trying to get the variable type and values of locals, parameter, fileglobal and stationglobal. Unfortunately i'm not able to find the right function. Hope someone can help me.
Kind regards
Lars
Solved!
Go to Solution.
Attachments:
ReadName.JPG 34 KBadded PropertyObject Type to the loop. But doesn't matter what i do, i just get the first type from fileglobals back...
Attachments:
With_PropObj_Type.JPG 61 KB
With_PropObj_Type_output.JPG 33 KB
Maybe you are looking for
-
Business Objects connection to SAP BI
Can anybody explain me which communicaton method does Business Objects use to communicate with SAP BI? and what kind of interactions do they have? Thanks in advance.
-
Something is wrong with ViewCriteria Search with MySQL as database.
Hello everybody: I have spent some time working with JDeveloper and ADF but I always did it using Oracle Database as data repository. Now I'm experimenting with MySQL. I created a view criteria in a view object, I published it in the application modu
-
Tree view set symbol error 1135
Hi, I try to build tree by program (reading by file tree structure) using invoke node 'Edit Tree Items.Add.Item' and this work fine. Now if I try to set symbol index after item added using property node, rise an error 1135 : 'The tree control's activ
-
All my attempts at getting FCPX 10.1.1 working are failing. I was in mid-edit on a relatively simple job. I am completely locked up with the waiting rotator on continuously. Has anyone had this problem or can offer any advice. I am on a fully spec
-
How can I revert back to iOS 5 after upgrading to ios6
Can I Uninstall ios6 and reinstall ios5