AGV.currentCP sometimes giving NULL value

AGV.currentCP sometimes giving NULL value

clairekruppGhafari
Advocate Advocate
468 Views
10 Replies
Message 1 of 11

AGV.currentCP sometimes giving NULL value

clairekruppGhafari
Advocate
Advocate

[ FlexSim 23.1.1 ]

I am using the following code to find out which CP the AGV has arrived at:

1684108250417.png


99% of the time this works fine, but every once in a while, it gives a NULL answer and then the parking and other logic using "curcp" doesn't work.

I think it is connected to the Time Tables. The AGV for the token above had just about reached its destination when the end of shift happened. When the down time finished the token immediately went through to the next activity, without having an AGV arrival event.

I have also had some occasions when it seems that the AGV "forgets" the currentCP if you have other activities in between the end of travel and the currentCP command.

Is this related to the Release Notes for version 23.1.2/23.0.8?

1684108720669.png

If not, I can send you my model.

Thanks,

Accepted solutions (1)
469 Views
10 Replies
Replies (10)
Message 2 of 11

jason_lightfoot_adsk
Autodesk
Autodesk

Please post the model Claire - a small test model doesn't elicit the behavior you describe.

BreakdownAndShiftMidAGVtravel.fsm

0 Likes
Message 3 of 11

philboboADSK
Autodesk
Autodesk


Phil BoBo
Sr. Manager, Software Development
Message 4 of 11

clairekruppGhafari
Advocate
Advocate
I'm doing that now....
0 Likes
Message 5 of 11

clairekruppGhafari
Advocate
Advocate
Thanks, I'll try it....
0 Likes
Message 6 of 11

clairekruppGhafari
Advocate
Advocate
It's sent. The problem has to do with Event sequence after a Down Time happens. Details in the email.
0 Likes
Message 7 of 11

clairekruppGhafari
Advocate
Advocate

Well it kind of works - it gives a valid CP, which gets rid of the exception error, but it's only a transit CP so the parking logic does not execute. The AGV will just stay there until called for the next task and could possibly block the next arriving load.


Message 8 of 11

philboboADSK
Autodesk
Autodesk
Accepted solution

After looking into this model deeper, we found that this is an AGV module issue. Here's what's happening:

When the AGV is stopped, it decelerates to a stop. Its current arrival event's time is then truncated to the time when its deceleration will end in order for it to stop at that point.

Normally, this is in the middle of a path, but in this particular situation, that time is after the time when the AGV would arrive at its destination.

When the AGV comes back up, it creates a new task to continue traveling to its destination.

In this case, the AGV has already reached its destination during the stopping deceleration, so it immediately ends its travel task without going through the process of traveling to it (which is why currentCP wasn't set).

I was able to replicate the issue in a small sample model, so I'll add that to the dev list to look into.

Rather than hardcoding the CP in your band-aid, you could use the destinationCP rather than finding it by name.

if (curcp == NULL)
  curcp = AGV(token.agv).destinationCP;

This would be a more robust workaround for other times when this might happen rather than just fixing this one particular situation at one particular CP.



Phil BoBo
Sr. Manager, Software Development
Message 9 of 11

clairekruppGhafari
Advocate
Advocate

I put the following band-aid fix in until the root cause error can be fixed:

1684172319054.png

Message 10 of 11

carter-walch
Not applicable

Hi @Claire Krupp, was Phil BoBo'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 unaccept and comment back to reopen your question.

0 Likes
Message 11 of 11

clairekruppGhafari
Advocate
Advocate
Thanks @Phil BoBo
0 Likes