RobotStudio event

Name rule for REAL_PARAMETER in MMC configuration file

mstque
mstque
edited June 2020 in Robot Controller
Good day, gentlemen,
I will be appreciated for suggestions concerning situation described next. In IRC5 controller will be folder with some constant number of predefined modules (around 100). Each of that modules will be similar inside: some robtarget declarations and userdefined movement instructions using that robtargets. Lets name mentioned instructions RoughL.
Every cycle, depends on sensors state, one from the modules will be loaded, main routine (same name of routine for every module) will be executed and module will be unloaded after. Movements inside each module will be created by operators.
And now closer to my problem. I`m trying to prepare RougL_ToPoint parameter inside MMC in such way, that every time operator will add RoughL through "Add Instruction" functionality the name of _ToPoint will started with "P" name with "XXX" numerical attribute which will increase with every new adding of the RoughL instruction. If I`m using name_rule "SEQ" -method "hirule_robtarget" I have to have robtarget with name like P001
somewhere before and even than every next robtarget name will change corresponding to manual (P10, P20, P30). In case if I will not have such robtarget somewhere before - RoughL instruction will add robtarget as data inside and that is completely not acceptable, because later I`m planing to made copy of needed module, load copy to semistatic task, using GetDataVal for obtain every robtarget position (pos: x,y,z) in module and to send them to external PLC (for trajectory drawing), also SetDataVal for robtarget position slight adjustment from PLC. And for that I need declarations of the used robtargets from modules at least, but much better and easier to work when you have your own defined rules for robtarget names.
Any suggestions?

P.S. There are no communication options like PC Interface, FTP, FlexPendant Interface for local HMI, etc. only Profinet Slave (software) for Siemens 1200 PLC. And excuse me for my English, in case :D

Post edited by mstque on

Comments

  • mstque
    mstque
    edited June 2020
    I`ve tried to add MMC_REAL_DATATYPE, like next:
    -name "robtarget" -def_name "P" -value_rule "SEQ" -use_value "1" -method "hirule_robtarget" -object_type "PERS" -validate_hook "hirule_validate_robtarget"
    and
    -name "RoughL_ToPoint" -name_rule "VAL"
    But after MMC.cfg load and restart all MMC_REAL_DATATYPE part is missing. I`ve tried even example from manual (Application manual RobotWare Add-Ins):
    -name "robtarget" -def_name "p" -value_rule "CUR" -method "hirule_robtarget" -object_type "CONST" -validate_hook "hirule_validate_robtarget"
    but after cfg load and restart again real_datatype part missing.
    Now I`m using:
    -name "RoughL_ToPoint" -name_rule "SEQ" -method "hirule_robtarget"
    and at the beginning of my procedure always:
    NumCount:=1;
    P10:=CRobT(\Tool:=t_rough\WObj:=wobj_workst);
    RoughL P10, v300, fine, PointNumbers{NumCount}, NumCount, t_rough\Wobj:=wobj_workst;
    !Add your RoughL instructions here
    Next part is more about RAPID programming. RoughL modified with adding of two INOUT num parameters. Inside:
    PROC RoughL(robtarget ToPoint, speeddata Speed, zonedata Zone, INOUT num PosNumber, INOUT num Counter, PERS tooldata Tool \PERS wobjdata Wobj)
     VAR bool ok;
    IF Counter<=100 THEN
        ok:=StrToVal(StrPart(ArgName(ToPoint),2,StrLen(ArgName(ToPoint))-1),PosNumber);
        IF ok Counter:=Counter+1;
    ENDIF
    and other blabla with TriggL. But...
    For parameter Counter name rule "DEF" is working:
    -name "RoughL_Counter" -name_rule "DEF" -def_name "NumCount"
    NumCount some predefined PERS num which I want to use in every module.
    And for parameter PosNumber i want to use array, but failed:
    -name "RoughL_PosNumber" -name_rule "DEF" -def_name "PointNumbers{NumCount}"
    looks like system don`t wanna accept name with "{" "}" symbols.
    So now solution is almost ready, but "add instruction" will not work :(

    P.S. OK, I changed INOUT num PosNumber to PosNumber{*} and now using rule -name "RoughL_PosNumber" -name_rule "DEF" -def_name "PointNumbers" :)



    Post edited by mstque on