DM Internal Message Shape
- TonyFrazier
- Posts: 6
- Joined: Mon Jan 09, 2017 11:21 am
DM Internal Message Shape
Do you have any more info on the new DM internal message shape for the activity programming and how it works. This would be very useful to me and an example would be very much appreciated
- boyce
- Enovation Controls Development
- Posts: 322
- Joined: Wed Sep 08, 2010 5:09 pm
Re: DM Internal Message Shape
Just make some variables, put values in the variables and assign the variables in the Internal Message block. Whenever the Activity Program runs a message will be added to the fault message list.
***THIS IS NOT THE RIGHT WAY TO UPDATE VARIABLES IN AN ACTIVITY PROGRAM THAT NEED TO CHANGE DURING THE ACTIVITY PROGRAM. PLEASE CONTINUE ON IN THIS TOPIC TO SEE THE RIGHT WAY.***
***THIS IS NOT THE RIGHT WAY TO UPDATE VARIABLES IN AN ACTIVITY PROGRAM THAT NEED TO CHANGE DURING THE ACTIVITY PROGRAM. PLEASE CONTINUE ON IN THIS TOPIC TO SEE THE RIGHT WAY.***
Boyce Schrack
Enovation Controls
Enovation Controls
- TonyFrazier
- Posts: 6
- Joined: Mon Jan 09, 2017 11:21 am
Re: DM Internal Message Shape
Hi, Thanks very much for that.
To test how it works I have set up a routine where an external emergency stop button is connected through a pdm and to show that this is working I have a warning light which is operated through firing an action to turn a lamp visible variable in an activity program.
I have also set up a an internal diagnostic message activated by the same "Fire actions" block in the activity program followed by the internal message block.
The warning light works every time I turn the switch on, however, the Diagnostic message only appears on the screen the second time I turn the switch on. I hadn't realised this earlier and was why I was puzzled with how the routine worked.
I am using the latest V2.9 for colour screens with a PV780
Any ideas please?
PS I should also add the second time the switch is pressed has to be within 5 seconds of the first time for the message to appear on screen.
To test how it works I have set up a routine where an external emergency stop button is connected through a pdm and to show that this is working I have a warning light which is operated through firing an action to turn a lamp visible variable in an activity program.
I have also set up a an internal diagnostic message activated by the same "Fire actions" block in the activity program followed by the internal message block.
The warning light works every time I turn the switch on, however, the Diagnostic message only appears on the screen the second time I turn the switch on. I hadn't realised this earlier and was why I was puzzled with how the routine worked.
I am using the latest V2.9 for colour screens with a PV780
Any ideas please?
PS I should also add the second time the switch is pressed has to be within 5 seconds of the first time for the message to appear on screen.
- boyce
- Enovation Controls Development
- Posts: 322
- Joined: Wed Sep 08, 2010 5:09 pm
Re: DM Internal Message Shape
The problem why the internal message is not added the first time is that events are fired to set variables and then the internal message is added. But the events to set the variables are pushed onto the stack and are run after the activity program completes. This is a very common mistake that shows up frequently. And it got me this time.
Here's the right way to do it.
Check the auto creates to make local variables for the internal message.
Assign values to the local variables. Local variables are updated directly and are not done by firing an event.
Here's the right way to do it.
Check the auto creates to make local variables for the internal message.
Assign values to the local variables. Local variables are updated directly and are not done by firing an event.
Boyce Schrack
Enovation Controls
Enovation Controls