Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Releasing internal tags
PostPosted: Thu Sep 01, 2011 10:18 am 

Joined: Mon Aug 29, 2011 11:20 pm
Posts: 6

Offline
Hi Ron,

I have an issue with my application. I have created a function to populate internal tags with external tag information. The function then calls the popup that is mapped to the internal tags. The idea is I can then call this function throughout my application. I have multiple functions - one for each external tag set I have.

Code:
      public void Get_H2O_Temp()
      {
Globals.Tags.Alarm_HiHi_Setpoint = Globals.Tags.H2O_TEMP_HHSP;
Globals.Tags.Alarm_Hi_Setpoint = Globals.Tags.H2O_TEMP_HSP;
Globals.Tags.Alarm_Low_Setpoint = Globals.Tags.H2O_TEMP_LSP;
Globals.Tags.Alarm_LowLow_Setpoint = Globals.Tags.H2O_TEMP_LLSP;
Globals.Tags.Alarm_HiHi_Debounce = Globals.Tags.H2O_TEMP_HHDB;   
Globals.Tags.Alarm_Hi_Debounce = Globals.Tags.H2O_TEMP_HDB;   
Globals.Tags.Alarm_Low_Debounce = Globals.Tags.H2O_TEMP_LDB;
Globals.Tags.Alarm_LowLow_Debounce = Globals.Tags.H2O_TEMP_LLDB;
Globals.Tags.Alarm_HiHi_SDEnable = Globals.Tags.H2O_TEMP_HHEN;         
Globals.Tags.Alarm_LowLow_SDEnable = Globals.Tags.H2O_TEMP_LLEN;
Globals.Tags.Alarm_Name.Value = "H2O Temp";
Globals.Analog_Popup.Show();
      }
      
public void Get_CARB_IPRESS()
      {
Globals.Tags.Alarm_HiHi_Setpoint = Globals.Tags.CARB_IPRESS_HHSP;
Globals.Tags.Alarm_Hi_Setpoint = Globals.Tags.CARB_IPRESS_HSP;
Globals.Tags.Alarm_Low_Setpoint = Globals.Tags.CARB_IPRESS_LSP;
Globals.Tags.Alarm_LowLow_Setpoint = Globals.Tags.CARB_IPRESS_LLSP;
Globals.Tags.Alarm_HiHi_Debounce = Globals.Tags.CARB_IPRESS_HHDB;   
Globals.Tags.Alarm_Hi_Debounce = Globals.Tags.CARB_IPRESS_HDB;   
Globals.Tags.Alarm_Low_Debounce = Globals.Tags.CARB_IPRESS_LDB;
Globals.Tags.Alarm_LowLow_Debounce = Globals.Tags.CARB_IPRESS_LLDB;
Globals.Tags.Alarm_HiHi_SDEnable = Globals.Tags.CARB_IPRESS_HHEN;         
Globals.Tags.Alarm_LowLow_SDEnable = Globals.Tags.CARB_IPRESS_LLEN;
Globals.Tags.Alarm_Name.Value = "Carb Input Press";
Globals.Analog_Popup.Show();         
      }


The functions works great - the first one I call. However all following times i call a different function (other than the first one i call on project start) the internal tags are still mapped to the first set of external tags. For example - with the above code if I call Get_H2O_Temp first then I can control the tags correctly in the controller. However when I call Get_CARB_IPRESS afterwards the internal tags are still linked to the H2O_TEMP_xxx.

I am sure the correct function is being called because there is a text box displaying the "Globals.Tags.Alarm_Name.Value" string and it is updating correctly.

Is there some property of the internal tags that only allow them to be set once? Or should I have some initialize type command on the popup window close event that would release the link to the external tag?

Thank you,
Kurtis


 Profile  
 
 Post subject: Re: Releasing internal tags
PostPosted: Thu Sep 01, 2011 10:34 am 
User avatar

Joined: Fri Jul 15, 2011 3:21 pm
Posts: 214

Offline
I'm fairly sure there was no intention by the developers that Tag class instances be allowed to be copied to replace other Tag class instances. I've always used the .Value property of tags to exchange data back and forth between different tags.

I will pass your question on to my counterparts and Sweden to see if they have any additional information.

The way I would've implemented the popup screen your describing would have used the Screen Opened and Closing actions. The code would look something like this in the Popup Screen.

Code:
void Screen1_Opened(System.Object sender, System.EventArgs e)
      {
         if (Globals.Tags.IsHT2Temp.Value == 1) {
            Globals.Tags.Alarm_HiHi_Setpoint.Value = Globals.Tags.H2O_TEMP_HHSP.Value;
         }
         else if (Globals.Tags.IsCarbIpress.Value == 1) {
            Globals.Tags.Alarm_HiHi_Setpoint.Value = Globals.Tags.CARB_IPRESS_HHSP.Value;
         }         
      }
      
      void Screen1_Closing(System.Object sender, System.ComponentModel.CancelEventArgs e)
      {
         if (Globals.Tags.IsHT2Temp.Value == 1) {
            Globals.Tags.H2O_TEMP_HHSP.Value = Globals.Tags.Alarm_HiHi_Setpoint.Value;
         }
         else if (Globals.Tags.IsCarbIpress.Value == 1) {
            Globals.Tags.CARB_IPRESS_HHSP.Value = Globals.Tags.Alarm_HiHi_Setpoint.Value;
         }   
         
      }

_________________
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer


 Profile  
 
 Post subject: Re: Releasing internal tags
PostPosted: Thu Sep 01, 2011 10:56 am 

Joined: Mon Aug 29, 2011 11:20 pm
Posts: 6

Offline
Thanks for the reply.

I seen the other topic on here for using popup and it does make sense. It would be cumbersome though to have to assign a pointer to each tag group I need to use in popup. As well as the open/close events of the popup would have a massive amount of scripting in each ;)

I appreciate the help and hopefully Sweden can shed some light on if this is possible or if my method is not possible. It would seem like it is possible as it works for the first tag set assigned.


 Profile  
 
 Post subject: Re: Releasing internal tags
PostPosted: Fri Sep 02, 2011 9:30 am 
User avatar

Joined: Fri Jul 15, 2011 3:21 pm
Posts: 214

Offline
According to the developers, there is no support for setting a tag to an instance of another tag.

Index addressing (which I didn't mention before) is another option that the current software has. This is documented in section 4.9 of the iX Developer Reference Manual.

http://www.beijerelectronicsinc.com/dow ... encemanual

_________________
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: