question

Claire Krupp avatar image
1 Like"
Claire Krupp asked Claire Krupp commented

AGV.currentCP sometimes giving NULL value

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,

FlexSim 23.1.1
agvscurrentcp
1684108250417.png (32.8 KiB)
1684108720669.png (4.1 KiB)
· 7
5 |100000

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

Claire Krupp avatar image Claire Krupp Phil BoBo ♦♦ commented ·

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.


2 Likes 2 ·
Claire Krupp avatar image Claire Krupp Phil BoBo ♦♦ commented ·
Thanks, I'll try it....
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

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

BreakdownAndShiftMidAGVtravel.fsm

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jason Lightfoot ♦ commented ·
I'm doing that now....
0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jason Lightfoot ♦ commented ·
It's sent. The problem has to do with Event sequence after a Down Time happens. Details in the email.
0 Likes 0 ·
Carter Walch avatar image Carter Walch commented ·

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 0 ·

1 Answer

·
Phil BoBo avatar image
4 Likes"
Phil BoBo answered Claire Krupp commented

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.

· 2
5 |100000

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

Claire Krupp avatar image Claire Krupp commented ·

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

1684172319054.png

1 Like 1 ·
1684172319054.png (20.9 KiB)
Claire Krupp avatar image Claire Krupp commented ·
Thanks @Phil BoBo
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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