Quantcast
Channel: NI TestStand topics
Viewing all 6597 articles
Browse latest View live

Programatically access parameter values for a .net module using c#

$
0
0

I have a UI where I can open sequence files to view and run.  The UI was written in c#.  Each of the steps in the sequence files call into .net modules also.  Each call has three parameters. One the paramters is the name of a file that I want to open from the UI using notepad is the user wishes.  

 

How do I get access to the parameter values of the step module programatically?

 

I have access to the step module object using the fololowing line of code:

 

Module myModule = this.seqFileViewMgr.SelectedSteps[0].Module;

 

Once I have the module object, I cannot seem to find a way to get an array of the paramter values via the TestStand API. 

Does anyone know how this is done?

 

Thanks and regards,

 

Sean

 


How to play a clear voice through the signal received by USRP N210.

$
0
0
I have received signals(Radio signals) with USRP N210, but there is only noise while I played it. Who can give me some suggestion on how to play a clear voice with the received signals ? Thanks so much.

TestStand Report Deployment

$
0
0

In the TestStand Report how do I ensure that the report options are not edited after deployment. Also, when deploying it from one station to the next, will I have the option to transfer the report settings such as filepath with macros.

Determine if parameter exists

$
0
0

I am trying to programatically Enable and Disable database logging. Database is set to disable from Configure>Result Processing..., I write to Parameters.ModelPluginConfiguration.Plugins[1].PluginSpecific.Options.DisableDatabaseLogging value of False. This does not enables database and nothing gets comitted. All this customization is done in PreUUT.

 

Also need to have a precondition to find if a Parameter exists.

PropertyExists("Parameters.ModelPluginConfiguration.Plugins[Locals.DatabaseIndex].PluginSpecific.Options.DisableDatabaseLogging")

 

But the above always returns False. Need to receive True when Locals.DatabaseIndex is set to 1 as that is the location of Database under Configure>>ResultProcessing.

 

Thanks.

TestStand not passing VISA info to LabVIEW

$
0
0

Hi All,

 

I am encountering a problem passing a VISA resource name to LabVIEW (2014) from TestStand (2014) which I cannot for the life of me understand or solve.  Thus and so, I would be exceptionally grateful for any help.

 

I have two Thurlby Thandar LXI power supplies in a test rack, each with unique IP and socket addresses, of the form (TCPIP0::192.168.0.3::9221::smileyfrustrated:OCKET).  I have a LabVIEW project which contains a number of VIs, each related to the various functions of the PSUs, which are called from TestStand as appropriate.

 

I'm calling the LabVIEW 'Initialise.vi' in TestStand within a "ForEach" loop to individually extract the PSU's addresses from an array, open a session, then store the SessionNumber, but the resource name data doesn't seem to make it through to the VI's front panel VISA control.  I've checked, checked and re-cheked that the correct values are being pulled from the array, I've even tried putting the LabVIEW call in a sub-sequence, just so that I can verify the data is not being corrupted in any way, but all seems to be well.  It's as if the link between TestStand and LabVIEW is somehow broken.

 

To clarify the issue, on the very first run, the VISA information does get through, but subsequent runs retain this value, rather than overwriting it with the next value in the array.  Setting the Run Options of the LabVIEW Action step type to Load Dynamically then Unload after step executes overcome this issue, but cause problems when trying to control the PSU later on in the test sequence.

 

The most maddening thing is that this used to work up until a couple of weeks ago, but unfortunately I can't remember what, if any, changes I may have made.

 

I've reinstalled TestStand and LabVIEW, but it hasn't solved the problem.

 

I've made the VI re-entrant, but that doesn't make any difference (in truth it shouldn't, as although the VI is called numerous times, all calls are sequential rather than simultaneous, so re-entrancy shouldn't be an issue).

 

I've configured the PSUs in MAX and given them aliases and tried the addresses direct, but that makes no difference either.

 

I've also tried performing the same exercise of passing data to LabVIEW just using strings and that all works fine, it just seems to be an issue with VISA resource names.

 

I have a suspicion I've checked or un-checked a check-box somewhere in the bowels of TestStand that's causing all of this, but haven't a clue how to find it.

 

If anyone can shed some light on this why this issue is occurring, or could even just point me in the direction of some utility which could sniff dataflow between TestStand and LabVIEW, I would be very grateful.  

 

Many thanks in advance

I want to force a sequence to fail on an error as well as a fail result

$
0
0

I want to force a sequence to fail on an error as well as a fail result.  This has come about because the only way I can find to prevent Labview error dialogues from popping up in TestStand is to use the Ignore Run Time Errors property on a step. I don't want these dialogues to occurr because operators don't know how to deal with them. The problem with using the Ignore Run Time Error property is that now that a step that had a run time error won't kill the sequence. I really want to interpret an error as a failure.

 

I found a link to this same question from years ago and the answer seems reasonable.  See http://forums.ni.com/t5/NI-TestStand/Force-TestStand-Step-to-Fail-When-Error-Occurs/td-p/435510. 

 

In that post I found the following: "Use the Callback Sequence SequenceFilePostStepRuntimeError. In this sequence, set Parameters.Step.Result.Status = "Failed" and Parameters.Step.Result.PassFail = False". But when I pull up the SequenceFilePostStepRuntimeError callback, niether of those parameters show on the parameters list. I have Parameters.Step and Parameters.Result, but nothing populated below those main categories.  I can't figure out if I have an installation error, or if the callback has been altered in the intervening years.

 

Anybody have any hints?

Thanks,

Dave

teststand call a DLL, which will call another DLL

$
0
0

Hi,

 

I have a dll from vendor (Lineeye LEPCLIB.dll).  I will need to create a DLL (MyDLL) using labwindows CVI which will call LEPCLIB.dll in the code.

 

Everything is OK after build and I can use an external exe file to call Mydll and it will call LEPCLIB.dll sucessfully. 

However, we I use teststand 2010 to call Mydll, calling Mydll itself is no problem but when calling fundtions in LEPCLIB.dll, it always return error. Seems something in teststand for dll calling.

All DLL are already put to same path in local pc. I also tried to put those dll to system32 folder and it did not work either.

 

Anyone can help about this strange issue?

 

Thanks in advance.

 

Gavin

 

DLL function in MyDLL:

 

void __declspec(dllexport) __stdcall CPRI_TEST(tTestData *testData, tTestError *testError)
{

int error = 0;
int i=0;
int iStatus = 0;
char szTemp[32] = {'\0'};

LE_SETUP le_setup;

 

//********************************************************************************************************

// function from LEPCLIB.dll.

//if using exe to call this dll, everything is OK, but if using teststand to call this dll, here will return error

//********************************************************************************************************

 

error = LEConnect("38111008"); 

if(error != 1)
{

sprintf(szTemp, "Loop count %d, Connecting Failed", i);
MessagePopup ("error", szTemp);
break;

}
}

 

int __declspec(dllexport) __stdcall DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:

/* Respond to DLL loading by initializing the RTE */
if (InitCVIRTE (hinstDLL, 0, 0) == 0)
return 0;
break;
case DLL_PROCESS_DETACH:

/* Respond to DLL unloading by closing the RTE for its use */
if (!CVIRTEHasBeenDetached ())
CloseCVIRTE ();
break;
}

/* Return 1 to indicate successful initialization */
return 1;
}

Set Post Expression of Step (Not Next or Previous Step)

$
0
0

Is it possible to set the post expression of a step, which is not the Next or Previous step?  

 

I know this is possible

 

RunState.NextStep.PostExpression = "Enter Post Expression Here"

 I am looking for something like

RunState.Step("StepID").PostExpression = "Enter Post Expression Here"

 

Does anyone know if there's a way to accomplish something to that effect?

 

Thanks!


Detecting if a step is a sequence call

$
0
0

I am using the SequenceFilePostStepFailure callback to pop up custom messages to an operator, but I don't want to do this when the step being serviced is a sequence call. Is there some way to determine in the callback just what type of step is being serviced?

Thanks,

Dave

Parse Lots Of Text Being Returned From A Function

$
0
0

I am using a StepType our Company developed which is used to get information on available access points our portable router can see.  After I send a status command the device will send a long list of access points (see example below).  How do I parse this output to get the RSSI for a particular SSID.  For example in the sample below how would I return the value of RSSI, -63dBm for SSID WKRP1?  Your thoughts on how to tackle this problem.  Thanks.

 

BSS 0:
SSID: \x00
BSSID: 00:1c:b1:88:b9:80
Channel: 1
RSSI: -72 dBm
bssType: Infrastructure
Security: wep-on

 

BSS 1:
SSID: WKRP1
BSSID: 00:0a:b8:7f:85:10
Channel: 4
RSSI: -63 dBm
bssType: Infrastructure
Security: wpa-psk-tkip

 

sdc#

Pass Cluster in PostUIMessage Using LabVIEW

$
0
0

Hi All,

I am sending the data from LabVIEW VIs (In TestStand) to Operator Interface via PostUIMessage property.  But when I tried to pass the cluster, I am getting Error 91 in LabVIEW.  Attached the method which I tried to pass the cluster. Please help me by providing the right method to pass the cluster in PostUIMessage.

Thanks in Advance.

Regards,

Sathish kumar D

 

 

Teststand best practices architecture for communicating with TCP instruments

$
0
0

Hi,

 

I am using Teststand 2014 and LabVIEW 2013 SP1 as the module adapter.

 

My Teststand sequence file includes communication with 3-5 different instruments via TCP/IP.

Such as Spectrum analyzer, generator and other RF measurement devices.

 

There are many steps located in subsequences that implement code to communicated with these devices whether to fetch , query or write.

What is the best architecture to implement this program ?

 

As I can see it there are many possibilities, such as :

 

1. Launching a subsequence as a new thread in the Sequence Setup. This subsequence calls a VI that dynamically register for events/queue that can be launched from any step. (in this case there is a VI running in the background that can perform Write/Read/Qurey to the instrument and he is triggered from any step using an event or dequeue element)

This option can be duplicated for any instrument or only once for all of the instrument with prioritizing the event queue.

 

2. Creating a communication reference in the Setup of the Main Sequence. And passing it to any step that need it. (there is also the question how to pass this reference… in Teststand globals or in LabVIEW queue).    

      

another 2 small questions that I encountered -

 

Is using LabVIEW queues and notifiers in TS steps and obtaining their reference (in the LabVIEW code) by name is considered best practices ?

 

If I would like to run only one VI in a new thread, should I use a new subsequnce and set it as a new thread or use the Run VI Asynchronously ? what are the differences ?

 

Logging Teststand steps actions and status

$
0
0

Hi,

 

I am using Teststand 2014 and LabVIEW 2013 SP1 as the module adapter.

 

My Teststand sequence file includes communication with 3-5 different instruments via TCP/IP.

Such as Spectrum analyzer, generator and other RF measurement devices.

 

Since I am performing many configurations of the instruments and fetching measurements I would like to have a log of the status of every command sent to any instrument.

 

for example - if I send an Auto Range command to a spectrum analyzer, I would like to log that it was sent and also log the respond from the instrument that the action is done.

 

This log will be visible to the user and he could scroll and see what commands has been sent to the instruments and their status.

 

I believe that this log should be a part of the UI that I will create for the Teststand Seq, is that correct? or should I create a different Window for it ?

 

 

There are many other questions that I am thinking -

1. Where should I store this log ? in a spreadsheet file ? in a database ?

2. What is the best way to pass the information (what resource, what command, status) to the log ?

Using a Queue implemented in LabVIEW ? or maybe pass the This.Context Reference to every Step so that every step will update a Teststand Queue that will that will write the log to a database?

or maybe Writing in every step to the log (file or DB) and using the UI messages to write to the Teststand UI 

 

 

Queue implementation in LabView won't work in TestStand

$
0
0

I am a very longtime user of LabView but haven't used TestStand in years.  I have an application where I launch a VI with a named queue handler that monitors a communications device.  I leave it running in order to maintain the comm link syncronization.  I then use several LavView applications sequentially and each can access the named queue while it is active.

 

This all works flawlessly when used stand alone.  I set up TestStand and fire off the queue handler in a New Thread and leave it running.  I then step further in the sequence and launch one of the other applications.  It does not successfully retrieve the data from the named queues.

 

These are the exact same VIs,only now being launched from TestStand.  Is there something I need to do the allow the applications to communicate via the named queues?

NI 9263

$
0
0

Hi,

 

I am using NI 9,263th First of all i have to calculate resistance Which is useable for this device. Actually I donot know how i can calculate the value of resistance Suitable did so it does not harm the NI 9263 device. I am using Volage 10 V.


Disable Logging of Failed Tests by Individual Step

$
0
0

Hello All,

 

  I have an experimental version of a test sequence that will loop through and attempt several different sets of input parameters until it obtains the desired outcome.  When it does obtain the desired outcome, I then log/report the set of input parameters that were used, and disregard all others. The issue I am having is that I do not know how to disable logging of the step iterations that failed (the ones I want to disregard).  I can disable reporting of failed tests for the entire sequence, but I do not know how to do limit it so specific tests/steps.  I've tried a few ideas related to deleting the current element from the report, but that doesn't seem to work correctly for my application.  Please advise.  

 

Thanks in advance,

 

GSinMN 

adb integration with teststand

$
0
0

Hello All.

 

I am trying to integrate the android Debug Tool (adb) and Monkeyrunner with Teststand. I am quite new to Teststand, and I am unable to figure out how to use external programs and tools in teststand. Would be cool if someone can give me pointers on setting up adb with Teststand.

 

Thanks.

 

Harish

 

teststand public directory macro

$
0
0

I would like to get the TestStandPublicDirectory path in an expression using a macro. Is it possible? Or is there any other way to get the path string of the directory?

 

Madottati

automating sequence analyzer

$
0
0

TestStand Sequence Analyzer (running TS 2012 if that makes a difference):

 

I'm using TestStand Sequence Analyzer to check for problems in my sequences (built-in rules, and a bunch of custom rules).  It works fine for working in sequence editor and running the analysis.  However, I want to be able to automate the analysis (think every evening I want to run the analysis and send developers an email with all the "mistakes" they created that day)

 

So far, I can't find anything to allow me to do a headless analysis and get results out (either as a data structure or a report on disk).

The TS Engine / applicationMgr does not seem to have a "start new analysis task"

The command line analyzer seems to dead end at "start me with a project" and not include any ability to automatically run the project and/or export results.

Creating a new ActiveX Automation against "NI TestStand .... Sequence Analyzer API..." does not seem to allow me to do anything.

 

Is this possible?

What am I missing here / where did I go wrong?

 

Thanks!

programmatically choose licence to reserve

$
0
0

Hi !

My customer bought TS licences to place on VLM. There 5 base licences and 2 debug licences.

These licences are for named users.

 

I made an operator interface, which only needs a base licence to run. But when there is a problem on the test benches, a technicien can open the Sequence Editor and would need the Debug licence to actviate in this case.

Today, TS acquires Debug licence by default. Which is problematic when a bench needs to be debugged because the technician cannot get the debug rights when opening the Sequence Editor.

 

In my operator interface I tried to set these properties before starting the AppManager :

  • Engine.AcquireLicence to OperatorInterface
  • AppManager.IsEditor to False

But each time I launch the operator interface, it seems that it gets the licence which provide the more rights.

How to fix this ?

Viewing all 6597 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>