Jump to content

Automatic Code Generation


Recommended Posts

They try so hard to lock and password protect all those cool things they do until they decide they are ready.

Some things slip through the cracks. hehehehehehe :shifty:

C:\Program Files\National Instruments\MAX\Assistants\LVCGen\LV70\

Looks like someone forgot to protect the clusters :oops:

mxwScript_CleanUpWires.vi

mxwScript_ClusterConnector.vi <----MUST SEE!!!!

mxwScript_ClusterConnectorN.vi

mxwScript_CleanUpFrontPanel.vi

mxwScript_ClusterCopy.vi

MUAHHAHAHAHA

~,~ The Captain Was Here

Link to comment

The formatting on that email archive is hard to read. Here is the same info, reformatted.

Cheers,

-Jim

Properties and Methods

App:App.UnattendedMode: ..\National Instruments\LabVIEW 7.0\project\Source Code Control\_utils\SCC Revert safe.vi

VI:SetTag: ..\National Instruments\LabVIEW 7.0\vi.lib\express\express signal manip\ConvertfromDDTConfig.llb\subSetVIProperties.vi

Posible use: Create Express VI ?

VI:ConPane (The read version of it): ..\National Instruments\LabVIEW 7.0\vi.lib\express\express output\ExFileWriteConfig.llb\Configure Write LabVIEW Measurement File.vi

VERY usefull. I have made an utility using this property very similar to the call by reference but it is non blocking (using the conpane to pass data to the target VI)

VI:FP isdialog: ..\National Instruments\LabVIEW 7.0\examples\viserver\mltsetup.llb\Save Setups.vi

VI:Is Instance ?: ..\National Instruments\LabVIEW 7.0\vi.lib\express\express signal manip\TriggerBlock.llb\Ex_Inst_Trigger and Gate.vi

VI:Diagram: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwCopySrcVIContentsIntoDstVI.vi

The Building Block to access the Block Diagram

VI:Mods.User Changes: ..\National Instruments\LabVIEW 7.0\project\Source Code Control\_utils\SCC Save safe.vi

Ctl:Terminal.Owner: ..\National Instruments\LabVIEW 7.0\project\_NewProbeWizard.llb\MoveTermInsideStruct.vi

Very usefull to quickly get to the block diagram counterpart of a control

Ctl:Terminal.Position: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

Ctl:Terminal.Wire.Terms[]: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

Ctl:Move: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

Clust:Terminal: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

Pnl:Select All: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterCopy.vi

Pnl:Paste Selection: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterCopy.vi

Pnl:Copy Selection: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterCopy.vi

BDiag:Select All: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwCopySrcVIContentsIntoDstVI.vi

Bdiag:Copy Selection: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwCopySrcVIContentsIntoDstVI.vi

Diag:Paste Selection: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwCopySrcVIContentsIntoDstVI.vi

All these copy and paste utility are EXTREMELY usefull (I had wish for these for so long...)

SubVI:VI Ref: ..\National Instruments\LabVIEW 7.0\vi.lib\express\express signal manip\ConvertfromDDTConfig.llb\subUpdateConversionTitle.vi

ConPane:DiscTerm: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

Term:Name: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwConnectObjToLeadingSubVI.vi

Primitives

New VI Object: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

One of the most interesting primitive, open a whole new realm of possibilities

Open VI Object Reference: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterCopy.vi

Link to comment
  • 6 months later...
  • 1 month later...
We need to get some of these things into a bunch of subVIs, put them into a pallete with the Merge option on the menu and make up our own LAVA/OpenG Scripting pallete/toolset.

2907[/snapback]

This is a good idea. I know there are many out there that have done this already. Perhaps we can release an OpenG package with this stuff.

Link to comment
  • 2 months later...
Primitives

New VI Object: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterConnector.vi

One of the most interesting primitive, open a whole new realm of possibilities

Open VI Object Reference: ..\National Instruments\MAX\Assistants\LVCGen\LV70\mxwScript_ClusterCopy.vi

568[/snapback]

Jim - this topic is fascinating! I have a question - I'm trying to use the "Open VI Object Reference" primitive and can successfully get the references to "top-level" controls on another VI's front panel. If I wanted to access the controls within a cluster or on a tab control, though - how would I go about doing that? I am guessing there's some syntax for the "name/order" input, but...

Link to comment

Interestingly enough each page on a tab is similar to it's own front panel.

If you look at the properties for a tab control you'll see a property called Pages.

It is an array of references to the individual pages.

From there you can get to a property called CtlsOnPage.

That is how you dig down into the tab control.

:thumbup:

~,~ The Captain Was Here

post-208-1107989665.jpg?width=400

Link to comment
Interestingly enough each page on a tab is similar to it's own front panel.

If you look at the properties for a tab control you'll see a property called Pages.

It is an array of references to the individual pages.

From there you can get to a property called CtlsOnPage.

That is how you dig down into the tab control.

True - but I then have to iterate through all the refnums, looking for the one I want (while closing all the rest). This makes a block diagram where you're doing a lot of control/indicator manipulation pretty messy pretty fast. It would be really cool if I could access a specific control or indicator in one step, and I was hoping I might be able to with this primitive (it already gets me halfway there, since I don't need to iterate through all the refnums (and close all the unneeded ones) returned by the "Controls[]" property of the "Panel" object).

...so any idea what "name/order" means? Obviously, you can put a control/indicator name in there and get the reference - what's with the "order"?? I thought maybe you could put in a special syntax to specify the "order" of the control you're after, like "MyCluster/MyBoolean" or "MyCluster:MyNumeric" or something...

Thanks for your quick response on this, BTW. It's nice to talk to some real LabVIEW experts for a change instead on NI tech support.

Chris

Link to comment
  • 2 weeks later...

Join the conversation

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

Guest
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.