Announcement

Collapse
No announcement yet.

Adding all devices to Typedef increases Teleop by 100 ms per iteration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding all devices to Typedef increases Teleop by 100 ms per iteration

    I have been testing devices and pieces of code separately. I combined most things and added all of our devices to the RobotData.ctl. My response time is terrible. On the order of 150-250 ms per iteration of Teleop. That is without the camera running.

    I started looking at timing. I build unmodified Basic and Advanced Frameworks. I put in a four stage feedback node to measure the time difference between executions of Teleop, averaged the execution times and plotted the times on a strip chart.

    If my measurement technique is correct, in Basic I get an iteration of Teleop every 20 ms. In Advanced, I get an iteration ever 45 ms.

    I replaced RobotData.ctl in the Advanced Framework with the one that I had created for my full program and made no other changes to the program. I get an iteration every 140ms. A hundred ms just to have the data available. I suspect that the problem is putting the large typedef into the shift register. It looks like I need to split things up and not put everything into the shift register.

    I'd post pictures, but the school network has all photo sites blocked. Graphs of the three modes of operation, the code, and both versions of the .ctl file are included in the attached file.

    I'd appreciate any advice in how to split up the typedef. What needs to recirculate and what doesn't?
    Thanks
    Attached Files

  • #2
    Re: Adding all devices to Typedef increases Teleop by 100 ms per iteration

    I suspect that these timings are off. If you leave panels open, they have a large effect on the execution timings. I don't have a cRIO to do timings on, but I doubt that the advanced is slower or that adding ten relative small clusters would ad that 100ms of overhead.

    Check again with all windows closed except for the top one. I doubt that you need to separate anything out.

    Greg McKaskle

    Comment


    • #3
      Re: Adding all devices to Typedef increases Teleop by 100 ms per iteration

      Originally posted by Greg McKaskle View Post
      Check again with all windows closed except for the top one. I doubt that you need to separate anything out.Greg McKaskle
      I moved the timing and strip chart into "teleop enabled" case in Robot Main and closed teleop. The timings are in the 20 ms range - as you predicted. When I opened Teleop, the times returned to the 160+ range.

      I didn't realize that open panels on the laptop created that much overhead in the cRIO. I'll be very careful in the future.

      Thanks for the quick response. I had myself in full panic mode when I was getting 4 updates per second on the joysticks.

      Comment

      Working...
      X