NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with custom step types

I had a custom step type defined in MyTypes.ini and that custom step type was being used by some sequence files. Then I made some modifications to that custom step type in MyTypes.ini and while doing that, I had all the sequence files using that step loaded in TestStand (by loaded, I mean open). When I was finished with the modifications, I checked the box "Apply Changes in this Dialog to all Loaded Steps of this Type". Now, when I open up those sequence files, I get this message popup "Type Conflict in File". I choose "Use Currently Loaded Type" , save the file and close it. When I reopen it, I get the same message again. I even tried deleting the step in that file and re-inserting it all over again (so that there is no memory of the old step). It still does the same thing. I think I am missing something fundamentally about custom step types and the way they work due to which I am running into these problems. Can you suggest what I might need to do to fix my problem?
 
Any help will be greatly appreciated.
 
Thanks
 
Anuj
0 Kudos
Message 1 of 10
(4,693 Views)

Hi,

The reason might be because you have at some point defined it locally to one of your sequence files. you can check this out by selecting the view control on the sequence file window and selecting Sequence File Types. you can check what

Even though you have deleted all the steps used in the sequence file, it still contains the step type as part of the sequence file. Therefore you have to actual select the Sequence File Types and then in the Step Types Tab you can then delete the offending step type. But you will only beable the delete the local copy when all of the step that use that type has been deleted from the sequence file.

In the Conflict dialog, where does it say the location of the step type is?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 10
(4,676 Views)

Thanks Ray. I did have that step type declared in the sequence file types. Deleting that solved the problem.

 

Anuj

0 Kudos
Message 3 of 10
(4,657 Views)
Hello Anuj,
 
There is something you can change in your custom step type that will allow you to get round this issue in the future.
 
I assume you have the code module that executes the step specified under the 'general' tab of the custom step type?  If this is the case it is difficult (as you have seen) to update the custom step type in your ini file and have that reflected in any sequence you subsequentally load.  What you need to do is apply a 'None' adaptor where you would normally specify your code module.  Reference the actual code you wish to execute during a normal run in the 'substeps' tab as a 'post-step'.  If you do it this way any updates you make to the ini file containing the custom step type (assuming you have raised its version number) will be reflected in any sequence file you load that uses that custom step type.  You may be prompted to use the newest version the first time you load the sequence file but once its been done once and saved it will all work fine.
 
There ahould be no need to delete and reapply the custom step types as detailed in the previous replies (except maybe when you first make this change to your custom step type).
 
This does seem a bit strange but it is apparentally the designed behaviour.
 
Regards,
 
Barry
 
P.S.  There are old posts relating to this feature if you wish to search for more detail
Message 4 of 10
(4,650 Views)

Barry,

Good point, although I will add that it does have a minor drawback, but that's only while you are developing your code, and thats debugging. I could step in to the code associated with the steptype. It would stop at breakpoints if I set them in my code.

 

Having said that, I do try to place my steptype code modules in the post substep rather than in the code module position because of this problem of not being able to update the step type or replace the step type.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 10
(4,638 Views)

Thanks everyone for your input !

I would like to stick to calling a module in the custom step type by 'Designate an Adapter' rather then doing it all in 'Substeps' because for one reason, putting breakpoints and stepping through code is important for my application, which cannot be done by using post steps. Also, the code module I am using for my custom step type is 'Sequence' which does not show up in the list of available adapters in Substeps, even though I could probably accomplish that by making ActiveX calls to TestStand API or TestStand Adapter API.

I did a lot more playing around with custom step types and I think I understand them fully now. One thing I have decided to do is use the Version functionality, that eliminates a lot of problems that I was inducing before. I would recommend that to anyone else struggling with the type conflict issues.

With that, the only limitation that remains in TestStand (maybe its not a limitation) is that when you make certain modifications to a custom step type (like maybe adding a comment to it,  or changing the code module its calling), then these modifications do not get carried to already loaded instances of the step type unless you do the "Apply changes in this dialog to all loaded steps of this Type" thing. Unfortunately, this is not always possible, because sometimes the sequence files already using that step type maybe distributed on a number of machines and all you can do is give all those other machines the updated MyTypes.ini.

If anyone has any more comments/suggestions, I will appreciate that.  I needed to understand this stuff because I am starting to roll out many custom step types I made to a number of people and I better have a good way of managing and maintaining them before it starts becoming a mess.

Thanks

Anuj

0 Kudos
Message 6 of 10
(4,630 Views)
Hello again,
 
I appreciate your desire to debug your step type, but would still recommend using the poststep substep to run your code.
 
I had a very similar issue to yours sometime ago in that I had to release several custom step types for general use by other developers.  I had originally specified the default module in the 'general' tab and found that it wouldnt update correctly - even when I used the version functionality (you get a situation similar to the one you first described).  The only way to ensure you can force updates effectively, without causing more work for people using your custom step type, is to use the poststep substep.
 
I cant say I have ever tried calling a sequence from a poststep substep but am sure it can be done with some clever ActiveX calls.  You may even need to include some 'glue' code to allow it to happen?  Maybe you could include the call to the sequence from 'default module' while you are debugging and only move it to the poststep when you are satisfied it is working?
 
Good luck with whatever approach you choose 🙂
 
Regards,
 
Barry Jeapes
0 Kudos
Message 7 of 10
(4,623 Views)

Hi Ray,

 

I have successfully built custom step, and deployed by creating installer.

The installer is deploying the custom steps but the substep modules are not found although i have added them in code module folder. Could you please help me?

 

 

0 Kudos
Message 8 of 10
(3,959 Views)

Hi,

 

What installer are you using?

Have you defined the missing modules in the source and destination of the installer?

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 9 of 10
(3,957 Views)

Yes. i did.

 

i am using TestStand 4.2.1.

i could see the custom steps on the target PC but the substep modules are not able to find the labview files. i need to manually locate them now.

is there anyway that we can distribute this?

0 Kudos
Message 10 of 10
(3,954 Views)