NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

User File Custom Variable

Hi,

    I would like to know if it is possible to add custom variable in the User List Profile as a counter for Passed Test and Failed Test for each user of the station and how to manage these new variables dynamically in TestStand ( or using external Labview vi ).
    I would like to increment these new variables each time the operator tests a part and update ( to save the counter ) the users.ini file.

Thanks for your help


Olivier
0 Kudos
Message 1 of 10
(4,391 Views)
Hi
Can you explain a little bit more please?
As long as i have understood, you can in deed add variable in the user manager window.
A user is a container that has the following attributes: LoginName, Password....

You have a method in the propertyObject class that allows us to update programmatically thanks to ActiveX the user files.

Let me know if you have other question otherwise please detail a little bit more your application.

Thanks
Kamal
NI France


0 Kudos
Message 2 of 10
(4,377 Views)
Hi,

    Thanks for your answer ...

    I try to clear a little bit more ... In fact, I have no problem to create a custom variable in the User profile. The problem is how to uptdate it dynamically and how to store the updated values in the Users.ini file. I have created some variables with the user manager to count the parts tested by an operator and I would like to save this counter each time the operator tests a part from my Test Sequence or by modifying the Sequence Model. The data of the current user are available in the Station Globals but there is no link with the user data. I have noticed also that if I try to modify the user data using ActiveX API functions and save the Users.ini file, I got a message from TestStand that I try to modify data outside TestStand environment ... and I can't not get rid of this message.

Hope it will help you

Regards,

Olivier
0 Kudos
Message 3 of 10
(4,372 Views)

Hi

Do you have an example code i think that it will be more clear with it?
Send me your message code

Thanks
Kamal
NIF

0 Kudos
Message 4 of 10
(4,369 Views)
Here is a zip file containing the Model Sequence including a sub-sequence that tries to save the users.ini file ( Labview vi call ) and the message ( jpg file ) that we have each time we passe through this function ...

Olivier
0 Kudos
Message 5 of 10
(4,364 Views)
Kamal,

    Just noticed that to increment counter I'm using the "StationGlobals.TS.CurrentUser" cluster to update my data. I think that there is not update between this data cluster and the user data one ... That could be the problem ...

Thanks

Olivier
0 Kudos
Message 6 of 10
(4,360 Views)
Hi

Basically, you have a method named IncChangedCount in the propertyObject class.
Try to use it.

kamal
NI France
0 Kudos
Message 7 of 10
(4,358 Views)
Thanks but it doesn't solve the message problem. You have the same message while modifying te users.ini file outside TestStand.
And I try also to find a method to access user custom data. The standard data are easily accessible from the user class methods but
not the custom one ...

Olivier
0 Kudos
Message 8 of 10
(4,353 Views)
Kamal,

    I think, I got the solution ... by using only activeX/com function from TestStand. See Sequence Model and sub sequence Update User Data.
I used the propertyObject methods to read and set the custom data of the user file.
With this solution, I don't need to request TestStand to save the user file. It's done automaticaly when exiting from TestStand.
Of course, it would be better to be able to save the user file without the warning message automaticaly.

Bye

Olivier
0 Kudos
Message 9 of 10
(4,345 Views)
Oups, sorry ! ... in fact the save function was in the logout sequence callback ... But in this case I haven't the message from TestStand.
But I can't explain why !

Bye

Olivier
0 Kudos
Message 10 of 10
(4,341 Views)