question

pc neo avatar image
0 Likes"
pc neo asked Jacob Gillespie commented

accessing global variables in process flow using Variable

The flexsim documentation mentions that process flow "Variable" activity can be used to reference to global variables. However, I do not seem to be able to get/set the global variable successfully using this approached. The value is NULL returned in "Get Variable" activity. Did I do anything wrong?

attached a sample model: sample-global-variable.fsm

attached a pic on the model for quick reference: untitled.png

FlexSim 18.2.2
process flowglobal variablesglobal variable
untitled.png (189.6 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

Roi Sánchez avatar image
1 Like"
Roi Sánchez answered Jacob Gillespie commented

Hi @pc neo, if you just want to get and set the value of a global variable in your model, you can do it as the attached model shows. It is not needed to use a the process flow "Variable" activity. If you want to use this activity, the variable should be a tracked variable or a process flow variable, not a global variable.

get-global-variable-value.fsm


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