Ethernet KRL in Submit Interpreter

  • I need an XML example to use Ethernet KRL with Submit Interpreter.


    I want to send parameter SPEED and TCPSPEED every second or faster to my PC.

    IP From PC is 192.168.2.55


    It works very well without submit right now. But in my opinion inside submit is more userfriedly.


    It helps me if I get the XML file and lines in Submit Interpreter,

  • AD
  • 1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • not sure what you have in mind... and you did not define what those are so... i just made them integers...

    this is easiest to test with $OV_JOG and $OV_PRO because you can see and adjust values any time

    and they are defined all the time. for other things some conditioning may be needed...


    Code
    RET=EKI_SetInt("myEkiConfig", "KRC/Speed", $VEL_ACT*1000) ; 0-2000 mm/sec 
    RET=EKI_SetInt("myEkiConfig", "KRC/TcpSpeed", $VEL.CP*1000) ; 0-2000 mm/sec 
    RET=EKI_SetInt("myEkiConfig", "KRC/OV_PRO_Act", $OV_PRO) ; 0-100 %
    RET=EKI_SetInt("myEkiConfig", "KRC/OV_Jog_Act", $OV_JOG) ; 0-100 %


    or if you want to make variables Speed, TcpSpeed a REAL type:


    Code
    RET=EKI_SetReal("myEkiConfig", "KRC/Speed", $VEL_ACT) ; 0-2.0 m/sec 
    RET=EKI_SetReal("myEkiConfig", "KRC/TcpSpeed", $VEL.CP) ; 0-2.0 m/sec 
    RET=EKI_SetInt("myEkiConfig", "KRC/OV_PRO_Act", $OV_PRO) ; 0-100 %
    RET=EKI_SetInt("myEkiConfig", "KRC/OV_Jog_Act", $OV_JOG) ; 0-100 %


    again, this is just an example. to find which variables you want to use, refer to system variable manual...


    btw. i would never insert those lines into SPS like that....


    i tend to keep all my code in SRC+DAT module. this also allows me to control scope of variables.

    for case like this i would simply use an Expert type module. run it as a regular program until debugging is done and it is confirmed that everything works as expected.


    then i would just add single line in SPS to call my SRC...

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • it works perfect. Only problem I have now is that after 30-40 seconds the connection is canceled. In my opinion because of buffer. Maybe I have to delete buffer after I have send to PC. But how can I delete the buffer?

  • Do you also have PLC in your system? I would say that, instead to make pretty complicated system. You can also make it via I/O interface:


    in sps program:


    IF($MODE_OP==#EX) and ($PRO_ACT) and (SpeedRequestHMI) THEN


    $OV_PRO = SpeedFromHMI (group input or analog input value)


    ENDIF

  • If you are only sending, you van do that indefinitely. Send buffer is populated by writing elements as shown earlier. Send buffer is cleared when message is sent.


    same goes for receiving. buffer is cleared by reading. but rate at which messages are received is obviously not something you can control and for that there are commands to check how many messages are queued and optionally clear them. this is covered in the manual.


    also check messages and logs. EKI will tell you if something is unexpected.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now