Jump to content

[DANGER!] Low-level editing of VI objects


Recommended Posts

I don't know if anyone else has thought of this, but you know that Heep Peek window? It's mainly used outside of NI for getting rid of insane objects, but another thing it tells you is the addresses of VI objects' data. How is this useful? Well, there's this program called Cheat Engine that lets you edit memory. It's designed for games, and that's what it's mainly used for, but it can also be used for this purpose.
 
OtJtx.png
 
Here's a screenshot of the Heap Peek window. See those green boxes I added? Those are the addresses in LabVIEW's memory for the objects. Now in Cheat Engine, you'd target LabVIEW.exe by selecting the computer icon in the upper-left corner, and selecting it from the list. The Memory View button will open a window showing a hex dump, and you can right-click that and select Goto Address to browse to one of these addresses. Now you'll see an editable hex dump of this object's data. The bottom of the Heap Peek window shows the order of the values, and it should be relatively simple to look for those values in the hex dump, but I don't know a surefire way to get the address of any item at the bottom. One thing I managed to do by editing the flags value of a Terminal object is make a constant with a terminal that acted as an input rather than an output. Connecting a control to it and running the VI gave me a broken run arrow, with an error saying LabVIEW needs more memory.

If you're wondering how to open the Heap Peek window, just add "LVdebugKeys=true" to the end of LabVIEW.ini. Then relaunch LabVIEW and press Ctrl+Shift+D, then Ctrl+Shift+H.

It should go without saying that editing these values is purely for exploration purposes, and should NOT be used in any production VIs. This is definitely not supported by NI, and neither they nor I take any responsibility for anything you may mess up by editing these values. Even more so than Generic VIs, SuperSecretPrivateSpecialStuff, XNodes, or any of that stuff. It is very possible to crash LabVIEW and/or corrupt VI's by editing these values.
 

Here's the VI I mentioned. It contains a numeric constant connected to an indicator with a broken wire. Changing the indicator to a control makes the wire no longer broken, and running it gives a memory error. Obviously dangerous in a production environment, and definitely not supported by NI, so be warned!

 

constant to indicator error.vi

Edited by flarn2006
Link to comment
<sarcasm>What could possibly go wrong with this?</sarcasm>

Exactly. This is purely for fun; it would be idiotic to use this in any important VIs.

Here's a tip for editing objects: copy something to the clipboard, and then select BDHP Clipboard or FPHP Clipboard on the left (for block diagram or front panel, respectively) and select the object on the right with an asterisk before its name.

Ehr6D.png

Edited by flarn2006
  • Like 1
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.