RSView32 and pop-up Confirmation boxes

A

Thread Starter

Andy Sibley

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!
---
 
H
From: "Hugo Ahrens" <[email protected]>
To: <[email protected]>
Subject: Re: PLCS: RSView32 and pop-up Confirmation boxes

Andy,

Do you know about placeholders? I do a lot of the type of work you describe in pipelines utilities and factories. I find it much simpler to have the
pop-up screen just contain placeholders and then "feed" the tags to the pop-up when it is called (sometimes with parameter files). Also I would never send a pulse (too dangerous as far as I am concerned), I just set a PLC bit and then have the PLC look after getting rid of it when it is good and ready.

Hugo
 
W

Wayne Burling

Hi Andy
It is definetly easier to call up a small popup and set up 2 buttons with place holders
Start Button- in the "run Command" & #1=1
Stop button- in the "run Command" &#1 = 0
you can even add 2 more buttons in the back which show up when start or stop is active- just add visibilty to your main start / stop
buttons.
If this method is used you will only need to build one Start/Stop popup and by utilising the placeholders you will save yourself alot of
work.
When you call up your Stop/Start popup you will need to build a macro to automatically load in the tag eg Display StartStop_pop /T%1 /cc
Hope this helps
 
Top