question

Doris C avatar image
0 Likes"
Doris C asked Ben Wilson commented

AGV Elevator Malfunction

Hellow, i'm using AGV elevator first time.

I tried to implement it with what I studied, but agv's movements are strange.

It is normal to move from the second floor to the third floor, but when moving from the third floor to the first floor, the elevator arrives on the first floor and agv moves back from the second floor to the first floor. like this picture.

I don't know what's wrong. please help me!! thanks.

88888888888_1.fsm

FlexSim 19.0.0
agvflexsim 19.0.0agv elevator
캡처.png (286.5 KiB)
88888888888-1.fsm (121.8 KiB)
88888888888-1.fsm (121.8 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Doris C, was jason.lightfoot's answer helpful? If so, please click the red "Accept" button on 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

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

The DestFloorCP is being set to the middle floor CP instead of the bottom floor. That's because the cpdistance() used to find the correct floor evaluates the distance to the destination (controlPoint28) as

LIST FloorCPs as is:
CP28 to Floor 3 20813.722656mm
CP28 to Floor 2 18874.308594mm
CP28 to Floor 1 19456.066406mm

LIST FloorCPs with cpdest as destination:
Floor 3 to CP28 165947.500000mm
Floor 2 to CP28 11214.313477mm
Floor 1 to CP28 10632.555664mm

So it chooses floor 2. But it travels to floor 1 so looking to find why that is next. Also considering that the cpdistance parameters should be reversed to get the correct floor.

Here's the script to print the distances:

treenode cp2=Model.find("ControlPoint239");
treenode cpdest=Model.find("ControlPoint28");
treenode cp1=Model.find("ControlPoint14");
treenode cp3=Model.find("ControlPoint49");
pt("CP28 to Floor 3 ");pf(cpdistance(cpdest,cp3));pt("mm");pr();
pt("CP28 to Floor 2 ");pf(cpdistance(cpdest,cp2));pt("mm");pr();
pt("CP28 to Floor 1 ");pf(cpdistance(cpdest,cp1));pt("mm");pr();
pt("Floor 3 to CP28 ");pf(cpdistance(cp3,cpdest));pt("mm");pr();
pt("Floor 2 to CP28 ");pf(cpdistance(cp2,cpdest));pt("mm");pr();
pt("Floor 1 to CP28 ");pf(cpdistance(cp1,cpdest));pt("mm");pr();
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

So the reason it's choosing floor 2 is that you have a one way system and the distance in the "Floor CPs" list is indeed incorrect - it should be from floorCP to DestCP (the bottom set of distances in the list above), so the field expression should be

 cpdistance(value, puller) 

and not the other way around. The problem is when this change is made, other things break, so looking into those.....

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Jason Lightfoot ♦ commented ·

Here's the model working with corrected AGVElevator template. I've added a field to Floor CPs so that the correct destination and current floors are determined, and changed these two pull to used the correct field:


88888888888-1jl.fsm




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.