RobotStudio event

Refreshing SM

Why does screenmaker not updates my graph in realtime, and only when I change from screens e.g. (jogging back to my SM)
 

Thanks in advance Rob(ot)

Comments

  • Hi Rob(ot),
     

    This is done by design, since a graph control might requires too much data.

     

    How often will graph need to be updated?

     
    Carlos Martinez
    ABB
  • Kevin
    Kevin ✭✭
    Hi Carlos,

    I have a similar problem with a combo box displaying an array.

    A button press sets a boolean which causes my background task to set all the elements of a string array to "". It then scans a directory and copies the file names to the array with index starting at 1 and incrementing for each file name. The button press also switches to a new screen which has the combo box bound to the array.

    When I click on the combo box to view the file names, sometimes the list is fully populated, and sometimes has only a few entries - so the array has been copied to the FP before the directory scan is complete.

    Strangely, sometimes the list is incomplete, having blank "" elements interspersed with file names. I have no idea how this could be caused.

    As with the graph, switching to another FP application and back refreshes the combo box so all the filenames are present.

    Is there a more elegant way to get the combo box to refresh, e.g. via a boolean set by the background task when the array is complete?

    Thanks,

    Kevin

  • Hi,
     

    The graph control has a public method called "UpdateValues". One can add an ActionTrigger component to call this method. Then you need to manually select the graph and the method.

     

    PLEASE NOTE THAT THIS FEATURE HAS NOT BEEN FULLY TESTED AND IT MIGHT BE CHANGED OR REMOVED

     

    image

     

     

     Regarding the ComboBox, we could use a similar approach, but this will not solve the racing condition. Could you add a signal or a boolean at the end of the RAPID code which is the one that is used to open the Screen? In this way, the Screen will be opened after RAPID has updated the array.

     

    Let me know hos this goes ...

     

    Kind Regards

     
    Carlos Martinez
    ABB
  • Kevin
    Kevin ✭✭

    Hi Carlos,

    Re the combo box ...

    At the moment, the new screen is opened by the button press. I could add a boolean or signal to the end of my Rapid routine and bind it to an action trigger to open the screen or to call UpdateValues, except I have been having problems getting action triggers to trigger reliably.

    See http://forums.robotstudio.com/forum_posts.asp?TID=3143.

    Regards,

    Kevin

  • I will check what could be done about the other post.

    At least in this scenario, this might be the way to solve the racing condition. There are other options, for example: creating your own control to support special initiazliation. These options requires programming inside VS.NET with the FP SDK.

     

    Could you check the ActionTrigger works in this scenario?

     

    thanks
    Carlos Martinez
    ABB
  • Hi Carlos,
     

    I need to update the graph app. every 2 minutes.

     

    Using the public method "UpdateValues", in combination with a action trigger solves the problem.

     

    Thanks

     

    Rob(ot)
  • Kevin
    Kevin ✭✭

    Hi Carlos,

    The combo box does not appear to have a public 'UpdateValues' method.

    Using an ActionTrigger to display the combo box screen does not work for me.

    My work-around is to have two buttons:
    1. 'Load Array', which requests the background task to load file names to the array.

    2. 'Export File', which is enabled by a boolean after the array is loaded. Pressing the button opens the screen containing the combo box.
    Regards,

    Kevin

  • Hi Kevin,
     

    The UpdateValues method is only avaible in the Graph control. The ComboBox control has no "special" method to update its binding data. The way to "emulate" this functionality is to create a control (inherit from ComboBox), but this requires VS.NET.

     

    However, we still have the racing condition. The possible options is to code this in .NET. Are you familiar with it?

     

    BR.Carlos

     

     
    Carlos Martinez
    ABB
  • Kevin
    Kevin ✭✭
    Hi Carlos,

    No, I do not have VS.NET.

    For the moment, my two-button solution above overcomes the race condition, and is not too clumsy.

    It would be good if a future release of SM provided an update mechanism triggered by Rapid booleans for all controls which are not automatically updated.

    Regards,

    Kevin