01-26-2018 04:29 AM
01-26-2018 05:06 AM
wiebe@CARYA wrote:
It always get's a bit ugly though.
You could autoindex the error out and then use Merge Error after the loop with the previous error and the error array. No need for the shift register then. I am not going to claim anything about performance in either case.
In most of my cases, I don't want anything to run inside of the loop if any of the iterations has an error, so I will use the shift register to cover the empty array issue and then the termination terminal to stop the FOR loop if one of the iterations has an error.
01-26-2018 05:47 AM
While or error
Do that Nice Tim
01-26-2018 06:01 AM
@sebster wrote:
So what is the solution here then?
On the one hand you would want the error to move through each iteration of the for loop, but on the other hand a zero-sized array wouldn't carry the error from one side to the other.
Oh, you are on the Breakpoint..... no solutions here.
Just really good information
Put the error chain on a shift register and | Or * leave the loop on error
*1I could not find"/" on my NOT as smart as me phone
01-26-2018 06:42 AM
For critical code, how about wrapping in a case structure, selector wired to error in, and operating on a branch of the reference? In this case the reference is immutable, so no harm, no foul.
Obviously, you can customise the For Loop depending on your error handling requirements:
- Conditional stop on error
- Input tunnel to allow all operations to complete
- SR on error tunnel to halt operations on error
- Auto-indexing output tunnel and merge error to catch errors
01-26-2018 06:43 AM
@crossrulz wrote:
wiebe@CARYA wrote:
It always get's a bit ugly though.
You could autoindex the error out and then use Merge Error after the loop with the previous error and the error array. No need for the shift register then. I am not going to claim anything about performance in either case.
Yes, but building large arrays of error clusters is heavy on CPU and memory.
The shift register is only heavy on the CPU.
01-26-2018 07:22 AM
@thoult wrote:
For critical code, how about wrapping in a case structure, selector wired to error in, and operating on a branch of the reference? In this case the reference is immutable, so no harm, no foul.
Obviously, you can customise the For Loop depending on your error handling requirements:
- Conditional stop on error
- Input tunnel to allow all operations to complete
- SR on error tunnel to halt operations on error
- Auto-indexing output tunnel and merge error to catch errors
But when the first iteration returns an error, subsequent iterations are skipped.
A case around everything is useful, but it's a different use case.
01-26-2018 07:36 AM
Literally a different use case 🙂
As for the skipping, that was the point about making the input tunnel just a plain tunnel, rather than SRed.
01-31-2018 03:57 AM
Today is a special edition, this time an official (non NI) driver for Horiba CCDs:
Well, it is less funny when I have to rewrite the whole driver (or at least functions we need) for our Horiba CCD. Actually I also requested the LV driver from their website, but I think more or the less what I got is the same what is available under the above link. Nice or not nice, I could not stop myself giving feedback to the company by email. I advised them to hire an NI alliance partner to develop a proper LabVIEW driver. This recent one is just a joke! Actually due to some improper initialization steps, it even could not establish connection with the CCD 🙂 I guess an intern/student made it? Or someone who even do not know about clusters. But the whole driver is an endless source of RG code 🙂
01-31-2018 04:10 AM
@Blokk wrote:
I guess an intern/student made it?
That is the norm for drivers...