Jump to content

Variables and sequences


Clio75

Recommended Posts

I had an idea :wacko:.

That I can have different sequence for different instruments. and from different test I can call a sub sequence.

Like

-Instrument 1

init

Read 1

sett 1

load setting

- Instrument 2

init

Read 1

sett 1

load setting

Test Sequence :

Insrument 1 init call init in instrument1.seq

Instrument 2 init call init in instrument2.seq

read level call read1 in instrument.1seq

Read volt Call read2 in instrument2.seq

And then if you fix a bug in one of your instrument, you will have this implemented direct in all you sequence.

So far all OK.

But how to handle the values between the sequence?? I like to avoid using station globals. due to the fact that I need to sett up all station globals on each station. And this makes the deployment part more pain in the ......

So if any have suggestions or other alternatives please share your great idea with me :worshippy:

Thanx

Link to comment

Hello

I have attached the project.

Hi Clio,

I can not open your sequence because I'm still using TS4.0.

What about your question "how to handle the values between the sequence?", I'm using two ways, passing parameters or propagating locals.

I suppose what you are using a top level sequence which calls your instrument sequences as sub sequences.

Than for the passing parameters method, you need to call each subsequence and pass by reference the variable as parfameter. If the parameter is modified in a first subsequence, the second subsequence will use the modified value.

Propagating locals method is even easyer to implemet. You need to define a local in the top level subsequence and check Propagate to Subsequence for this local (right click on the local). Than just use this locals in subsequences, you even don't need to define it there if you are not going to run these subsequences by itself. If you still define the local in subsequences, the Allow Propagation from Caller should be checked. This method works the same way as passing parameter, the modified local is used in later called subsequences. TestStand will highlight the propagated local as invalid, it is valid at runtime. Personally I preffer the propagate locals method, it is less maintanance for subsequences, parameters don't need to be changed for sequence call steps each time when data type is modified.

I've attached the examples (TS4.0)

Parameter Passing Example.seq

Propagate Local Example.seq

Link to comment

What about your question "how to handle the values between the sequence?", I'm using two ways, passing parameters or propagating locals.

I suppose what you are using a top level sequence which calls your instrument sequences as sub sequences.

Than for the passing parameters method, you need to call each subsequence and pass by reference the variable as parfameter. If the parameter is modified in a first subsequence, the second subsequence will use the modified value.

Thanx for your examples.

The Idea was to call other seq files that is not in the current file. I think the Parameter passing is what I need.

In my project I need to pass over the instrument port, so I think this will work.

Thanx.

I didn't figure out the propagate thing yet. but I will look into it later

I have to be finnished with something first :wacko:

Link to comment

Thanx for your examples.

The Idea was to call other seq files that is not in the current file. I think the Parameter passing is what I need.

In my project I need to pass over the instrument port, so I think this will work.

Thanx.

I didn't figure out the propagate thing yet. but I will look into it later

I have to be finnished with something first wacko.gif

Both methods will work with calling other sequence file. It is no difference for TestStand to call a sequence from the same sequence file or a sequence from other sequence file. Oh, no, the difference is what you can not use FileGlobals for different files. But if you don't have a bad habit of using globals, you are ok. wink.gif

Link to comment

Both methods will work with calling other sequence file. It is no difference for TestStand to call a sequence from the same sequence file or a sequence from other sequence file. Oh, no, the difference is what you can not use FileGlobals for different files. But if you don't have a bad habit of using globals, you are ok. wink.gif

In order to get started I have used both file-globals and station-globals. But I hope to change this now.

I think I use propagate inside a seq. But parrameter between seq.

I think I just do some testing

THANX :thumbup1:

Link to comment
  • 2 weeks later...

Have you seen any problems with string when propagate them.

I have a challenge with the addressing our equipment. it's using ascii base protocol and addressing from 00 to 79.

So when I propagate the variable Poss th value change from 07 to 7 and then I missing a char. and this makes the sequence failing (of course).

Any I idea ??

Thanx

Link to comment

Have you seen any problems with string when propagate them.

I have a challenge with the addressing our equipment. it's using ascii base protocol and addressing from 00 to 79.

So when I propagate the variable Poss th value change from 07 to 7 and then I missing a char. and this makes the sequence failing (of course).

Any I idea ??

Thanx

Do you pass that address as numeric? Try string then.

P.S. I just found your description of the problem in the neighbour topic. Sounds mysterious for me, I have no idea, sorry.

Edited by Sergey Kolbunov
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.