Cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Handshake with a "Resource"

Genius
Genius

Hi Everyone,

 

I hope this is a simple question, but I'm too novice to figure this out on my own.

 

I am looking for a way to "handshake" with something like a SingleProc from an MU on a conveyor so I can track statisics on a machine and show something happening on the screen.

 

I have an MU traveling on a line. When it activates a sensor, it dwells for a time then turns on a 3D graphic on the MU. What I would like to do is track throughput and working time at that sensor and show something light up on the screen to show the machine working (2D and 3D). It seems like this should be simple to do, but I can't figure out how to do this. I don't want the MU to move into a SingleProc, I'd like it to stay on the line because that's where it is in the actual system. It's just waiting there while it's being worked on. 

 

I've tried using the Transfer Station, but for some reason its not behaving the way I expected it to. I don't need to actually move MUs around so adding this functionality is more than I need.

 

Please help, and thank you in advance.

7 REPLIES

Re: Simple Handshake with a "Resource"

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

there are different approaches necessary in 2D and 3D.
In 2D you could create different icons for your stations (simple andon lights, just a filled circle with different colors). Then you need only to change the icons (currIcon) at the start and the end of the operation.

In 3D there are different ways. Delete the default graphics from the SingleProc (copy it before), add two graphic groups to the object. Add to each graphic group an object with a different color. Then you need to show and hide the right graphic group (look in the forum, there are currently some discussions about this).
Another way would be to change the color of the 3D-Icon dynamically....

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Simple Handshake with a "Resource"

Genius
Genius

Hi Steffen,

 

Thank you for your feedback. I can imagine how I would do those graphics and those are good ideas, but how would I track the throughput and the working time at a sensor on a conveyor?

Re: Simple Handshake with a "Resource"

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

just add some user defines attributes to the station e.g.

 

statProducedParts and

statUsedProdTime

 

in the sensorControl you can increase the values of this attributes (maybe you need the take into account the reset of the statistics by the eventController).

 

e.g.

if eventController.simTime > eventController.startStat then

   station.statProducedParts:=station.statProducedParts+1

   --...

end

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Simple Handshake with a "Resource"

Genius
Genius

The produced parts user-attribute seems simple enough, but how would you track the working time? Just increment the attribute by the time worked?

 

I sort of imagined a state change call like statWorking := true, then statWorking := false and a built in observer method that tracks that time. I guess I could probably build something like that. Would that work? Observe a statWorking user-attribute on the SingleProc and then track the time that it is set to true? What's the call to get the current time?

Re: Simple Handshake with a "Resource"

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
yes, this would also work; all user defined attributes are observable
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Simple Handshake with a "Resource"

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
the current simulation time you the with:
eventController.simTime
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Simple Handshake with a "Resource"

Genius
Genius

Thank you Steffen!