04-03-2013 04:37 PM
Hello,
Im a new labview user. Can anyone help me design a case structure where if it recieves a 0, lets say action A occurs and if it receives any other number, action B occurs?
In terms of code..
If x==0,
Action A
Else
Action B
Solved! Go to Solution.
04-03-2013 04:43 PM
Hi saranam16,
This is a snippet for 2012 SP1 (you can save the .png to your computer and then drag it onto your block diagram to turn it into code).
If you wire your X value to the case selector for the case structure, by default you will have one case that is 0 and one case that is 1. If you right click on the border of the 1 case, you can Make this case Default, which means it will execute when all other cases are not true.
To help get started with LabVIEW there are also a number of good resources here: http://www.ni.com/gettingstarted/labviewbasics/ and NI offers a number of training courses for new LabVIEW users. If you have SSP, the training is offered for free online.
Hope that helps!
Jeff Peacock
Product Support Engineer | LabVIEW R&D | National Instruments
04-03-2013 04:48 PM
Thanks!!