RobotStudio event

Messaging Namespace PC_SDK

Options

Hello,

I was wondering when the eventhandlers for the Messaging Namespace for PC_SDK are released. 

Best regards,

F.Roos

Comments

  • Ingela
    Options

    Hi,

    I wonder what information you are referring to? As far as I know, there has been no intention to add any events to the Messaging namespace. Are you already using IPC messaging?

    Best regards,

    Ingela Brorsson
    Software Engineer
    ABB Robotics, Sweden
  • Hi,

    In the controller TASK it is possible to connect a trap routine when a message is received in RMQ. But when you sent messages the other direction. That is from Controller to windows Application. I didn't found a solution with current namespace to handle when a message is received in Queue. 

    That's where I was referring to. The Eventhandlers when a message is received in Queue. 

    The .Net system.messaging has eventhandlers when messages is completely received? I can't use these, because then there is a mismatch between ABB.Robotics.controllers.messaging and system.messaging.

    Is it possible to create a handler when a new messages from controller is received in Queue?

     

    Best regards,

    F. Roos

  • carlosmtz2000
    Options

    Hola,

    IPC messaging was released in 5.10.

    There isn't an event handler to be notified whenever a message is in the queue. Eventhough, you can create a class which fires an event whenever a message is received: just create a thread which is constantly trying to receive a message:

    private static void ServerStart()<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    {

        IpcMessage message;

        IpcReturnType ret;

      

        try

        {

           // Assume that _ipcSender is created before

            while (_ipcSender != null)

            {

                 message = new IpcMessage(Ipc.MaxMessageSize);

               // Try to get a messsage, times out after 50mm

                 ret = _ipcSender.Receive(50, message);

     

                 if (ret == IpcReturnType.OK)

                {

                     // Process the message        


                }

            }

        }

        catch (Exception e)

        {

            MessageBox.Show(e.ToString());

        }

    }

    Saludos/Carlos

    Carlos Martinez
    ABB