LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional disable structure

Is this used for debugging? Can you suggest some examples?
0 Kudos
Message 1 of 22
(4,282 Views)
You can use it for debugging, sure.
We use it to create VIs that run on different targets and configurations. For example, we have a VI that can run both on a real-time system and on standard LabVIEW. The code has slight differences in initialization depending on the target. In this case we use the (predefined) TARGET_TYPE symbol to run the correct code.
We also defined our own disable symbol to run a VI in different configurations. For instance, we have a program that can run in simulation mode (using simulated data) or real DAQ mode. Most of the code is the same, just the DAQ part and some parameters to configure the simulated data are different. Switch the disable symbol and the same VI can be run or compiled for both purposes.

Daniel

0 Kudos
Message 2 of 22
(4,252 Views)

It can be used for debugging or to allow you to test portions of the code while still implementing portions of the code.

See attached example where you can run the coder while the code in the disable structure is not yet finished.

R

Message 3 of 22
(4,248 Views)
I can't open your code because I don't have LabVIEW here, but for debugging or testing I rather use the diagram disable structure, not the conditional disable structure. As mentioned in my post above, the conditional disable structure can be quite powerful (can for instance avoid duplication of VIs).

Daniel

0 Kudos
Message 4 of 22
(4,244 Views)
Hi joe,
            Can you post the code for lv 8.0?
0 Kudos
Message 5 of 22
(4,230 Views)

@JoeLabview

I think muks asked about Conditional Disable structure, not the "Diagram disable structure", like your example.

I never used the conditional disable but I think it's used at project level in this way:
1) you can define some "parameters" in the project property windows.
2) place the structure and add conditions: you will see the new paramenters.

The use is at project level, so you can have 1 VI but 2 different project (not only difference with the default paramenters CPU, OS, TARGET_TYPE, but also other custom paramenters defined like "_standaloneBuild", one project set it to TRUE, and another project set it to FALSE, so you get the point.

0 Kudos
Message 6 of 22
(4,216 Views)
Thanx slyfer but still can you point me to an example?
0 Kudos
Message 7 of 22
(4,207 Views)
Hi muks,
did you use the example finder? You can search for "conditional disable structure".
Mike
0 Kudos
Message 8 of 22
(4,202 Views)


Slyfer wrote:

@JoeLabview

I think muks asked about Conditional Disable structure, not the "Diagram disable structure", like your example.



Oops ...  you're right.. 😮
 
Been reading too many posts lately  (best excuse I could come up with this early in the morning)  😉
 
0 Kudos
Message 9 of 22
(4,182 Views)
No problem joe.You can still post that code for 8.0 please
0 Kudos
Message 10 of 22
(4,175 Views)