Monday, January 27, 2020

Tuesday, March 5, 2019

Add Enum Items programmatically

I learned some trick in ni website to add the items programmatically in Enum control. I am aware to perform the same using  panel control reference method using VI reference (https://forums.ni.com/t5/Example-Programs/Programmatically-Add-Elements-to-Enum-Ring/ta-p/3514584). But I preferred this method which is more simple & easy to code.
Here we need to add one Ring control & set the "Strings" property and run the code. Now Rig control will have the items which you set through "Strings" property. In front panel right click over  Ring control and replace the it with Enum control. Now Enum will have the all the items which was added in Ring control.


Sunday, December 16, 2018

Get Window Handle reference using windows API

We can get any windows task handle reference using user32.dll. For that we need to use the window title as a input for the user32 windows dll (We can call user32 dll using call library function node). I attached the code snippet & step by step instruction pictures for reference. Using the Window Handle reference we can programmatically perform some task in that window like minimize, maximize & close the window etc...



Tuesday, May 23, 2017

Tip of Case Structure using string selector



Today I learned a new trick about case structure. As we know, once we connect the numeric number in the “case selector” & if we use 1...4 in “selector label” that case will work for 1, 2, 3 & 4 inputs. Similarly if we connect string in “case selector” & if we use a..d in “selector label” that case will work for a, b & c inputs (not for d). Screenshot attached for this condition. One more point is, this will work on capital letters & small letters if we selected “Case Insensitive Match” option.

Wednesday, September 28, 2016

Automate text update in BookMark of MsWord using LabVIEW


I am uploading the VI snippet to automate the text update in the defined bookmark field of the Ms Word document.


Sunday, December 6, 2015

LabVIEW Keyboard Shotcut for Objects & Movement

Today I learned one hidden trick to scroll through the Event, Case Structure & Stacked Sequence. Most of us know Ctrl + Mouse Wheel shortcut used to scroll through the Event, Case Structure & Stacked Sequence states one by one.  But if we use Ctrl + Shift + Mouse Wheel it scrolls through every 5th case/Event/Sequence state (Like 5,10...) from the beginning state (0 state). It will work only if we have more than 5 case/Event/Sequence states. I verified this Keyboard Shotcut in LabVIEW  2009

Wednesday, November 25, 2015

Moving (Running) Average using LabVIEW function without loop

Today I learned one trick from NI discussion forum to calculate the Moving (Running) Average without using loop. FIR filter LabVIEW function used for this calculation. See the attached screenshot & VI snippet code below.



Monday, November 24, 2014

Strip a path using Build Path function

Today I learned one LabVIEW trick from my colleague Balaji. He showed me how to strip a path using build path function. I attached code snippets of the trick below.



Thursday, October 30, 2014

Remove duplicate element & Sort the Array

Using varient function we can remove the duplicate elements & sort the elements of the array (Numeric,String array...). You can find the varient functions like "Set Variant Attribute"," Get Variant Attribute" in block digraram-> Function Palatte-> Cluster,Class & Varient -> Varient (LabVIEW 2009). By using those function without implementing anyother logics we can achieve removing duplicate element & sort array. It will work in String,Numeric & reference array also. See the simple exampleVI snippet attached below.
Front Panel : 

 Block Diagram :

Tuesday, October 28, 2014

Automate Powerpoint Macro execution using LabVIEW ActiveX









Using LabVIEW ActiveX functions we can call the powerpoint library to execute the macro of the opened Powerpoint file (*.ppt). Example code attached as a VI snippet. This VI module is tested using MS-Office 2003.

Wednesday, December 25, 2013

Multiple Patterns in LabVIEW File Dialog Tool

To display the multiple pattern files in File Dialog window use the string format (In File dialog tool-> Pattern terminal) as shows in the below picture.This Example picture shows the text & document file pattern configuration.




Friday, September 21, 2012

Learn Xcontrols - Basic Tutorial & Example links

Tutorials :
http://www.ni.com/white-paper/3198/en
http://zone.ni.com/wv/app/doc/p/id/wv-2695
http://prolucid.ca/xcontrols-2/
http://labviewwiki.org/XControl
https://decibel.ni.com/content/docs/DOC-3623

Examples :
https://decibel.ni.com/content/docs/DOC-7391
https://decibel.ni.com/content/docs/DOC-22536
https://decibel.ni.com/content/docs/DOC-1180#comment-1111