08-06-2018 02:55 PM
08-06-2018 03:01 PM
It says the VI was last updated in 2017, so I assume some modification may have been made last year or is just an artifact of moving something slightly and saving all changes.
08-06-2018 03:07 PM
It appears that it was never an official NI toolkit, and was designed for traditional DAQ. Noted by Bob and Analog in this post:
https://forums.ni.com/t5/LabVIEW/Lock-In-Amplifier-Start-Up-Kit-Removal-Clarification/td-p/3677844
08-06-2018 03:25 PM - edited 08-06-2018 03:25 PM
So it wasn't deja vu I was experiencing today, thanks for finding that post from a year ago!
EDIT: Or was that deja vi?
-AK2DM
08-06-2018 04:35 PM
My recommendation, back away slowly from your desk, click the red X in the upper-right corner and hope you are never forced to edit that thing. If you do find a way through that, and like a challenge, I can send you some more VIs. We need to petition NI to setup up a "Fix my code for a beer" feature in the forums. Anyone care to write a feature request?
08-07-2018 03:03 AM
The style of code looks typical for the 90ies. And the PW protection, while it could have been used to protect the precious IP a PLL consists of , more likely was in place to protect the innocent from exposure to bad code style.
08-07-2018 05:33 AM
Oh wow.
For a lockin, that's some really messed up spaghetti nightmares there. I mean, a major part of the code seems to be the LP filter (in a Rube Goldberg kind of fashion), there are certainly much easier ways to do that than what is on show here. I think this started out as "just a little filtering" and grew exponentially (organically) into this - thing.
Document the behaviour, use it as a golden template for testing and re-write from scratch.
There's almost nothing to salvage here.
08-07-2018 08:22 AM
I'll probably mess with the code sometime today.. Will most like not get as far as I'd like to with it either; however, I will keep everyone updated in this thread. On the other hand if anyone has some PLL code similar to this feel free to send it my way...
Best Regards
08-07-2018 08:35 AM
Did you try...
Help >>> Find Examples
Search tab
"Phase Locked Loop"
The modulation Toolkit has examples that may help you.
Ben
08-07-2018 08:54 AM
I'll give a try here shortly, cheers!