infinitenothing
-
Posts
367 -
Joined
-
Last visited
-
Days Won
15
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by infinitenothing
-
-
I checked that VI and removing the type cast does not change it to a floating point because one of the other cases sets the index to a typed integer.
-
I wonder if that's an old school "always copy". Maybe a copy paste from other code where there wasn't a type specified in any of the cases?
-
If you use a 0 wait notifier it takes just as long. I was cheating when I used the notifier status function which is much faster. I think this is common to all the functions where it might wait for a message and timeout. I wonder if that's similar to a 0 ms elapsed time where it does allow the processor to sleep a little.
-
Most of the slowness is the occurrence (50us by itself)
- 1
-
-
15 hours ago, smithd said:
I don't know how much this got optimized before 2016, but if you look here at the 'what goes on behind the scenes' section:
https://decibel.ni.com/content/docs/DOC-41918
"the channel wire is replaced by a static VI reference to a clone VI that both writers and readers share....Some of the implementations use the core VI for their entire implementation. Take a look at the Pipe template for an example of one of these."
Unless anything has changed in the last few years, VI reference calls are obscenely slow. If you've ever poked around the "why is lvoop so slow" threads, the answer is "lvoop isn't slow........its just the technology they're using" (which is VI ref calls).
Other thoughts:
-Re the global, they are fast but I don't think they're that fast...60x faster than a dvr accessed by a single thread seems awfully high.
-You missed RT FIFOs in your benchmark, should be on par with queues.
-As mentioned in the link, channels have other more performant implementations
-There is a use case for out-of-band stops, but its generally better to use in-band (user event for an event loop, a 'stop' message for queued message handlers). One nice thing channels do is they have an inline stop bit, so consumers can be told "this is my last bit of data, you can stop after you're done processing it".A large part of the slowness in the pipe might be the occurrence. Just checking an occurrence for 0 ms takes 50us.
If backing this into 2015 would be useful I can probably do that.
I skipped RT FIFOs because I couldn't see a way to use them as a global (Preview Queue)
The high speed stream is more akin to queues than a tag or a global and I got an error 1055 when I tried to create it in RT
Many of my loops in RT are something like "grab data, send data, wait, repeat until something catastrophic happens and then cleanup." There really isn't any "in band" communication to tag onto.
-
-
I was considering migrating to tag channels as a stop signal and wanted to do a performance test. I'm targeting an SB9627. I've attached the bench marking code below.
Results:
DVR:8.3us
Global: 4.1us
Notifier: 7.9us
Pipe: 90us
Queue: 7.7us
I'd say all the reference based methods are about the same. The global is the fastest but there's potential reuse issues. The pipe is significantly slower.
-
In my example I was trying to show that the for loop (which could be made a subVI) took a long time but the individual iterations of the for loop were relatively fast. I was more curious about what other people have done because I almost never use the queue status VI.
The "abort" option does sound clunky. There wouldn't be a way for the SubVI to perform post cleanup operations
-
-
-
I use RT a lot and actually haven't run into this much. Most of the time the only thing I share between the RT and Main are the control type defs and normally, when it blocks me from editing, I like that reminder. I just stop my RT code. A stop button is about the only thing I have on the top level front panel out there. I almost never edit things in libraries on the RT side. I was probably trained out of it. The RT code is usually fairly light and doesn't do fancy stuff for performance reasons. It's somewhat old school programming. On the Windows side I'm less concerned about memory so I'll let my data types get heavier and I'm more willing to create new threads.
-
Ask the developer for the source code
- 1
-
IMHO, we've talked about it before and this is the annoying part of the license:
QuoteIf you deliver binaries exclusively you can for instance save the license text file together with your other material rights documents, or you could paste the license text into the small-print section of your user guide.
We talked about making a tool that would collect all the providers but it seems unnecessary for compiled code. In some cases, maybe its undesirable to let others know what your tool chain is.
-
What if the client computers pushed the files onto the top level computer rather than having the top level pull? That's a similar concept to a database but not quite as well organized.
Like I said, it's really easy to move from a sequential for loop to a parallel for loop. I'd experiment with both. The Async is what lets "other things" happen.
-
Sounds like you're going to want to launch the background VIs with Start Asynchronous Call. You might not want to launch 10. Maybe just loop through the 10 computers in a for loop. This is especially true if your top level computer is using a magnetic disk drive. You could try and switch the for loop to a parallel for loop later. I'm not sure what your file goals are, it's sort of an unusual use case and maybe setting up some sort of server on the top level computer possibly a database might be the way to go. You're probably going to want to go through the folders recursively unless it's a flat folder. Maybe you can look at timestamps to see what's modified.
-
I don't think your for loop will work because it's in a SCTL and it has the FIFO in there. You have to give up one of those. That is, put the for loop in a normal loop (pass data between the loops using a local) or remove the for loop and keep an index on a shift register in your SCTL. Also, your select function does nothing, you can just delete it and wire the boolean through.
I'm not sure how that API implements write-read. I think you just need to enter your byte array sequence that specifies the register in the write array and set the read Boolean to false. If you have trouble, maybe ask the authors of the API.
The shared variable is written so if the loop exits because of an error, the other loops are notified and stop.
FYI, there's an specific forum for embedded questions you can use.
-
The secret is that the incoming error is always the same as the outgoing error. Grab it where it's more convenient but you don't need both. If you need the warning, and I never do, you can merge it at the top on your rightmost merge.
-
what about for cRIO or PXI?
- Use a second Ethernet port on the host for the CRIO.
- Password protect the RIO.
- Shut off features I don't use.
-
Keep Windows up to date
Install antivirus
Windows is logged in as normal user, not admin
Firewall off everything you don't need
Use a VPN to get into local networks
If I had to expose a service I'd use HTTPS
-
It's been a while since I've used Vision but I remember seeing some weird things with the higher bit depth images. I remember that sometimes you had to explicitly set the bit depth of the image:
http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_image_bit_depth/
What pixel values are in your image? Could they just be really low? I'm guessing the gradient or rainbow pallets aren't helping
- 1
-
You're not really an end user if the executable is being used by someone else. You're more like a middle user
Can I suggest using a license that doesn't follow the binary, maybe Apache or MIT, for future work.
-
Anyone tired of their myrio and looking to unload it? $1000 seems a little steep.
-
I'm not sure I've ever seen a port freeze on my dev computer but I know I've heard of freezes in the field. I tell them to call IT.
The only timing issue I've had is with flush and what happened was that flush was clearing data from a prior visa write..
Are you using NI serial ports? I'm guessing that's going to be more reliable or at least give you a better outlet for troubleshooting.
I open the port at the beginning and close at the end. That's never been a problem. I use both sync and async read/writes.
Interviewing for a LabVIEW developer position, how should I prepare?
in LabVIEW General
Posted · Edited by infinitenothing
Slightly related to an earlier thread:
What are the different ways you can provide a stop signal to a loop and what are the advantages and disadvantages to each way.