Inlineformular

  • Hallo,
    ich habe zum ersten mal ein Inlineformular geschrieben, aber der Kuka mag es nicht und sagt interner Fehler. Wenn ich die Technologie einsetzen möchte. Weiß irgendwer was für ein Fehler in dem Code ist ?
    mfg elias

    DEFTP SET_Greiferpos



    Decl PARAM GrpposSET= _
    {Shortname[]"Greiferpos:", VALUE {number: DEFAULT 1, MIN 1, MAX 6, Step 1}, UNIT[]" ", Shortcut[]"POS"}


    Decl PARAM DistanceWay= _
    { SHORTNAME[]"Distance=", VALUE {number: DEFAULT 1, MIN 0, MAX 1}, UNIT[]" ", SHORTCUT[] "DST"}


    Decl PARAM DELAYTIME= _
    {Shortname[]"Delay:", VALUE {REAL: DEFAULT 0, MIN -60, MAX 60, Step 0.1}, UNIT []"sec", Shortcut[]"DLY"}


    DECL FOLD SETZUU[3]
    SETZUU[1]="SET(%GrpposSET,#CONT ,%DistenceWay,%DELAYTIME )"
    SETZUU[2]="TRIGGER WHEN DISTANCE=%DistanceWay DELAY=%DELAYTIME DO Greiferpos_SOLL=%GrpposSET"
    SETZUU[3]="TRIGGER WHEN DISTANCE=%DistanceWay DELAY=%DELAYTIME DO _Start=TRUE"

    DECL FOLD SETPG[8]
    SETPG[1]="SET(%GrpposSET)"
    SETPG[2]="REPEAT"
    SETPG[3]="Greiferpos_SOLL=%GrpposSET"
    SETPG[4]="_Start=TRUE"
    SETPG[5]="UNTIL (Greiferpos_ref==%GrpposSET)"
    SETPG[6]="REPEAT"
    SETPG[7]="_Start=FALSE"
    SETPG[8]="UNTIL (_Start==FALSE)"

    DECL InlineForm Ueberschleifen={PARAM[1] GrpposSET ,PARAM[2] _
    DistanceWay, PARAM[3] DELAYTIME, FOLD[1] SETZUU}


    DECL InlineForm Punktgenau={PARAM[1] GrpposSET, FOLD[1] SETPG}

    ENDTP

    DEFTP CHK_Greiferpos

    Decl PARAM GrpposCHK= _
    {Shortname[]"Greiferpos:", VALUE {number: MIN 1, MAX 6, Step 1}, UNIT[]" ", Shortcut[]"POS"}


    DECL FOLD CHKUU[2]
    CHKUU[1]="CHECK(%GrpposCHK)"
    CHKUU[2]="CONTINUE _
    WAIT FOR (Greiferpos_ref==%GrpposCHK)"

    Decl InlineForm CHECK={PARAM[1] GrpposCHK, FOLD[1] CHKUU}

    ENDTP

    IF ROBOTER_STEHT AND SPS_VORHANDEN THEN<br />&nbsp; WHILE NOT ROBOTER_LAEUFT<br />&nbsp; &nbsp; &nbsp; $LOOP_MSG[]=&quot;SPS IST SCHULD!&quot;<br />&nbsp; ENDWHILE<br />&nbsp; $LOOP_MSG[]=&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<br />ENDIF<br /><br />Geld ohne Arbeit! Keine Arbeit ohne Geld!

    Einmal editiert, zuletzt von ()

  • Schritt für Schritt zum Roboterprofi!
  • Es waren die fehlenden Leerzeichen in der Deklaratinon z.B. Shortname[] "xxx" Zwischen ] und " muss unbedingt ein Leerzeichen sein. Der Compiler ist eine Heulsuse und gibt noch nicht einmal eine anstaendige fehlermeldung raus.
    mfg elias

    IF ROBOTER_STEHT AND SPS_VORHANDEN THEN<br />&nbsp; WHILE NOT ROBOTER_LAEUFT<br />&nbsp; &nbsp; &nbsp; $LOOP_MSG[]=&quot;SPS IST SCHULD!&quot;<br />&nbsp; ENDWHILE<br />&nbsp; $LOOP_MSG[]=&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<br />ENDIF<br /><br />Geld ohne Arbeit! Keine Arbeit ohne Geld!

  • Zitat

    Der Compiler ist eine Heulsuse und gibt noch nicht einmal eine anstaendige fehlermeldung raus.



    so is es.

    Menschen brauchen Roboter, aber auch Roboter brauchen Menschen.

    Roboter sichern die Arbeitsplätze und den Fortschritt der Industrieländer, da sie kostengünstig und qualitativ hochwertig produzieren.

    Ohne Automatisierung mit Robotern werden unsere Produkte in Billiglohnländern hergestellt.

    >> Abonniere meinen YouTube Roboterkanal <<

  • Ich habe genau dasgleiche Problem am Anfang gehabt.
    Hab mir mal erlaubt den Code etwas zu bearbeiten.
    Musst nur noch im Menü.ini die entsprechenden Buttons erstellen,dann sollte es funktionieren.

    Decl PARAM G_Set={VALUE {NUMBER: min 1, max 6,DEFAULT 1, AUTOLIMIT FALSE},Shortname[] "Greiferpos:" , Shortcut[] "POS" , USERMODE 0}
    Decl PARAM D_Way={VALUE {NUMBER: min -1, max 1,DEFAULT 1, AUTOLIMIT FALSE},SHORTNAME[] "Distance:" , SHORTCUT[] "DST" , USERMODE 0}
    Decl PARAM D_Time={VALUE {REAL:MIN -60,MAX 60, Step 0.1,Default 0.0},Shortname[] "Delay:" , UNIT [] "sec" , Shortcut[] "DLY"}

    DECL FOLD SETZUU[3]
    SETZUU[1]="SET (%G_Set ,#CONT ,%D_Way ,%D_Time )"
    SETZUU[2]="TRIGGER WHEN DISTANCE=%D_Way DELAY=%D_Time DO Greiferpos_SOLL=%G_Set PRIO=-1 "
    SETZUU[3]="TRIGGER WHEN DISTANCE=%D_Way DELAY=%D_Time DO _Start=TRUE PRIO=-1 "

    DECL FOLD SETPG[8]
    SETPG[1]="SET(%G_Set )"
    SETPG[2]="REPEAT"
    SETPG[3]="Greiferpos_SOLL=%G_Set "
    SETPG[4]="_Start=TRUE"
    SETPG[5]="UNTIL (Greiferpos_ref==%G_Set )"
    SETPG[6]="REPEAT"
    SETPG[7]="_Start=FALSE"
    SETPG[8]="UNTIL (_Start==FALSE)"

    DECL FOLD CHKUU[3]
    CHKUU[1]="CHECK (%GrpposCHK )"
    CHKUU[2]="CONTINUE "
    CHKUU[3]="WAIT FOR Greiferpos_ref==%GrpposCHK "

    DEFTP Set_Grp ={SOC FALSE , SOT FALSE}
    DECL InlineForm _Cont = {FOCUS 1,PARAM[1] G_Set , PARAM[2] D_Way , PARAM[3] D_Time , FOLD[1] SETZUU }
    DECL InlineForm _Fine = {FOCUS 1,PARAM[1] G_Set , FOLD[1] SETPG }
    ENDTP

    DEFTP Chk_Grp = {SOC FALSE , SOT FALSE}
    DECL InlineForm _State = {FOCUS 1,PARAM[1] G_Set , FOLD[1] CHKUU }
    ENDTP

  • Sieht gut aus. mal schaun, was Elias dazu sagt.
    Besten Dank jedenfalls.

    Menschen brauchen Roboter, aber auch Roboter brauchen Menschen.

    Roboter sichern die Arbeitsplätze und den Fortschritt der Industrieländer, da sie kostengünstig und qualitativ hochwertig produzieren.

    Ohne Automatisierung mit Robotern werden unsere Produkte in Billiglohnländern hergestellt.

    >> Abonniere meinen YouTube Roboterkanal <<

  • Hallo,
    und Danke für die Hilfe dass einzige was da jetzt noch anders gehoert ist das bei den Trigger Befehlen hinter die Prameter noch ein ein Leerzeichen gehoert. Das ist ganz schoen verwirrend dass hinterden Parametern das erste Leerzeichen verschluckt wird. Aber wenn mans weiss spart man sich ne Menge Schreibarbeit. Wenn in der menue.ini noch Buttons angelegt werden dann schauts auch noch schick aus brauchts aber nicht da das Inlineformular auch ueber UserTech eingefuegt werden kann. Was mich noch interessiert
    ist wo in der menue.ini die Benutzergruppe festlegt ich hab mal gehoert es wer die achte Stelle von den Kommas, aber welche Zahl steht für was und was kann man da noch einstellen?
    mfg elias

    IF ROBOTER_STEHT AND SPS_VORHANDEN THEN<br />&nbsp; WHILE NOT ROBOTER_LAEUFT<br />&nbsp; &nbsp; &nbsp; $LOOP_MSG[]=&quot;SPS IST SCHULD!&quot;<br />&nbsp; ENDWHILE<br />&nbsp; $LOOP_MSG[]=&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<br />ENDIF<br /><br />Geld ohne Arbeit! Keine Arbeit ohne Geld!

  • Hallo,


    Ich arbeite mich gerade in die Inlinformulare ein
    Folgende Fragen habe ich:
    Ich möchte einen Inlieneformular in der Form erstellen


    ; Roboter IN/OUT = PLC /IN


    allerding weiß ich nicht wi ich die Zeile als Komentar einfüge:


    DEFTP IOs_Coments
    DECL PARAM Robot_IO_Coments={SHORTNAME[] "$OUT ", VALUE {NUMBER: DEFAULT[] "0"},SHORTCUT[] ""}
    DECL PARAM SPS_IO_Coments={SHORTNAME[] "=PLC E", VALUE {NUMBER: DEFAULT[] "0"},SHORTCUT[] ""}


    DECL FOLD Roboter_Input[0]



    DECL FOLD Roboter_Output[0]
    ;testing test


    DECL FOLD SPS_Input[0]


    DECL FOLD SPS_Output[0]


    DECL InlineForm Robot_Input={PARAM[1] Robot_IO_Coments, PARAM[2] SPS_IO_Coments,FOLD[0] Roboter_Input, FOLD[0] SPS_Input}
    DECL InlineForm Robot_Output={PARAM[1] Robot_IO_Coments, PARAM[2] SPS_IO_Coments, FOLD[0] Roboter_Output, FOLD[0] SPS_Output}
    ;DECL InlineForm SPS_Input={PARAM[1] SPS_IO_Coments, FOLD[0] SPS_Input, PARAM[1] SPS_IO_Coments,FOLD[0] SPS_Output}
    ;DECL InlineForm SPS_Output={PARAM[1] SPS_IO_Coments, FOLD[0] SPS_Output}


    ENDTP IOs_Coments
    Das sieht dann so aus:
    IO Coments Robot_Input/ Output $OUT __ =PLC E ___


    Ich will das aber in der Form haben
    ; Roboter "IN/OUT"__ = PLC "OUT/IN"__


    Out/In muss auswählbar sein


    komme nicht weiter.

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