From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-18-2018 11:29 AM
I'm creating a LabVIEW wrapper for a C Library. Each VI basically contains one CLFN which is configured to call a specific function of the library. What is the recommend method for wiring error in and error out terminals to the CLFN?
According to the documentation for CLFN is seems that wiring directly to the error in and error out terminal should be sufficient. "Error I/O operates uniquely in this function, which will not execute if an error enters the node. " [CLFN Help] If I understand that correctly it means the CLFN won't call the C function is an error is passed in. What makes me unsure is that the VI Analyzer complains when I use this wire styling.
When I change the wiring style to use a error case structure the error in VI analyzer goes away.
So should VI analyzer be ignored and I wire directly to the CLFN or should I wire to and use a error case structure?
Solved! Go to Solution.
01-18-2018 12:10 PM
@schddc wrote:
I'm creating a LabVIEW wrapper for a C Library. Each VI basically contains one CLFN which is configured to call a specific function of the library. What is the recommend method for wiring error in and error out terminals to the CLFN?
According to the documentation for CLFN is seems that wiring directly to the error in and error out terminal should be sufficient. "Error I/O operates uniquely in this function, which will not execute if an error enters the node. " [CLFN Help] If I understand that correctly it means the CLFN won't call the C function is an error is passed in. What makes me unsure is that the VI Analyzer complains when I use this wire styling.
When I change the wiring style to use a error case structure the error in VI analyzer goes away.
So should VI analyzer be ignored and I wire directly to the CLFN or should I wire to and use a error case structure?
LabVIEW best practices says, "use the case structure". That being said, it probably doesn't make a difference. And that's where the issue lies. You don't want "probably". You want "for sure". By using the case structure, you can be sure that that code won't be executed if there was an error previous to the running of that code.
01-18-2018 12:46 PM
"An End to Brainless LabVIEW Programming by Darren Nattinger"
– Darren covers 8 things that LabVIEW programmers frequently do without thinking and proposes that these things are often wrong.
Look at his #1 point
"All VIs need error case staructures"
time 4:17
01-22-2018 02:24 PM
Just to add what others have said. The VI Analyzer has some code that can be used to help ignore individual tests. It has a performance hit, and each test (at the moment) needs to be modified to support the ignore.
My point is that in our reuse library I can plop down a #VIA_Ignore Error Style and that VI will not fail that test. It is handy for putting down these things to ignore those results, for VIs that have been reviewed, and are expected to fail that test.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord