Mitsubishi RM-501

  • meine deutch ist nicht gut :(
    es gibt keine antworten am englisch forum, so ich muss hier thema beginn
    so:


    I have been trying to use this old Mitsubishi for use with my object
    detection software, but have problems with communication.


    It works ok on a dos machine, but as i need to control the robot from
    winXP (Borland Delphi), both serial and parallel port are problematic :(


    Serials seems to accept my commands but DTR and DSR seems not to work
    becuse PC will send commands although the robot is still busy :(


    Have you had any luck? what software are you using for communication?

  • ANZEIGE
  • Thanks for the answer anyway :)


    If somebody has any solution feel free to answer
    I will keep trying and send my project when I
    find the solution :)

  • Yes, it is as you said, windows is difficult with this.
    Use Serial Port and check the high, low's manualy after sending over TXD and RXD.
    Dont use overlapped. Use the windows API commands for checking the serial port bits, no Portio.dll etc.
    I have done it and it works ... for stall use and extra routine which count after getting no low.
    Parallel is not working.


  • Use Serial Port and check the high, low's manualy after sending over TXD and RXD.


    Hey, thnx for this... We have already created microcontroller that does the job,
    but I'll sure try to do this - it would be simpler.


    Have you maybe done something like this in delphi? If you have some sample
    code I would be very gratefull :)

  • bool MyDlg::SendCommand(int command, int wert1, int wert2, int wert3, int wert4, int wert5)
    {
    bool ok=true;
    CString Wert1,Wert2,Wert3,Wert4,Wert5;
    Wert1.Format("%d",wert1);
    Wert2.Format("%d",wert2);
    Wert3.Format("%d",wert3);
    CString sendstring;
    CHAR* ccb;
    CHAR* fccb;
    //Nest
    if (command == 1){fccb="N";ccb="T\r";}
    //Move
    if (command == 2){fccb="M";sendstring="O "+Wert1+"\r";ccb=sendstring.GetBuffer();}
    //GripPressure
    if (command == 3){fccb="G";sendstring="P "+Wert1+","+Wert2+","+Wert3+"\r";ccb=sendstring.GetBuffer();}
    //GripClose
    if (command == 4){fccb="G";ccb="O\r";}
    //GripOpen
    if (command == 5){fccb="G";ccb="C\r";}
    //Speed
    if (command == 6)
    {
    fccb="S";
    sendstring="P "+Wert1+"\r";
    ccb=sendstring.GetBuffer();
    m_speed.SetPos(wert1);
    }
    //Reset
    if (command == 20){fccb="R";ccb="S\r";}
    //Senden über Com Port
    int timeout=robotimeout;
    if (command < 7 || command==20)
    {
    DWORD reward;
    int lang=strlen(ccb);
    bWriteRC = WriteFile(m_hCom, fccb,1,&iBytesWritten,NULL);
    Sleep(200);
    bool fertig=false;
    while(fertig==false)
    {
    GetCommModemStatus(m_hCom,&reward);
    if (reward & MS_CTS_ON)
    {
    fertig=true;
    }
    Sleep(1);
    timeout--;
    if (timeout < 0){AfxMessageBox("Timeout bei der Kommunikation mit dem Roboter",0,NULL);ok=false;break;}
    }
    bWriteRC = WriteFile(m_hCom, ccb,lang,&iBytesWritten,NULL);
    }

    return ok;
    }



    please make m_hCom your create handle of your used comport.
    Also use the Comport Settings like I described here for my software.
    Notice the 200ms after FIRST byte !!
    it is very stable, we run about a half year with that.


    SW1: 1,2,4,5,6,7,8=Off 3=On
    SW2: 1,3,4,8=Off 2,5,6,7=On


    perhaps u can translate the API in Delphi ? don't know ...

Erstelle ein Benutzerkonto oder melde dich an um zu kommentieren

Du musst ein Benutzerkonto haben um einen Kommentar hinterlassen zu können

Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Geht einfach!
Neues Benutzerkonto erstellen
Anmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden