Discussions
Categories
Groups
Documentation
Knowledge base
Developer portal
App catalog
The Hub
GitHub
Home
Newly Imported
Restricted
ZF
Copy of failure rate data from type definition to HW Part Library
medini_1026949627
Hi Jan, Thank you for providing the script to copy the userVariables to the components in the HW Part Library. However, the catalogue "variable" need to be copied too. I have added the functions "copyUserVariables" and "findUserVariableByName" to my script and the this is working well. Then I modified the functions to copy the "variables" from catalogue by replacing "userVariables" by "variables" (see functions "copyVariables" and "findVariableByName") The FACTORY I think need to be updated too and I have added a function "__createCatVariable" (see factory #1369-#1372 and #1087 - #1108) Now the copy of failure rate data is looking exactly then in the type definition: Type definition: Copy at HWPartLibrary: The problem is that when recalculating the failure rates than in the copy the failure rate is shown as "NaN" Do you have an idea, why the failure rate calculation is failing? I have added the model. For testing select "ZF HW Part Library" in the model browser and execute "Update Failure Modes GG". Kind regards Günter
Find more posts tagged with
medini
medini legacy
Accepted answers
All comments
medini_1024169437
Hi Günter, I am not sure why you had to adapt the factory yet, maybe you could explain at some point int time. Anyway, if you have a look at the FR Object you see in sum 6 important fields: decisions: is handled by the copy script formula: same, handled by the script already (similar to scaling etc) userVariables: handled by the script variables: these are the catalog variables, form my perspective copy should be very much the same as for user variables as you wrote evalVariables: well, this is typically just one variable, "lambda". you need to copy it as well targetVariable: this is maybe th reason why it did not work, medini needs to know which variable to evaluate to put into the failure rate, its a reference and it references the one "lambda" variable Hope that helps! Happy Scripting Jan
medini_1026949627
Hi Jan, thank you for your hints. Failure rates are calculated now! I have to update the "Factory" again and added the copying of evalVariables and targetVariable. I doubele checked the calculated failure rates for different types and found it correct. The updated script is namend "Update Failure Modes ZF" and shall be executed at selected "HW Part Libraries" at the model browser. The script is copying the catalog data and the failure modes and also updating some catalog variables according to the entries of some profiling variables (e.g. U-Max for capacitors). The only difference I could identify is that Lamda is now shown at user variables with value 0. However, the failure rates are calculated correct. I neither know why lambda is shown nor why the value is shown with "0". Kind regards Günter
medini_1024169437
Thanks Günter for posting, I will have a look at the factory and take the updates over to the standard lib. If I find the time I will also check why lambda appears in user vars. This is not expected. Happy Scripting Jan
medini_1026949627
Hallo Jan, a new problem arised. The HW Part Library as single project is working so far. However, when I have imported the HW Part Library to another project I found out that the components using the data drom imported library lost its catalog data. When I try to add variables to the HW Part Library the add variables window opens: When I try the same at the imported HW Part Library in my project an error message is shown: When I try to recalculate the failure rates hundreds of warnings and errors occur according to missing evaluation target variable: I dont know what is missing?
medini_1024169437
Hm, could it be that the project simply doe snot have the Siemens Catalog inside? You do not need it to select expressions but you need it to select catalog variables. Jan
medini_1024120963
Hi Günter, can you tell me please if the hint from Jan answered your question? Do you expect the whole topic as answered ? BR Joël
medini_1026949627
Hi Joel, yes the question ia answered. Kind regards Günter
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of