question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jason Lightfoot commented

Getting error while setting state under MTBF MTTR function?

Hi Team,

I have made some changes in the regular logic. Here, ports of objects are closed instead using stop function. I am trying to set state of object in this case. I don't know if we can do it. I am getting error as below:

1689680637102.png

Can you help me in this?

Thank you!

FlexSim 23.1.0
mtbf mttrobjectstate
1689680637102.png (118.5 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jason Lightfoot commented

You are trying to a set a state on the MTBF/MTTR. current generally refers to the object in whose attribute tree the code you are editing is situated (ownerobject(c) -> c is the code's node -> current is the 'owner' of that node).

The object that the down time is applied to is downobject.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·
Ok @Felix Möhlmann!

Makes sense.

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Ankur A3 commented ·
Hi @Felix Möhlmann;

One quick question, since we are setting it manually how we can ensure that it will come in the previous state once resumed.

Do I need to write code or will it happen automatically?

Thank you!

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ankur A3 commented ·
You'd have to set it yourself. But use the resume since then it will do it for you - use the code to release the item from the other post.
0 Likes 0 ·