Ethernet KRL - Continuous transmission to server

  • Not a solution, but:

    1. Read up about subprograms and functions.

    2. Read about submit interpreter (sps.sub). That's where I would put the "Send coordinates through Ethernet KRL" part of a program.

  • so what is it that you need?


    what do you mean by two pulse vectors? quadrature signal (dual channel)? or something else?


    12ms is extremely accurate ... if the speed is sufficiently low.... and for a student project , it is the principle that matters so you can choose speed sufficiently low.


    you can replace the GOTO with endless loop, it would do the same thing and without GOTO.


    if you want to put everything into one program without use of subs, FOILDs can be used to organize code and maintain overview.

    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

  • If you want to send current robot position while the robot is moving, you will need to use two separate "threads". Hence the submit interpreter suggestion.

    If the robot can just send it's position at the end of the movement, then it's just a function to send data, an array of movements and a for cycle.

    Another option would include RSI module, but it's quite pricey.

  • So, you want to produce data from the robot that emulates the quadrature signals of a linear encoder?


    Your root problem here is that the robot's internal clock only operates on a 12ms update rate (4ms in special cases with RSI, in IPO_FAST mode). So even if you could transmit data faster than once every 12ms, $POS_ACT_MES only updates every 12ms.


    Your current code only "works" b/c you're essentially "cheating" with the Advance Run Pointer. A better solution would be to put the data transmission into the SPS, and build the SPS loop so it avoids any pauses or branches, and use TRIGGER commands in your motion program to enable/disable the SPS transmission.


    Alternatively... in your motion program, create an Interrupt linked to a $TIMER_FLAG. Put your EKI_SEND into the Interrupt Service Routine, and have the ISR reset the $TIMER to -12ms each time it's called.

  • No offense but... Topic already got TEN responses and... still no clue what exactly you need help with. Would you please try to get to the point and - be specific?


    Q: so what is it that you need?

    A: I need to simulate ..., but this is not my problem right now,this function ...., but it is not my problem right now. quadrature... not a problem.



    Instead of telling what is "NOT the problem", try to narrow down your any and all of your issues to ONE specific and most important thing... What is the single issue that would ultimately help your project move forward? how what you have done with it, what do you want and tell how it does not meet your expectations. that is it.


    and before you respond, please lookup GIGO principle and read pinned topic READ FIRST. it is supposed to tell YOU how to ask for help.


    for example "my interrupt code does not work. it is exactly the same code as before" is not going anywhere. your code in original post has not a single INTERRUPT command. are we supposed to imagine what your code may look like now?

    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

Advertising from our partners