From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Automating a LabWindows/CVI program

Solved!
Go to solution

I have a rather intricate LabWindows program that dates back to CVI 2010 or so. It has been described by users in our testing group as a "swiss army knife", meaning that it has just about every test function you might want, *if* you know what to click in what order.  I've been asked to add automation so that it either self-clicks on things for a given task or at least guides the user into clicking on the right things.

 

I found the thread "Automating a LabWindows/CVI program" (https://forums.ni.com/t5/LabWindows-CVI/posting-an-event-to-the-event-queue/m-p/823264) which kind of asked the same question. Essentially, if I could have the code place mouse clicks in the queue by button ID I could pull this off. The only real answer offered was to call the callback using a function that no longer seems to exist - CallCtrlCallback().

 

Are there any tricks for doing this without totally restructuring this code?  The knife blade flips just need to be automated, I don't want to replace the blades or sharpen them.  Thanks!

0 Kudos
Message 1 of 2
(666 Views)
Solution
Accepted by topic author HowardE

CallCtrlCallback () still exists, provided you add the Programmer's Toolbox to your projects. The toolbox can be found in <CVIfolder>\toolslib\toolbox\ folder: you can add toolbox.fp to your project in Instrument menu or better in Library menu: I suggest the latter option since the instrument contains a lot of useful functions that you can find useful for your projects. I use them extensively, and I strongly suggest you to spend some time exploring the toolbox function tree: you may be surprised of how many little gems are there!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(639 Views)