-
Posts
213 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Stobber
-
-
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.
- Event Waiting?
- Yes - Execute Event code
- 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.
- Event Waiting?
-
What do you mean by adding delay in the execution? I want to tie a PID controller into an event-based messaging framework so it can be configured by and report to other components.
-
Any good reasons to avoid it? I intend to set the Event Structure's timeout to 0.
-
DND isn't working with these snippets. Can anybody provide a VI (LV 2012 here) that calls the nodes?
-
Thanks, mje!
-
FYI to anyone else who digs up this thread: Bean's VIs don't work if you have "Show revision number in titlebar" enabled in your LV Options and you execute the code in the dev environment. This is because it uses "FP.Title" as the window title.
- 1
-
3 fat ladies on a see-saw
<spits coffee onto monitor>
-
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.
-
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!
- 1
-
Gotta run a Syslog server and provide a viewer. There are free/FOSS options out there, and we plan to fall back on Syslog if needed, but ETW and Event Viewer are built into Windows, which means we don't have to ship them ourselves.
-
Honestly, working with something totally custom is really unattractive in comparison to using standard tools that have been out in the public space for years (or decades, in the case of Syslog and log4j).
-
Reviving this topic. Anybody have a native interface, or something that exposes a network API for RT targets? I have a multilingual app and need to log events from all sources to a common file in Windows, so NI's tools aren't an option. (Stupid walled garden!)
-
Calling the SetCurrentDirectory() Windows API with a path you do not mind to be locked.
Uh...can anybody tell me how to set up a CLFN to do this? I've done very little work with calling DLLs from LV, and I can't figure out what type to map the BOOL return value to.
Edit: Never mind, I found <labview>examplesdlldata passingCall Native Code.llb
-
Thanks, Rolf.
LV doesn't support Win8 RT apps because of the sandboxing, and desktop apps still have full access to the winapi, so I suspect pipes work fine in Win8 LV applications.
-
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).
-
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.
-
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.
- 1
-
Why would you say that?!? I'm in Michigan!
lol I thought you were in Australia!
-
Makes sense when you say it that way, but there's nothing in the product that has led anyone (here) to believe it's possible. Looks like a golden opportunity for expanding documentation or making it more obvious that any VI's front panel can be added to a controls palette.
-
Staab Engineering will ship you a vacuum-sealed Texas BBQ brisket from La Barbecue.
http://www.yelp.com/biz/la-barbecue-austin
About $- value, depending on where I have to ship it. I hope crelf doesn't win!!!
- 2
-
Almost certainly yes.
-
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!
-
I need to create a custom "Decorations" palette. You can't drop a control file with only decorations on it, though. And you can't put a "merge VI" on a controls palette. Any ideas how this might be accomplished?
-
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.
Why TDMS?
in Database and File IO
Posted
Correct. Zahrah, I recommend using http://lavag.org/files/file/212-sqlite-labview/ instead.