question

Hitesha N2 avatar image
0 Likes"
Hitesha N2 asked Hitesha N2 commented

Get zone content, zones being defined by photo-eyes

model1.fsm

I want to pull a report which tells me min, avg and max content between zone defined by photo-eyes, using code and not by process flow.

eg. In attached model, i would like to have a report in dashboard, which tells min, avg and max content during the simulation, between PE1 & PE2, PE2 & PE3, and so on.

dashboardsphotoeyereport and stats
model1.fsm (39.2 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.

Hitesha N2 avatar image Hitesha N2 commented ·

@phil.bobo Can you please help me with this?

0 Likes 0 ·
Joshua S avatar image
0 Likes"
Joshua S answered Hitesha N2 commented

Here's your model with changes to make it work how I think you want it to. I created a tracked variable for each of your zones. These tracked variables are incremented or decremented for every photoeye OnCover trigger. They are also incremented or decremented when an item enters or leaves your entire system. I also created a statistics collector which displays all the statistics you wanted.

16897-model1-1.fsm


16897-model1-1.fsm (44.2 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.

Hitesha N2 avatar image Hitesha N2 commented ·

@Joshua S and @Sam Stubbs

Thanks a lot for the answer.

0 Likes 0 ·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

Hi Hitesha, I'm sorry we missed your question. I'm getting an example that you can see. One way that you might do to achieve this is to use a simple Process Flow with zones.

Each time the box crosses a Photo Eye, have the Process flow create a token and have it enter and wait in a Zone until it crosses the next Photo Eye in the line. Then just collect statistics on the Zone.

Alternatively you could use a tracked variable for each of the areas you're tracking. Have logic that triggers when a box enters the photo eye to increment the value of the variable, then decrement the value when it leaves the corresponding photo eye. Then you can chart each of those tracked variables (Max, min, average, etc.)

5 |100000

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

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.