question

jing.c avatar image
0 Likes"
jing.c asked Ben Wilson edited

AGV direction

Hi, forum

I want to know how to get the direction of agv.

You can see the attached model, agv will pass the CP4 form left or right. How can I know where is the agv come from?

Thanks in advance.

agv-directionv16.fsm

FlexSim 16.0.9
agvagv travel directiondirection
5 |100000

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

Michael Kramer avatar image
1 Like"
Michael Kramer answered Ben Wilson edited

@jing.chen, I rewrote it a bit because I like using process flow, but the basic code is in the user function "DirectionCoord." I also added a simple up/down counter to process flow if you use that.

· 4
5 |100000

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

jing.c avatar image jing.c commented ·

Hi, Michael. Thanks for your reply. I will see it later (Download page show an internal error, I will try it later)

0 Likes 0 ·
jing.c avatar image jing.c commented ·

@Michael Kramer

Sorry to disturb you again. I cannot download your model, could you plz post a new one?

0 Likes 0 ·
Michael Kramer avatar image Michael Kramer jing.c commented ·

@jing.chen, sure, no problem. It's attached, I changed the name but it's the same model. Let me know if you get it. Also, it's the latest version, 17.0.3.

te-direction-of-travel.fsm

1 Like 1 ·
jing.c avatar image jing.c Michael Kramer commented ·

Thanks, it really helps~

0 Likes 0 ·
Frenk Gao avatar image
0 Likes"
Frenk Gao answered jing.c commented
treenode AGVNetwork=node(">variables/navigator/1+",agv);
double start=getsdtvalue(node("/travelPath/1",AGVNetwork),"fromDist");
double end=getsdtvalue(node("/travelPath/1",AGVNetwork),"toDist");


if (start>end){
	//direction A
}else{
	//direction B
}

Create a Way Point Logic in the CP.

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

jing.c avatar image jing.c commented ·

Thanks for your reply.

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.