Jump to content

Stobber

Members
  • Posts

    213
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Stobber

  1. GoGators wrote:

     

    So you want to have a deterministic loop doing PID, but you want also be able to send commands to it (like setpoint) I assume.  I haven't used execution trace to look at it, but using an event structure is going to make it jittery (don't know by how much).  Personally I have used RT FIFO of type U8 array with the array size fixed to the largest datatype.  The Create RT FIFO has an input where you set the array size.  This will decrease any chance of buffer allocations.  Also I would use the Timed sequence structure.  It puts the loop in a priority thread, but has less overhead than the timed while loop (10% < CPU).

    I normally use subroutine FGVs to pass data into and out of a PID control loop, but I want to tie in a "Stop" command from an event-based messaging framework I use. What I needed to hear from someone at NI is that using events introduces jitter, so thanks for that. I'll test the loop on hardware, and if the jitter affects the determinism, I'll write a translator that turns events into RT FIFO elements or uses them to control an FGV that enumerates expected messages.

     

    gleichman wrote:

    If you have a timed loop with an event structure set to 0 seconds then it will execute as follows.

    1. Event Waiting?
      • Yes - Execute Event code

    [*]Wait for (elapsed time - timed loop time)

    If you use a while loop with the event stucture it executes the same as above without step 2, so you are adding overhead and increasing the time to react to event by using a timed loop. This would only make sense if you want your PID to not operate faster than a specific frequency.

    GoGators inferred my use case correctly. A PID controller doesn't need to be fast; it needs to be consistent. Maintaining determinism in the PID algorithm is more important than responsing to messages quickly.

  2. ned, I've studied the math formally. While useful for understanding, it's largely worthless without a model of the plant, and what I'm looking for is advice on how to tune without models. ShaunR's link is good at putting all the parameters into this context once you're familiar with the math and the lingo. Yes, it focuses on temperature control...it'd be nice to find something analagous for servomotor control.

  3. Even after thre semesters of controls study in my BSEE program and multiple projects with manually tuned PID systems, I still feel like it's something of a black art. I've met oldschool engineers at my clients' offices with a preternatural talent for tuning PIDs, but when I asked them what their approach was, they couldn't really describe it. Just "intuition".

     

    What's your favorite book, tutorial, or other resource on tuning PIDs by hand? I've read all the Wikipedia articles and free online tutorials presented by college undrgrads or companies with a product to sell. I'm looking for the real deal here, the authentic guide to tuning mastery!

    • Like 1
  4. James, I already sent him an email after another NI employee emailed me in response to this post. If he shares with me, I'll share with y'all.

     

    Edit: In response to your question, I have no idea about the performance of Named Pipes relative to UDP or some other packetized protocol, but I suspect they do some heavy optimization. I'm interested in the Anonymous Pipe, which doesn't go through the network adapter. It's insanely fast (in both latency and throughput).

  5. Rolf, do you still have that library around? Have you updated it at all? Is it still available to the public? I need to use an anonymous pipe in a very high-throughput Windows application that will span multiple EXEs.

  6. Special thank you to Jon at JGCode in Australia for sponsoring this gift even though he is unable to come to NIWeek this year. It's very generous, and we're glad to have him a part of the LabVIEW community.

     

    He should get a raffle ticket.

    • Like 1
  7. Simon Hogg at NI figured it out: Put the decoration on a .vi and add that file to the control palette. You'll have to change the file browse dialog's filter from (.ctl, .xctl) to "all files" so you can select the .vi. It gets added to the palette and drops its decoration onto a new front panel just fine. We could think of it as a "merge VI" for front panel contents!

  8. If I bind a timestamp to an INSERT statement as text, it gets converted internally (by your API or by the db) to UTC.

    I see where your API formats the timestamp to a UTC string in the "Bind" VI, and I see where it parses a UTC string back into a timestamp in the "Column" VI. That should work. I'm going to test my code again and make sure it's not a logic error on my part. If I don't post back, disregard this bug report. ;)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.