question

Ryusuke T avatar image
0 Likes"
Ryusuke T asked Ryusuke T commented

AGV battery usage

Thank you for always answer.

I want to get the battery usage of AGV.


Is there a function to retrieve this? Or should it be calculated from "AGV.amp Hours" or "AGV.battery Level"?


Thank you in advance.

FlexSim 22.0.7
agvagv battery level
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Ryusuke T commented

Do you mean the current rate (amps) at which the charge is changing?

You can get that value from the respective AGV's node in the network object.

1664436548654.png

Object TE = Model.find("TaskExecuter1");
return getsdtvalue(Model.find("AGVNetwork>variables/agvs").subnodes[TE.name], "curAmps");

1664436571441.png

A negative value means the AGV is currently charging.

Disclaimer: Values in an sdt-node like this may change in the future. So forward-compatibility is not guaranteed.


1664436548654.png (41.1 KiB)
1664436571441.png (10.8 KiB)
· 3
5 |100000

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

Ryusuke T avatar image Ryusuke T commented ·

@Felix Möhlmann ,


This is exactly the information I was looking for.

I also understand that the specifications may change in the future.


Thank you for your answer.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ryusuke T commented ·

I just noticed that the path to the node I use in my answer is suboptimal. It would probably be better to use this variant of the second code line instead (especially for large numbers of AGVs)

return getsdtvalue(TE.find(">variables/navigator/1+"), "curAmps");
0 Likes 0 ·
Ryusuke T avatar image Ryusuke T Felix Möhlmann commented ·

Thank you for the additional information!

I will use this.

0 Likes 0 ·