A
In order to prevent accidental pressing of buttons on an RSView display, I need to launch a confirmation box which ask the operator "did
they really mean to do this?" and gives them a chance to cancel the action.
I've been running a test on this to set a tag called "Breaker\A3\CloseCmd" which is required to be set and then reset after 1s. The actual
name is unimportant of course!
A button on a display is configured to have a Command Action as shown below:
Display\Conf_Text="Close breaker A3"
Display\Conf_Tag=Breaker\A3\CloseCmd
Display Confirmation
Two 'Display' tags have been created:
1. A string tag called Conf_Text which passes a text string to the confirmation box tell the operator what he was about to do and
2. A tag call Conf_Tag which should hold the Tag to be set
In the Confirmation Box which pops up, a string displays the Conf_Text tag and tells the operator what he was about to do. The No button is configured to reset the Conf_x tag values and then Abort to close the display while the Yes button needs to action a Set and then Reset of
the tag "Breaker\A3\CloseCmd".
Command Action on NO:
Display\Conf_Text=""
Display\Conf_Tag="" ; Could be wrong, see below
Abort
Command Action on YES:
Display\Conf_Tag 1 ; There's the rub!
Pause 1
Display\Conf_Tag 0
Abort
The Confirmation Box only knows about the tags Conf_Text and Conf_Tag as these values are to be passed FROM the push button TO the confirmation box. This method obviously allows me to have only one confirmation box and yet use it for many button actions. The initiating button passes the tag value to be set. That seems pretty sensible doesn't it?
So the big question is:
How do I set the tag "Breaker\A3\CloseCmd" FROM the confirmation box which only knows about the tag Conf_Tag?
In the button which launches the Confirmation Box the action:
Display\Conf_Tag=Breaker\A3\CloseCmd
only equates Conf_Tag to the VALUE of "Breaker\A3\CloseCmd" and not to the pointer location of the tag. If in the YES command action I use:
Display\Conf_Tag 1
Pause 1
Display\Conf_Tag 0
This only sets the Conf_Tag and not the tag "Breaker\A3\CloseCmd".
If I make Conf_Tag a STRING rather than a DIGITAL bit, how do I then convert the string into a tag in order for it to be set? Eg.:
Display\Conf_Tag="Breaker\A3\CloseCmd"
I do not see a way of setting Conf_Tag to be a POINTER to the tag "Breaker\A3\CloseCmd".
Anyone else had experience of this and wants to share?
Regards from sunny San Diego...Andy
PS. Yes, I've used the VB script on the RS knowledgebase site but there's a problem with focus when using Active Display Server!
---
they really mean to do this?" and gives them a chance to cancel the action.
I've been running a test on this to set a tag called "Breaker\A3\CloseCmd" which is required to be set and then reset after 1s. The actual
name is unimportant of course!
A button on a display is configured to have a Command Action as shown below:
Display\Conf_Text="Close breaker A3"
Display\Conf_Tag=Breaker\A3\CloseCmd
Display Confirmation
Two 'Display' tags have been created:
1. A string tag called Conf_Text which passes a text string to the confirmation box tell the operator what he was about to do and
2. A tag call Conf_Tag which should hold the Tag to be set
In the Confirmation Box which pops up, a string displays the Conf_Text tag and tells the operator what he was about to do. The No button is configured to reset the Conf_x tag values and then Abort to close the display while the Yes button needs to action a Set and then Reset of
the tag "Breaker\A3\CloseCmd".
Command Action on NO:
Display\Conf_Text=""
Display\Conf_Tag="" ; Could be wrong, see below
Abort
Command Action on YES:
Display\Conf_Tag 1 ; There's the rub!
Pause 1
Display\Conf_Tag 0
Abort
The Confirmation Box only knows about the tags Conf_Text and Conf_Tag as these values are to be passed FROM the push button TO the confirmation box. This method obviously allows me to have only one confirmation box and yet use it for many button actions. The initiating button passes the tag value to be set. That seems pretty sensible doesn't it?
So the big question is:
How do I set the tag "Breaker\A3\CloseCmd" FROM the confirmation box which only knows about the tag Conf_Tag?
In the button which launches the Confirmation Box the action:
Display\Conf_Tag=Breaker\A3\CloseCmd
only equates Conf_Tag to the VALUE of "Breaker\A3\CloseCmd" and not to the pointer location of the tag. If in the YES command action I use:
Display\Conf_Tag 1
Pause 1
Display\Conf_Tag 0
This only sets the Conf_Tag and not the tag "Breaker\A3\CloseCmd".
If I make Conf_Tag a STRING rather than a DIGITAL bit, how do I then convert the string into a tag in order for it to be set? Eg.:
Display\Conf_Tag="Breaker\A3\CloseCmd"
I do not see a way of setting Conf_Tag to be a POINTER to the tag "Breaker\A3\CloseCmd".
Anyone else had experience of this and wants to share?
Regards from sunny San Diego...Andy
PS. Yes, I've used the VB script on the RS knowledgebase site but there's a problem with focus when using Active Display Server!
---