question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Julie Weller commented

Setting Custom State which is not in the list?

Hi Team,

I am trying to set the AGV in the custom state "Charging" which is not available in the list. I am using custom code directly as below:

1689582333468.png

But my code is not making any impact.

What is the quickest way to do it?

FlexSim 23.1.0
customagv state
1689582333468.png (43.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.

Julie Weller avatar image Julie Weller commented ·

Hi @Ankur A3, was Felix Möhlmann'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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Ankur A3 commented

You are probably missing a Breathe (0s delay) between the latest task and the activity that sets the state.

· 6
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 ·
Note that using this method places 'Charging' as state 23 to which the STATE_FULL macro already refers. This is fine for a small model that you control completely but it should be documented that this has been repurposed. In a larger, collaborative model or library it might be better to avoid this method and use your own stateprofile where you define all the states, or write to the developers to suggest that new states are added after ALL the predefined ones (so 51 and on).
0 Likes 0 ·
Ankur A3 avatar image Ankur A3 commented ·

Hi @Felix Möhlmann,

I just checked it is setting the state, but it is not shown in bar chart as other preexisting states are shown.

1689586398430.png

Whether I am missing anything?

Thank you!

0 Likes 0 ·
1689586398430.png (17.0 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Ankur A3 commented ·

Check which state table it's using and edit that to show your state. If that doesn't fix it post your model so we can see what you're doing.

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

Hi @Jason Lightfoot,

It is showing "Accumulating" state in chart instead of charging.

1689596202372.png

1689596226593.png

Please have a look here.

17.07.2023_Setting_AGV_State.fsm

0 Likes 0 ·
Show more comments

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.