question

Flavia P2 avatar image
0 Likes"
Flavia P2 asked Flavia P2 commented

Set BatteryRechargeTheshold by code line

Hello everyone,

So I'm new to FlexSim, but I have made a AGV model that looks like this,

What I'm trying to do is to set a line of code that lets me set the variable "BatteryRechargeThreshold" and "BatteryResumeThreshold", So that with this I can control my model from an outside API.

Does anybody has an idea on how to do this?

FlexSim 19.0.9
agvflexsim 19.0.9flexscript code
1603209643136.png (730.1 KiB)
1603209774565.png (26.9 KiB)
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

·
Aida Chaikh avatar image
1 Like"
Aida Chaikh answered Flavia P2 commented

Hello @Flavia P2,

You can use

Model.find("Tools/ProcessFlow/AGV>variables/blackBox/BatteryRechargeThreshold/value").value = 20;
Model.find("Tools/ProcessFlow/AGV>variables/blackBox/BatteryResumeThreshold/value").value = 50;

to change this variables.

I hope it helps!

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

Flavia P2 avatar image Flavia P2 commented ·

it woked :)

1 Like 1 ·
Flavia P2 avatar image Flavia P2 commented ·

I will try this, thank you

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.