RobotStudio event

Communicate with RS232

Hey Guys,

I was wondering if anybody has expierience in communicating with RS232 and a IRB-120 or just Rapid Programming Language.
I have the Rapid Program written. It is waiting in a loop until a Variable will be set to 1. This works fine. What i want to do now is to change this variable from an External Software, for example Java or c# via RS232.
Does anybody know the Protocol or how i can do this?!?

Thanks for the Help


Comments

  • Jorge
    Jorge ✭✭

    I think is not possible do it directly as you can do it using PC-Interface via ethernet.
    But You can invent your protocol, to send the name of the Var, the type (num, string, etc.) and the value from the Pc to robot.

    I'll do like this:
    • Make a program in your PC to send the name of the var and the new value. According a protocol that you invent.
    • In your robot, make a routine to read the serial port. Get the info, and extract it into three parts. One part has the name of the Var, the other the type and the last the new value. I think I'll use a record.
    • Ussing SetDataSearch, GetDataVal, GetNextSym, SetDataVal, you find the var and you can change the value. Beware, you can't change the value of a Const.
    The problem of this method, that the robot takes sometime to find the Var. But You can do it in a Multitask.

    Well, this my idea, that I think as I wrote. May be can help you.

    /Jorge


    Jorge Turiel