question

arn-k avatar image
0 Likes"
arn-k asked arn-k commented

Custom state

Hi all,

I am using process flow and dashboards to indicate when my two processors are faulty and when they are being repaired (I have attached my model). I have two questions in this regard:
1) the state of my machine doesn't change after the process time changes. I want this event to be shown in my states bar and state Gantt in some type of way like "faulty process". I read many sources to see if I can define a new state myself but apparently it is not possible. An easy way to do so is to use a default state and just rename it for the dashboards. In my case I chose "off-shift" state and changed it to "faulty processing" but it is still not showing anything. Am I doing this the right way?
2) The logic I had in mind was that once the machine is repaired, the process time reverts back to normal right away. However, in my model processing with longer process time continues until the product leaves the machine and then it resets the process time. Is there a way I can prevent this from happening?

Thank you!

1695942120967.png

processs flow faults_autosave.fsm

FlexSim 23.2.1
dashboardsprocesss flowstatescustom
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @arn-k, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

When items are processed by the processor it will by default be in STATE_PROCESSING. This is set for each item that enters - your setting the state once at the time of the fault will be overridden by the next item's process start (actually as soon as an item enters or finsihes setup, processing or exits).

You can investigate use a custom state profile to record parallel states to indicate normal processing or processing with a fault. Here's a comment on another post describing this a little more.

Also - rather than have 3 (or more) process flows - one for each fault, and parameterise those, I would create a fault table on the object and have a single object process flow that reads and processes the fault information. This then is much more scalable and manageable.

Also note that by modelling the fault generation in this way you're unable to say that the time between faults is based on the time in processing state (the MTBF/MTTR object has this) and so they can happen while idle - at any time. It also means that two faults can occur at the same time and I then wonder if that would result in another slower process time than the 60 you have for Processor 2.

For example the label on processor 2 could contain this fault table:

1695970272892.png


1695970272892.png (12.0 KiB)
· 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.

arn-k avatar image arn-k commented ·

Thank you so much @Jason Lightfoot for your help,

can you please attach this FlexSim file containing the table as well? thanks

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ arn-k commented ·

Attached is the model with the table on Processor 2. I've also added that processor to an Object Process Flow called "Processor Faults" so that I could show you how to set that up to create a token for each fault for each processor and read the information from the table.

The big difference you will see is that instead of getstream(activity) I'm using labelStream(c) which is a user command I created. The reason is that when the expression to be samples is stored on a token's label (toggled as Flexscript) it doesn't know what activity means so instead I've added commands to use the label to find the activity and processor and create a stream based on that combination. It's related to overriding the getstream() function which I describe here.

The table data is stored in a processor label called FaultDefinitions. You can right click this label and choose 'Explore as Table' to view and edit it.

1696084481852.png

In the process flow we access that (more easily) using another label on the processor called faultTable that points to it - for example the source quantity is the number of rows in the table:

Table(current.faultTable).numRows

where 'current' refers to the processor, and we read the expressions for interval and repairTime into labels using:

Table(current.faultTable)[tokenIndex]["interval"]

Then to sample the interval the syntax is simply

token.interval 

which will yield a different value each time using the correct* stream setup.

I've also added pTime label to each processor so that you know to what value it should be restored when the fault is cleared. You access that value using current.pTime since current refers to the processor.

I've just set up delays to test the sampling:

1696085458355.png

but you should insert the rest of your logic and change the values to use those of the token or processor (current).

Note that the token should be retained since it has the information from which to sample the interarrival times. If you want that to be independant from the other activities that just have a simple loop for the interval delay that creates a token for the rest of the process

1696085445204.png

processs-flow-faults-autosave_jl.fsm

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Jason Lightfoot ♦♦ commented ·
I've not added Processor1 to the object flow, I've left that for you to do and become familiar with.
0 Likes 0 ·
Vinay S avatar image
0 Likes"
Vinay S answered arn-k commented

try 3.fsmCheck this model. This will solve your problem.


Pls, go through the model and understand the changes I made to your original model


try-3.fsm (54.7 KiB)
· 1
5 |100000

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

arn-k avatar image arn-k commented ·
Thank you so much. This works perfectly.
0 Likes 0 ·