LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting formula from Labview

New to LabView, a previous employee created a vi, i'm able to access the block diagram page, there is a formula somewhere that needs edited, is there a formula page or conversion page where calculations are performed?

TIA

0 Kudos
Message 1 of 10
(1,185 Views)

Are you planning to learn enough LabVIEW to do this yourself?  Are there other employees who know LabVIEW and can take responsibility for the changes?

 

Messing around with someone else's code (particularly if it is in a programming Language that you don't know) can prove to be a disaster.  If you attach the VI here, and also tell us the "old" and the "new" Formula (are all the inputs and outputs the same, just the computation and possibly some constants or operations have changed?), then one (or more) of us may take a crack at it (I'm 99.44% certain we can find the expertise), but you might get some comments on the code, itself, having nothing to do with the formula.

 

Note that you need to attach the actual LabVIEW routine (it will be a file with the extension ".vi").  The formula you can send however it is convenient for you, as long as we can read/understand it.

 

Bob Schor

0 Kudos
Message 2 of 10
(1,178 Views)

Bob,

Thanks for the reply, I've done some C++, Delphi, and LabJacks DAQ Factory editing, that's why this got dumped on me. No one I know has any LabView experience.

I don't have permission to share the vi due to security, I  expected to find a Calculations, Conversions, or Formula page, guess that not the case.

Is there a page where variables are located and assigned?

0 Kudos
Message 3 of 10
(1,171 Views)

Maybe the better question is, where do I find the code?

0 Kudos
Message 4 of 10
(1,140 Views)

https://forums.ni.com/t5/Multifunction-DAQ/How-can-I-get-the-souce-code-of-a-labview-vi/td-p/184996#....

This explained the source code is the block diagram, so within the block diagram where do formulas reside?

0 Kudos
Message 5 of 10
(1,127 Views)

@johnesch wrote:

Maybe the better question is, where do I find the code?


You said in the first post that you can access the block diagram. LabVIEW is a graphical programming language. That IS the code.

 

Unfortunately, what you are asking is VERY vague. Are you trying to set a scale factor on some data acquisition? Modify calculations done post acquisition? There's multiple things you could be referring to as well as multiple ways that most of them can be implemented.

 

 

Message 6 of 10
(1,124 Views)

If you're lucky you might find a formula node on the block diagram.  That would have the formula looking a little like normal text code.

You could try to find it by looking around, or by using a "Find" search with Control-F from the block diagram.  If you do that, select "Objects" instead of text, then it's probably under "Functions" -> "Structures" -> "Formula node", and run a search.

 

However there is a good chance that the "formula" is actually just something that looks vaguely like this:

Kyle97330_0-1660946252452.png

If that's the case, then it's almost certainly not a quick fix.  You might need to end up spending a fair amount of time doing tutorials, or you could look into hiring a consultant for a short job.

Message 7 of 10
(1,122 Views)
@johnesch wrote:

https://forums.ni.com/t5/Multifunction-DAQ/How-can-I-get-the-souce-code-of-a-labview-vi/td-p/184996#....

This explained the source code is the block diagram, so within the block diagram where do formulas reside?


That's sort of like asking "within your C++ code where do the formulas reside?" They could be in any given file, a separate library, etc...

 

If this is an application of any complexity, one would hope there is more than one VI file, which means more than one block diagram.

 

It's also possible that conversions or scale factors could be inside of DAQmx tasks (or elsewhere) outside of LabVIEW altogether. Formulas can be implemented using discrete math functions and data flow, or via a C-like syntax in a Formula Node, or for that matter even in external dynamic link libraries or .Net assemblies.

0 Kudos
Message 8 of 10
(1,112 Views)

Let me suggest an analogy that you can bring to your supervisor so that you can get the help you require to do your work.

 

Suppose the previous employee writing a manuscript that described the computations that you are trying to modify.  However, your employee happens to be "on loan" from the Home Office in Tokyo, and (naturally) has written the manuscript in Japanese.  But now you need to write the English version, including the Formula.  You know everything about the process (so can certainly write it up), but you can't find/read the formula among all of the kanji characters running down the page, from right to left.

 

You'd like to get some help, ask a Japanese colleague to help you "find the formula", but you can't show him the manuscript because "it is confidential".

 

You have three choices:

  1. Say "I can't do it" (and look for another job).
  2. Learn Japanese, then you can read the manuscript.
  3. Convince your supervisor to let you "ask a consultant" (maybe hire one, or maybe you can find someone who knows Japanese and can look at it and at least "get you started" ...

I'll skip Option 1.  Option 2 means you need to learn LabVIEW.  This is not so difficult, but it might not be cost/time efficient.  Option 3 seems (to me) to be the best bet.  I can understand not posting on the LabVIEW Forum, but explain to your supervisor that he/she needs to consider hiring a consultant to at least get you started ...

 

Bob Schor

Message 9 of 10
(1,106 Views)

@johnesch wrote:

https://forums.ni.com/t5/Multifunction-DAQ/How-can-I-get-the-souce-code-of-a-labview-vi/td-p/184996#....

This explained the source code is the block diagram, so within the block diagram where do formulas reside?


Given you have no clue about navigating a LabVIEW code, it would be best to hire a LabVIEW freelancer to do the work for you.

 

Edit: Bob provided an excellent analogy.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 10 of 10
(1,100 Views)