-
Posts
4,897 -
Joined
-
Days Won
297
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by ShaunR
-
-
3 hours ago, Rolf Kalbermatter said:
I have so far not found a way that makes those paths automatically fixup at package creation, since the path seems to need to be absolute
This is why it takes me hours to make an ECL build that works and is one of the many reasons only Windows is now supported (can load from same dir). Even then. I have to fight VIPM to get things in the right places.
I refuse to do #2.
-
Well. There's a few problems but the reason it's not showing the next image is because you increment the counter during acquisition until it's 300 and when you start the next acquisition it indexes into the path array at 300 (which yields Not A Path).
You've confused your 30 second timer with the file index. Make a proper timer with a time function and increment the index on stop.
-
17 hours ago, Jordan Kuehn said:
Not to derail the above conversation, but can this ping function reliably time out in Windows sub 1s?
Yes but you'd need to define "reliably". I think there would be few milliseconds of jitter and probably a minimum of about 4ms.
- 1
-
There are surprising few situations where a parallel for loop (pLoop) is the solution. There are so many caveats and foot-shooting opportunities even if you ignore the caveats imposed by the IDE dialogue.
For example. For the pLoop to operate as you would imagine, Vi's that are called must be reentrant (and preferably preallocated clones). If a called VI is not reentrant then the loop will wait until it finishes before calling it in another parallel loop (that's just how dataflow works). If a called VI is set to reentrant shared clones then you get the same problems as with any shared clone that has memory but multiplied by the number of loop iterations.
Another that you often come across with shared, connectionless resources (say, raw sockets) is that you cannot guarantee the order that the underlying resource is accessed in. If it is, say, a byte stream then you would have to add extra information in order to reconstruct the stream which may or may not be possible. I have actual experience of this and it is why the ECL Ping functionality cannot be called in a pLoop.
-
I'm a simple programmer.
Catch them all where possible (try { /* */ } catch (...)) and pass errors back as a return value.
That's my tuppence.
-
23 hours ago, jhoskins said:
Nice VI by the way, mind sharing
It's the example from MDI Toolkit for LabVIEW
-
16 hours ago, Jim Kring said:
Here's a new take
Here's slightly different take on that idea
>> LabVIEW Idea: Enumerated Variant <<It works with, but is not limited to, classes. It's inspired by languages like Rust (enums) and Zig (tagged unions)
If you put a Call By Reference Node in the case you've reinvented Dynamic Dispatch with extra steps.
-
1 hour ago, Rolf Kalbermatter said:
With a little extra effort in the Base Class implementation for a proper factory pattern implementation,
Booh with bells on. Hello 7 hr build time.
-
41 minutes ago, Rolf Kalbermatter said:
I may revisit my earlier attempts of writing a fully LabVIEW OOP based solution for this
Booooh!
-
1 hour ago, Rolf Kalbermatter said:
You really may be stressing LabVIEW's window management capabilities beyond reasonable borders with so many subpanels present at the same time
Agreed. Even just 100 and UI updates become a bit flakey.
-
8 hours ago, fabric said:
I've enjoyed this hack for many years, but noticed it is not working in LV2023Q1.
See here for problem description: https://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-05-10-2010/m-p/4360614/highlight/true#M1280554
They have fixed a bug, is my guess. Concatenating by using null char is a huge security smell.
Multiple file types are [supposed to be] defined by using the semicolon separator. Does "*csv;*txt" not work?
-
10 hours ago, JKSH said:
What communication protocol(s) does your digital X-ray plate use to receive commands and transmit images?
It's probably DICOM which is partially supported in the Biomedical Toolkit.
-
On 3/9/2024 at 10:36 PM, Mahbod Morshedi said:
I was just wondering about the "array with tag" or "Var attribute" since there is not much information about the latter. I am unsure if the data is more susceptible to corruption, gets lost, or if there are other complications I do not know about.
The variant attribute cannot have duplicates. If you set it, it overwrites the previous values. With the "array with tag" you can have duplicates.
- 1
-
Try
print(json.dumps(convert['test'], ensure_ascii=False))
-
1 hour ago, David Boyd said:
I hope you corrected the reentrancy settings for the two malleables in the library when you backsaved to 2021.
Nope. I just provided the back-save of your submission.
-
- 1
-
7 hours ago, David Boyd said:
are you thinking that "shared" (vs. "preallocated")
Yes. that's exactly what I am thinking (but poorly communicated). This is a common known gotcha for VI's with shift register memories (not the first call primitive per say).
It will probably only bite you when you have multiple instances and where it's being used with different CRC types with different integer lengths.
Here's an example:
sub VI set to Preallocated (what we expect-11 more than the intialise value)
sub VI set to Shared:
If you run continuously, you will see other values as different threads become available at different times.
-
Nice.
This is probably one of the only times (1 in 1,000,000) I would suggest an xnode may be preferable-and specifically for the lookup tables which should always be more performant.
With an xnode, one can pre-calculate the tables at design time based on the type and save the cost of generating the table at first run run. This will also mean that the calculation will be constant time whether first called or later. xnodes are tricky and complicated beasts so I could understand not wanting to go down this hairy rabbit hole littered with rusty nails.
Speaking of the table generation; I noticed you have the VI set to reentrant clones. I think this will be a problem when you run multiple instances as the shift registers may not contain the values you expect per instance.
-
19 hours ago, hooovahh said:
Oh but I did look up the 2023 roadmap, and unicode support was changed to "Future Development".
My takeaway from the roadmap is that they are concentrating on interoperability and relegating products to backend services. This was the direction NI were taking before Emerson but expect it's taken on a new impetus since the takeover. I expect the awful gRPC to be leading the charge so they can plug the NI products to their products. Unicode support isn't a consideration for that since the UI will be elsewhere.
-
The ini (or config file as NI calls them) are only written when the reference is closed.
You could put the flush in there but I don't think that's your problem.
I have seen this before and it is usually on a failing hard drive or one that is about to fail. NTFS has a sort of self healing which is insidious for small files (less than the cluster size) and this is the usual result of it "healing". Larger corruptions are more detectable with chkdsk.
QuoteNTFS continuously monitors and corrects transient corruption issues in the background without taking the volume offline. This feature is known as self-healing NTFS, which was introduced in Windows Server 2008.
(source)
I would take a look at the S.M.A.R.T (Self-Monitoring, Analysis, and Reporting Technology) information of your disk and pay particular attention to the write failures/errors.
-
17 hours ago, dcoons said:
also a coworker pointed out those scroll bars are likely in the same boat 😭😭
..and splitters.
It's these sorts of issues that are the reason some of us abandoned the LabVIEW UI altogether.
-
There is an "Element" property for arrays. You can get that then cast it to the element type. Then your other methods should work (recursion).
-
6 hours ago, JKSH said:
(Not to downplay the importance of standardization, but rather highlighting that it's hard. And as @VDB said the old ones will hang around for a lifetime)To be fair. Those that VDB suggested aren't really protocols, they are middleware. One is based on OPC, the other is a translation service into an API. SILA is interesting in that it's basically what CoAPs does so I think your cartoon would definitely apply there
Personally. I think they should just make all devices SCPI compliant and be done with it
-
- Popular Post
- Popular Post
On 12/9/2023 at 10:21 PM, Jack Parmer said:In particular, we're looking for feedback on how this early version of Flojoy compares to LabVIEW and TestStand
Test Stand is a test sequencer so what you have now isn't even in the same paradigm.
In terms of LabVIEW, you have some limited block functionality that could be compared to Express VI's (which we don't use). From what I can tell, It seems to be the Python version of Node Red (Javascript). It has a place but people are very quickly going to be dropped into text coding for anything more than hobbyist applications. Many people on this forum (not me) are also adept Python Developers already and I expect they will weigh in sooner or later.
If you are going to target the LabVIEW community, I would suggest you work on your videos. From what I can tell, they are pretty much:
- Plug in some wires
- Magic happens
- Trust me bro, the pretty pictures are because of the magic".
- 4
Optimization of reshape 1d array to 4 2d arrays function
in LabVIEW General
Posted · Edited by ShaunR
Post the VI's rather than snippets (snippets don't work on Lavag.org) along with example data. It's also helpful if you have standard benchmarks that we can plug our implementation into (sequence structure with frames and getmillisecs) so we can compare and contrast.
e.g