help with custom code

help with custom code

ernesto_daniel_ag2
Not applicable
12 Views
3 Replies
Message 1 of 4

help with custom code

ernesto_daniel_ag2
Not applicable

carrusel-pintura-2.fsm

Hello everyone, I have a problem when I execute a "custom code", in the box " carga ensamble operador 12 patin 2", there are two custom codes in the sub flows, what I would like you to do is that when the custom codes are activated the operator 12, it will change its state from idle to utilize.

thanks.

0 Likes
Accepted solutions (1)
13 Views
3 Replies
Replies (3)
Message 2 of 4

sebastian_hemmannE3JAU
Collaborator
Collaborator

Hey,

your code is working exactly as you tell it to do.

It is setting your operator12 to the state Utilize, but in the exact same moment you also tell the operator to load another item and this automatically sets the operator to another state!

So could you please explain a little more about what your process is like and what you are trying to do. I think you are going a wrong way, to get the right results actually!

For me it looks as if your operator12 has to load a hand full off parts. And afterwards it should unload this parts. And you now want to say, the whole "load" and "unload" process should be in shown in one state ("utilize")?

Message 3 of 4

ernesto_daniel_ag2
Not applicable

Hi @sebastian.hemmann, thanks for your answer.

And as you say in the last line, what I would like is that during the loading and unloading process, both in the forklift and in the queue, the operator's status is shown as "utilize"

0 Likes
Message 4 of 4

jeff_nordgren
Not applicable
Accepted solution
@ernesto daniel AG2

You need to put another Delay block with a very small time value (0.01) just before your Custom Code block. This allows all previous code to be completed before changing the state. See this post for more information.

Thanks.