Cancel
Showing results for 
Search instead for 
Did you mean: 

how to set an alarm on the machine

Innovator
Innovator

Hi,

 

Could anyone help me out with how to set up an alarm on the machine to say that it is activated?

 

Thanks.

18 REPLIES 18

Re: how to set an alarm on the machine

Siemens Phenom Siemens Phenom
Siemens Phenom

Normally the signal lamp of a machine will change its color automatically once it is working, or were you thinking about something different here like a specific message being shown?

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: how to set an alarm on the machine

Innovator
Innovator

@IgorKunjavskij Say for eg: MES sends a signal to activate one station. Then an alarm should display on that station to show the activation while simulating.

 

 

And my other query is, say there are two parts. One part is good(acceptable) and the other part is bad(unacceptable).

So when the good part comes to a  station,  a green light should display. And when teh bad part comes to the station, red light should display. 

It would be great if you could help me out with this.

 

Thanks.

Re: how to set an alarm on the machine

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

you can use e.g. a singleproc for creating a signal object

create some icons (red, green) and a user defined attribute (e.g. active, boolean). Then add an observer to this object (attibute active). if active is true --> change to icon green elso to red:

 

if self.~.active then

   self.~.currIcon:="green"

else

  self.~.currIcon:="red"

end

 

you should also include an init method into this object to set active to a startValue

 

At the end you can set your signal to active and the color will change automatically

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

Re: how to set an alarm on the machine

Innovator
Innovator

@Steffen_B I will try this.  Thanks a lot 

Re: how to set an alarm on the machine

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Sahana,

 

attached is a model with an implementation of what you described. Would a setup like this work for your application?

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: how to set an alarm on the machine

Innovator
Innovator

How to reset the colour immediately after it shows red/green..?

Re: how to set an alarm on the machine

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello,

I saw alot of codes in example models which contain "self.~" how you used in the example. I was wondering, if it is better to use "?" to acces the object directly. Is ther any difference between these two variables?

 

Thank you 

Re: how to set an alarm on the machine

Siemens Phenom Siemens Phenom
Siemens Phenom

'?' stands for the caller of a method. If you have an exit control the caller of the method will be the object where a part wants to exit.

 

'self.~' is usually used if you have a method which is a custom attribute. 'self' is the method and '~' goes to the location. This way you reference the object where the custom attribute method is located.

 

Now if the exit control is a custom attribute method both of them are referring indeed to the same object.

In this case '?' is also slightly faster and therefore to prefer.

 

But in principal you could also call the exit control from another method. In this case the caller would be the other method.

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: how to set an alarm on the machine

Siemens Phenom Siemens Phenom
Siemens Phenom

@SS3  if you want to reset the color during the simulation, you can just insert this code

 

.Models.MES._3D.setGraphicMaterial(makeArray(1), 10789024, 2697513, 0, 0, 0, 0.199999996996301, "deco");

into the entrance control of the drain or the exit control of the station or any other station/method that could trigger this code after the light has shown the green/red color.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution