question

Rambabu avatar image
0 Likes"
Rambabu asked Kavika F answered

How to get output percentage in display?

Hi all,

I am working on one model, I want to get output percentage in display slide. please solve this query to my model.

Thanks in advance.

Slide Query.fsmslide-query.png

FlexSim 23.1.2
output per hourslidepresentation slide
slide-query.png (28.1 KiB)
slide-query.fsm (28.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

Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Rambabu, each text object has a textnode. You can programmatically set that value.

1698855871720.png

I wrote some code to get the output of each tank.

/**Custom Code*/
Object current = ownerobject(c);
treenode textnode = param(1);

Object tank = Model.find("G1").as(Object); // this changes depending on the tank you want to sample
int outputVal = tank.stats.output.value;
textnode.value = string.fromNum(outputVal);

return 0;

tankoutput.gif

(The model is sped up in the gif).

The reason I went with tank output is because you can't split up the input of the fluid mixer by port (that I know of, I could be wrong).

slide-query_2.fsm


1698855871720.png (7.9 KiB)
tankoutput.gif (101.5 KiB)
slide-query-2.fsm (29.1 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.