RafaelCaballe

Triggering out of context

Discussion created by RafaelCaballe on Sep 19, 2014
Latest reply on Sep 22, 2014 by steve_ssh

I have a solution called machine.fmp12 with a single table MACHINE with a single field MACHINE::id. The machine could be On / Off, so I should add another field MACHINE:status with a boolean value 0: machine off and 1: machine on.

 

However instead of adding that second field I need to have the status of the machine into another solution called status.fmp12 with a single table STATUS, with three fields:

 

  • STATUS::id
  • STATUS::id_machine
  • STATUS::value

 

The status.fmp12 is shared, so I can use it in the graph of machine.fmp12 and set the relationship between MACHINE and STATUS.

 

The user is working from machine.fmp12 in a layout based on MACHINE. In that layout I have placed the STATUS::value, so the user can see if the machine is On / Off. During the normal work the STATUS:.value is updated according to the information received from hardware sensor (via PLC and OPC Server,...etc).

 

What I need is to trigger a script on the context of layout based on MACHINE when the STATUS:.value changes.

 

Is that feasible?

 

Thanks!

-Rafael

Outcomes