08-19-2022 03:21 PM
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
08-19-2022 03:46 PM
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
08-19-2022 03:54 PM
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?
08-19-2022 04:25 PM
Maybe the better question is, where do I find the code?
08-19-2022 04:53 PM
This explained the source code is the block diagram, so within the block diagram where do formulas reside?
08-19-2022 04:58 PM
@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.
08-19-2022 05:00 PM
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:
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.
08-19-2022 05:07 PM
@johnesch wrote:
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.
08-19-2022 05:09 PM
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:
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
08-19-2022 05:10 PM - edited 08-19-2022 05:13 PM
@johnesch wrote:
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.