Jump to content

Diagram Disable Structure


Recommended Posts

Has anyone played around with the "Diagram Disable Structure"? You can create this struct using the New VI Object primitive. Create it in a target vi (vi cannot be running to create), then copy it to your application. You can 'comment out' code, or add several flavours of a code snippet, and disable all but one version of it. Is this the same as the 'conditional disable struct' in the sense that it is only supported on the PDA version?

post-365-1097846399.gif?width=400

Link to comment
  • 3 weeks later...
Has anyone played around with the "Diagram Disable Structure"?  You can create this struct

They look like two separate multiframe structures to me. I had created them awhile back (under 7.0) and they appeared to work correctly, though context-clicking on them back then was a bit dicey (the editor would sometimes crash). The 'Conditional Disable', at least under 7.1, allows selections of Windows, FPGA, PalmOS, RT Engine, Mac, Unix, and PocketPC. The 'Diagram Disable' allows multiple 'Disabled' subdiagrams, and no more than one 'Enabled' subdiagram.

The 'acid test' for me was sending a VI to Scott Hannahs (the handy LV-on-a-Mac test subject) that did some WinAPI DLL calls in the Windows case, and returned a timestamp through the case border. For the Mac and Default cases, I just wired a constant timestamp (they were grayed out on my Windows machine). Scott reported that his LV editor did try to search for the DLL file when he loaded the VI, but when it gave up, the VI wasn't broken.

They certainly APPEAR ready for prime time... Just gotta 'Wait for Eight' .

Best regards,

Dave

Link to comment
  • 3 months later...
They look like two separate multiframe structures to me.  I had created them awhile back (under 7.0) and they appeared to work correctly, though context-clicking on them back then was a bit dicey (the editor would sometimes crash).  The 'Conditional Disable', at least under 7.1, allows selections of Windows, FPGA, PalmOS, RT Engine, Mac, Unix, and PocketPC.  The 'Diagram Disable' allows multiple 'Disabled' subdiagrams, and no more than one 'Enabled' subdiagram.

The 'acid test' for me was sending a VI to Scott Hannahs (the handy LV-on-a-Mac test subject) that did some WinAPI DLL calls in the Windows case, and returned a timestamp through the case border.  For the Mac and Default cases, I just wired a constant timestamp (they were grayed out on my Windows machine).  Scott reported that his LV editor did try to search for the DLL file when he loaded the VI, but when it gave up, the VI wasn't broken.

They certainly APPEAR ready for prime time...  Just gotta 'Wait for Eight' .

Best regards,

Dave

2562[/snapback]

I think they need a little more fine tuning, at least if NI doesn't drop a few platforms before 8.0. For instance Unix alone is a little bit a broad selector. Not everything which might work on Linux might be portable to Solaris, for one example. And the attempt to load the DLL on a Mac and similar issues should also be eliminated.

Rolf Kalbermatter

Link to comment
  • 2 months later...
Has anyone played around with the "Diagram Disable Structure"?  You can create this struct using the New VI Object primitive.  Create it in a target vi (vi cannot be running to create), then copy it to your application.  You can 'comment out' code, or add several flavours of a code snippet, and disable all but one version of it.  Is this the same as the 'conditional disable struct' in the sense that it is only supported on the PDA version?

post-365-1097846399.gif?width=400

2349[/snapback]

James

I am having difficulty creating this structure in a target vi , could you just run through the correct steps again. On my installation the target vi crashes the editor when opened !

Regards

Chris

Link to comment
Has anyone played around with the "Diagram Disable Structure"? 

2349[/snapback]

I use this all the time for commenting out code that I don't want compiled... I use it in a VI that I drop onto the block diagram from the BD palette (which merges it)... see post here:

http://forums.lavausergroup.org/index.php?showtopic=356&hl=

As mentioned, the only caveat is that it is not a released feature for LabVIEW (probably because it doesn't work quite as expected sometimes). The unexpected behavior to watch out for is when you have broken code in a subVI where the subVI is inside the disabled structure. The broken subVI will break your app with no errors showing up when you go to run your app (doh!). Otherwise, as long as the code is broken and in the disabled structure, but not inside a subVI in the disabled structure, it works great.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.