create popup

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
jeyaseelan
Posts: 3
Joined: Tue Aug 23, 2011 10:05 pm

create popup

Post by jeyaseelan »

hi

i new to the ix developer, i need to clarify some doubts about in popup, for other hmi we create only one popup for one type of device for example if we have 5 manual DOL motor we create only one popup for 5 device and we pass the different tag to different motors at the runtime, for the same how to do here, Please anyone help me

regards
s jeyaseelan

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: create popup

Post by Ron L. »

The only way I know to do this is using internal tags (tags without an address) and script. The script would go in the "Opened" and "Closed" events to copy the values between tags. The code would look like this:

Code: Select all

public partial class PopupScreen
    {
		
		void PopupScreen_Opened(System.Object sender, System.EventArgs e)
		{
			if (Globals.Tags.ScreenIDTag.Value == 0) {
				Globals.Tags.InternalTag1.Value = Globals.Tags.Tag1.Value;
				Globals.Tags.InternalTag2.Value = Globals.Tags.Tag2.Value;
			}
			else if (Globals.Tags.ScreenIDTag.Value == 1) {
				Globals.Tags.InternalTag1.Value = Globals.Tags.Tag3.Value;
				Globals.Tags.InternalTag2.Value = Globals.Tags.Tag4.Value;
			}
		}
		
		void PopupScreen_Closed(System.Object sender, System.EventArgs e)
		{
			if (Globals.Tags.ScreenIDTag.Value == 0) {
				Globals.Tags.Tag1.Value = Globals.Tags.InternalTag1.Value;
				Globals.Tags.Tag2.Value = Globals.Tags.InternalTag2.Value;
			}
			else if (Globals.Tags.ScreenIDTag.Value == 1) {
				 Globals.Tags.Tag3.Value = Globals.Tags.InternalTag1.Value;
				 Globals.Tags.Tag4.Value = Globals.Tags.InternalTag2.Value;
			}			
		}
    }
tag_list.JPG
tag_list.JPG (36.51 KiB) Viewed 16340 times
copy_tags_ex.JPG
copy_tags_ex.JPG (82.74 KiB) Viewed 16340 times
In the button "Click" action for the button to open the popup screen you'll need to set the "ScreenIDTag".
button_click_action.JPG
button_click_action.JPG (39.51 KiB) Viewed 16340 times
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

jeyaseelan
Posts: 3
Joined: Tue Aug 23, 2011 10:05 pm

Re: create popup

Post by jeyaseelan »

Hi Ron L

thank for your reply

i get some idea and i write the script in popup screen open condition, because that the real tags values not updated at time of popup open, when i close and open the popup then only i get the real tags values

i need continuous update when popup screen open

please help me how to do that/

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: create popup

Post by Ron L. »

That is possible, with more scripting, but if this starts to get too complex, you might be better off just making lots of popup screens.

First you need to change the Tags with addresses to "Always Active".
always_active.JPG
always_active.JPG (61.42 KiB) Viewed 16332 times
Then you would have to go to the "Script" section under tags and insert some code to the "ValueChanged" actions to update the internal tags.
tags_valuechange.JPG
tags_valuechange.JPG (115.94 KiB) Viewed 16332 times
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

jeyaseelan
Posts: 3
Joined: Tue Aug 23, 2011 10:05 pm

Re: create popup

Post by jeyaseelan »

hi ron l

again thanks for your replay, but i can't execute this Script for two popups because this script written in value changed when 1 st motor tags value change d the popup displayed the 1st motor value again when i click the 2nd motor button that time also the popup displayed the same value of 1st motor popup value,because the values are stored in the internal tags at the time of value changed, the popup displayed only last stored values for all motor popup

again sorry for disturbance please guide me

again thanks for your support

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: create popup

Post by Ron L. »

I don't understand what you're asking. You're welcome to send me a copy of your project if you would like me to take a look.
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

Post Reply