InTouch "Re-Usable" Popup

dalporto

Lifetime Supporting Member
Join Date
Jun 2021
Location
Montreal, QC
Posts
258
Hi.


Here's what I want to do and I'm not sure where to start. I did it back then using Citect so I'm pretty sure it can be done.


I have a lot of commands that acts the same, mostly open / close, trip / close, start / stop, so usually in the popup i have 5 buttons: the 2 "SELECT" command buttons, a "CLEAR" button to clear the selected command before to pick another, an "EXIT" popup button, and an "EXECUTE" command which is mandatory for the confirmation scheme. There will also be a text box saying NO COMMAND SELECTED / 52T1 TRIP COMMAND SELECTED / 52T1 TRIP COMMAND EXECUTED etc.


I want to have it into 1 single popup and re-use it. So from the main page I'd select 52T1 breaker commands and the popup would open showing the title "52T1 Breaker" and the commands would display "TRIP" and "CLOSE". If I select the TRIP, message display would be "52T1 TRIP COMMAND SELECTED", and that would set an memory integer to "1", which would point to the right command. Then, when when I push "EXECUTE", that would send the right command, let say here UHI_52T1_TRIP_CMD to the PLC and display "52T1 TRIP COMMAND EXECUTED" for 1 second then close the popup and reset Integers and Srings to start values.


I know what's need to be done, but I'm not sure where to put the code. Also, I'm not too familiar with the InTouch script syntax.


Let start with the first thing.


Let say I have 2 breakers on my main 1-Line page, 52T1 and 52T2. They will open the same popup page that will be called let say CMD_POPUP; How can I tell the popup it has been opened from which button?


Open via an action script? Show "CMD_POPUP"; then set a string or an integer to something? What would the script looks like?


Then I would list my commands and text lists under the "While Showing" of the popup?



I'd be glad to find a couple examples of scrip edition.


Thanks.
 
Many years ago I did this for a valve control page, not done intouch for over 25 years but it is something about passing a number when opening up the popup, something like a parameter number or text when you press a function key or touch area.
I do remember doing it, each valve & motor had a touch area, this put up the common control dialog & the valve number details were passed as some sort of parameter. don't have Intouch docs anymore so cannot show you how to do it.
There is something similar on many Scada systems.
 
Already managed to start something:


Show "POPUP";
POPUP_CMD_SEL = 1;


The struggle will come later with script syntax.
 
Let say I have 2 breakers on my main 1-Line page, 52T1 and 52T2. They will open the same popup page that will be called let say CMD_POPUP; How can I tell the popup it has been opened from which button?


Look into "Indirect" tags.

I don't remember the syntax exactly, but it was something like you would create the CMD_POPUP using tags like "Breaker_Execute" as an indirect tag. In the action script that opens your CMD_POPUP, you set Breaker_Execute to tag 52T1_Execute, and whatever properties / actions 52T1_Execute has (such as a link to a PLC register, or a description "52T1 TRIP COMMAND SELECTED", the tag Breqker_Execute would have those properties as long as that popup is open.

Open the same popup using 52T2's object's trigger script and it'll use 52T2's stuff.

Search Intouch's help pages for Indirect and it will explain better than I'll remember.

Good luck.
 
Indirect Tags

Indirect tags act as "pointers" to other tags. For example, you can create a single InTouch window and use indirect tags to show data from multiple different sets of tags.

The following figure shows an example of an application window that is capable of displaying several pumps. Instead of creating separate windows for each pump, you can use indirect tags in one window to show the values of different source tags associated with individual pumps.

A QuickScript or operator action points the indirect tag to the source tags. For example, the following script statements assign the two PumpRPM tags to an indirect analog tag called IndPumpRPM based on the value of the PumpNo tag.

IF PumpNo == 1 THEN

IndPumpRPM.Name = "PumpRPM1";

ELSE

IndPumpRPM.Name = "PumpRPM2";

ENDIF;

When you equate an indirect tag to another source tag, the indirect tag acts as if it is the source tag. The values associated with the original source and indirect duplicate tags are synchronized together. If the value of the source tag changes, the indirect tag reflects the change. If the indirect tag's value changes, the source tag changes accordingly.

You can use discrete, analog, and message types of indirect tags. These three types of indirect tags are comparable to similar memory and I/O types of tags.

For more information about indirect tags, see Defining Indirect Tags.




Looks like fun.


I will give it a try.


Thanks!
 
I'm finally back to that popup.


I'm running a script in the Window where I basically put all my command tags.


IF (POPUP_CMD_NUMBER == 1{Defined in button that calls the command}
AND POPUP_CMD_BUTTON_INT == 2
AND POPUP_CMD_SEND == 1)
THEN G1_ESTOP_CMD = 1;
POPUP_CMD_TXT = "ESTOP COMMAND EXECUTED";
POPUP_CMD_SEND = 0;
POPUP_CMD_BUTTON_INT_LOCK = 0;
POPUP_CMD_BUTTON_INT = 0;
Hide "P10_CMD";
POPUP_CMD_TXT = "NO COMMAND SELECTED";
ENDIF;





What I'd like to do, is to pause 1 seconds before the Hide "P10_CMD" so the operator can see the "Whatever COMMAND EXECUTED".


Is there a easy way or not?


I'm not a professional scriptwriter.
 
Popups in WW are pretty easy. If your tags are structured such that everything is appended with a common string...IE pumprunx, pumpfltx, startPBx stopPBx, then just run a script on your button that assigns the value of X to a memory tag. Then in the on show script of the popup window, assign all the indirect tags that are used on that popup in the manner:

Button
MemoryTag = "1";
Open Popup

Popup On Show Script
IndPump.Name = "Pump" + MemoryTag.Name;
InfPumpflt.Name = "Pumpflt" + MemoryTag.Name

If your tags don't conform to pattern, then don't pass a memory tag in the button script, but assign all the Indirect Tag names directly in the button script.

Button Script
IndPump.Name = Pump1.Name;
IndPumpFlt.Name = Pump1.Flt.Name;
Open Popup;
 
As for the auto hide after x seconds...

On the popup on show action set an integer memory tag to 0
On the while popup Open script set the interval to 250ms and in the script do
Memory tag = memory tag +1;
If Memory Tag > 4
HideSelf;
Endif;

Professional Hint...never Hide "window name" unless you want to hunt for broken links if you ever change your window name. Use HideSelf if closing the window you're in, or create a string tag that holds your window names and assign them in the application start script.
 
Cool. I wasn't expecting at all that HideSelf would work here, thanks.


I'm trying the 4 X 250ms now. It's late and I'm having a hard time to figure out the condition when I want it to count since the actual command to the PLC (G1_ESTOP_CMD) is reset by the PLC.


Anything else in these lines is only executed once, so it would only counts to "1", leaving the popup open.



But it's promising, thanks again, it's appreciated.
 
As for the auto hide after x seconds...

On the popup on show action set an integer memory tag to 0
On the while popup Open script set the interval to 250ms and in the script do
Memory tag = memory tag +1;
If Memory Tag > 4
HideSelf;
Endif;

Professional Hint...never Hide "window name" unless you want to hunt for broken links if you ever change your window name. Use HideSelf if closing the window you're in, or create a string tag that holds your window names and assign them in the application start script.

Couldn't you also use "On True" to show popup and then "While True" timing to set time to shut down?
 
Couldn't you also use "On True" to show popup and then "While True" timing to set time to shut down?

You could if for certain the while true waits for the first timeout to execute the script. I wasnt certain and not at my desk to test, so I suggested an iteration as I know that works.
 

Similar Topics

Hi all. Customer wants analog faceplates really bad, even if we explained that it doesn't make much sense in his process. What he wants to see...
Replies
5
Views
129
Trying to export a Modern application for an upgrade to Intouch 2020 but I cannot export the application from the 2014 version because the export...
Replies
2
Views
108
Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
149
Currently we have a fat( I think that is what it is called) Intouch application. An application resolution of 3840x1080, and inside that 2x...
Replies
0
Views
90
Hi guys We're in the process of creating a ME runtime to operate on a PC running windows using a InTouch INDT156 touchscreen, and we're having an...
Replies
3
Views
140
Back
Top Bottom