f

#### & versus &&

```When I use &, I get the following message:

"Use && instead of & as the AND operator in (scalar) conditional statements."

I wanted to compare two vectors element by element, as well write a conditional statement for just one of the elements of one of the vectors (i.e., solution1(13)>=0 & solution1~=solution2). If I use &&, I can't compare the two vectors as a whole, i.e., element by element. On a simple test I performed, it seemed that & worked fined for writing a conditional statement for just one of the elements.

I hope I'm making sense. My question is, what's wrong with only using &, and never using &&?
```
 0
johnps (81)
8/11/2011 12:16:10 PM
comp.soft-sys.matlab 211266 articles. 19 followers. lunamoonmoon (257) is leader.

2 Replies
1512 Views

Similar Articles

[PageSpeed] 50

```"John  Smith" <johnps@gmail.com> wrote in message <j20h6a\$dgg\$1@newscl01ah.mathworks.com>...
> When I use &, I get the following message:
>
> "Use && instead of & as the AND operator in (scalar) conditional statements."
>
> I wanted to compare two vectors element by element, as well write a conditional statement for just one of the elements of one of the vectors (i.e., solution1(13)>=0 & solution1~=solution2). If I use &&, I can't compare the two vectors as a whole, i.e., element by element. On a simple test I performed, it seemed that & worked fined for writing a conditional statement for just one of the elements.
>
> I hope I'm making sense. My question is, what's wrong with only using &, and never using &&?

&& is use with boolean scalar expression all skip an evaluation together when it's not needed.

Example, the statement:

b = ~isempty(a) && a(1) > 2;

works  for a = [] and as well a = [1 2];

If && is replaced by &, Matlab throws error if a = [];

Bruno
```
 0
b.luong5955 (6401)
8/11/2011 12:30:32 PM
```
"John  Smith" <johnps@gmail.com> wrote in message
news:j20h6a\$dgg\$1@newscl01ah.mathworks.com...
> When I use &, I get the following message:
> "Use && instead of & as the AND operator in (scalar) conditional
> statements."
>
> I wanted to compare two vectors element by element, as well write a
> conditional statement for just one of the elements of one of the vectors
> (i.e., solution1(13)>=0 & solution1~=solution2). If I use &&, I can't
> compare the two vectors as a whole, i.e., element by element. On a simple
> test I performed, it seemed that & worked fined for writing a conditional
> statement for just one of the elements.
> I hope I'm making sense. My question is, what's wrong with only using &,
> and never using &&?

&& short-circuits (doesn't evaluate the second input) if the first input is
false; this can lead to better performance, like:

y = ~isempty(a) && veryLongComputationInvolvingA(a);

If a is empty, the first input [~isempty(a)] is false. False AND anything is
going to be false regardless of the second input's truth value (or even if
it has a truth value; false && NaN will not error like false & NaN does) so
in this case MATLAB won't need to execute the function
veryLongComputationInvolvingA (which may work if its input is nonempty) and
will simply say y = false.

& does NOT short-circuit except in the context of an IF or WHILE statement
(for backwards compatibility reasons, I believe.) So the following WOULD
execute veryLongComputationInvolvingA even if a is empty.

y = ~isempty(a) & veryLongComputationInvolvingA(a);

This behavior is documented on the reference page for the logical operators.

http://www.mathworks.com/help/techdoc/ref/logicaloperatorselementwise.html

--
Steve Lord
slord@mathworks.com
http://www.mathworks.com

```
 0
slord (13689)
8/11/2011 2:38:16 PM

Similar Artilces:

Re: &&&&&& #6
This is a prime example I use when I discuss what is wrong with the macro language. Yes, you can figure it out but an alternative would be to simply write your data step code out and then bring it back in so you know what is being submitted. data _null_ ; file 'c:\myfile.sas' ; put 'data ...;' ; ...more put statements... run; %include 'c:\myfile.sas' ; Others will argue for SCL or something else. Regardless, this application probably requires a complete rethink if you are using 6 ampersands. Thanks, Alan Savian "Bridging SAS and Microsoft Technologies" -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Talbot Michael Katz Sent: Thursday, June 09, 2005 11:39 AM To: SAS-L@LISTSERV.UGA.EDU Subject: &&&&&& Hi. It requires SIX ampersands to resolve the macro variable example below: data _null_ ; set DS1 end = last ; call symput("mlv" || compress(put(_N_,best32.)), mli) ; call symput(mli, tdt) ; if last then do ; call symput("mlin", compress(put(_N_,best32.))) ; end ; run ; %put &&mlv&mlin. = &&&&&&mlv&mlin. ; (So, if there are five observations in the data set, and the fifth value of mli is "DAISY" and the fifth value of tdt is "YELLOW" this will print out "DAISY = YELLOW") Why does it take so many ampersands to resolve? Can someone please explain this resolutio...

What does &&= do?
I came across &&= while reading some code. I know what ||= does but not this one. Can someone explain what it does? Thanks much -subbu On Tue, Mar 18, 2008 at 7:09 AM, Subbu <subramani.athikunte@gmail.com> wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? > > Thanks much > -subbu a &&=b is a shortcut for a = a && b Subbu wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? self assignment Examples: foo += 12 Syntax: expr op= expr # left hand side must be assignable. This form evaluated as expr = expr op expr. But right hand side expression evaluated once. op can be one of: +, -, *, /, %, **, &, |, ^, <<, >>, &&, || There may be no space between operators and =. > RTFM? -- Ruurd On Tue, Mar 18, 2008 at 03:09:56PM +0900, Subbu wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? The other answers are not wrong, but they may not be clear. Just as ||= sets the value of something if it doesn't already have one, &&= sets the value of something if it *does* already have one. irb(main):001:0> a = nil => nil irb(main):002:0> b = 'foo' => "foo" irb(mai...

#@&&## it !
Men of Valor: Vietnam .... I've been down a rathole all weekend. Crawled down every tunnel, cut every wire ... and BOOM, the next trap gets me. Restarted this level maybe 10 times now. Last time, I even drew a picture of the tunnels, and made notes to avoid the traps. Got all the way through the level, finding the intel docs, and made it back to the entry hole I crawled down to get in the tunnels. I crawl into the main room and find 3 marine buddies crouching there. Can't really tell what happened next, but as we were talking .. BOOM .. and Lt Snagglepuss is writing a letter home again. I was a good hour into that level, sneaking and creeping, and being careful, and KABLOOEY, I got nuked right when I least suspected it. Jerks. I bet the coders think its funny. I'm nearly a month into this game, and I'm almost 1/2 way through it. Morons. Pimply-faced Mouth breathers .... johns "johns" <johns123@moscow.com> wrote in message news:1142273561.732006.206250@j33g2000cwa.googlegroups.com... > Men of Valor: Vietnam .... I've been down a rathole all weekend. > Crawled down every tunnel, cut every wire ... and BOOM, the > next trap gets me. Restarted this level maybe 10 times now. > Last time, I even drew a picture of the tunnels, and made > notes to avoid the traps. Got all the way through the level, > finding the intel docs, and made it back to the entry hole I > crawled down to get in the tunnels. I crawl into the main r...

&#1086;&#1090;&#1079;&#1099;&#1074;&#1099; &#1086;&#1073;&#1091;&#1074;&#1100; t
&#1080;&#1085;&#1090;&#1077;&#1088;&#1085;&#1077;&#1090; &#1084;&#1072;&#1075;&#1072;&#1079;&#1080;&#1085; &#1078;&#1077;&#1085;&#1089;&#1082;&#1086;&#1081; &#1086;&#1073;&#1091;&#1074;&#1080; &#1073;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1100; &#1086;&#1090;&#1090;&#1086; &#1082;&#1074;&#1077;&#1083;&#1083;&#1077; &#1082;&#1072;&#1090;&#1072;&#1083;&#1086;&#1075; &#1090;&#1072;&#1087;&#1086;&#1095;&#1082;&#1080; &#1085;&#1072; &#1082;&#1072;&#1073;&#1083;&#1091;&#1082;&#1077; &#1082;&#1091;&#1087;&#1080;&#1090;&#1100; &#1090;&#1072;&#1087;&#1086;&#1095;&#1082;&#1080; &#1080;&#1079; &#1086;&#1074;&#1077;&#1095;&#1100;&#1077;&#1081; &#1096;&#1077;&#1088;&#1089;&#1090;&#1080; &#1082;&#1091;&#1087;&#1080;&#1090;&#1100; &#1089;&#1087;&#1072;&#1085;&#1095; &#1073;&#1086;&#1073; &#1082;&#1077;&#1076;&#1099; &#1082;&#1091;&#1087;&#1080;&#1090;&#1100; &#1075;&#1076;&#1077; &#1082;&#1091;&#1087;&#1080;&#1090;&#1100; &#1082;&#1088;&#1072;&#...

&#1087;&#1091;&#1090;&#1072;&#1085;&#1072; ua , &#1076;&#1084;&#1080;&#1090;&#1088;
'[image: http://spy-soft-phone.com/sosihuy/123.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1095;&#1080;&#1089;&#1090;&#1099;&#1077; &#1087;&#1088;&#1091;&#1076;&#1099; &#1084;&#1086;&#1089;&#1082;&#1074;&#1099; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1076;&#1091;&#1073;&#1072;&#1081; &#1088;&#1077;&#1072;&#1083;&#1100;&#1085;&#1099;&#1077; &#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1077; &#1073;&#1083;&#1103;&#1076;&#1080; &#1086;&#1075;&#1088;&#1086;&#1084;&#1085;&#1099;&#1077; &#1090;&#1086;&#1083;&#1089;&#1090;&#1099;&#1077; &#1073;&#1083;&#1103;&#1076;&#1080; &#1089;&#1080;&#1089;&#1103;&#1089;&#1090;&#1091;&#1102; &#1096;&#1083;&#1102;&#1093;&#1091; '&#1096;&#1083;&#1102;&#1093;&#1080; &#1092;&#1077;&#1086;&#1076;&#1086;&#1089;&#1080;&#1080;' (http://martha.eu5.org/shluhi-feodosii.html) &#1080;&#1085;&#1090;&#1080;&#1084; &#1074; &#1087;&#1077;&...

C++ &amp; dll &amp; labview
Hi all, &nbsp; I have C++ dll &amp; header file provide by one of the instrument company. By using labview, I able to call several function from the dll but not all that&nbsp;show in the header file. Can someone&nbsp;help me?? Attach with the header file, only able call for the Global Function Declarations but not those API classes. &nbsp; Thanks and Best Regards, Simon &nbsp; &nbsp; &nbsp; iqapi.h: http://forums.ni.com/attachments/ni/170/320537/1/iqapi.h Hi simon76, Can you post the dll in question?&nbsp; Also, can you give an example of a specific function you are trying to call but are unable to? simon76 wrote:Hi all, &nbsp; I have C++ dll &amp; header file provide by one of the instrument company. By using labview, I able to call several function from the dll but not all that&nbsp;show in the header file. Can someone&nbsp;help me?? Attach with the header file, only able call for the Global Function Declarations but not those API classes. &nbsp; Thanks and Best Regards, Simon&nbsp; It's not surprising that you can not import most of those functions using the Import Library Wizard. Most of them do use C++ object pointers as parameters and the Import Library Wizard as well as LabVIEW does not know how to deal with them.I have not looked at the details of this API but if you do not need to access any methods of those C++ objects from LabVIEW and also do not need to create and destroy those objects in La...

dosug servlet , &#1085;&#1086;&#1084;&#1077;&#1088; &#1090;&#1077;&#1083;&#1077;
'[image: http://spy-soft-phone.com/sosihuy/2356.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1096;&#1083;&#1102;&#1093;&#1080; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1073;&#1083;&#1103;&#1076;&#1080; &#1084;&#1086;&#1089;&#1082;&#1074;&#1099; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1087;&#1080;&#1090;&#1077;&#1088;&#1072; &#1087;&#1088;&#1080;&#1084;&#1086;&#1088;&#1089;&#1082;&#1080;&#1081; &#1088;&#1072;&#1081;&#1086;&#1085; &#1096;&#1083;&#1102;&#1093;&#1080; &#1082;&#1086;&#1088;&#1086;&#1083;&#1077;&#1074; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1084;&#1091;&#1083;&#1072;&#1090;&#1082;&#1080; &#1084;&#1086;&#1089;&#1082;&#1074;&#1099; &#1072;&#1079;&#1080;&#1072;&#1090;&#1089;&#1082;&#1080;&#1077; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1074; &#1084;&#1086;&#1089;&#1082;&#1074;&#1077; '&#1087...

pptp & gre & cisco & 2600 & VPN & not working
Hey Guys, I have a Cisco 2611 using IOS 12.1-15(T). Behind it, I have a Microsoft server(192.168.1.3) that has RRAS configured and working with PPTP just fine. We have been bringing PPTP in VPN through a Watchgraurd firewall router for the last 3 years flawlessly across a DSL (they have 2 Internet connections). My client wants to bring VPN in via the Cisco using PPTP through the T1 instead of the DSL. Most employees, the client, and unfortunately myself, all have Comcast cable as our ISP since it is the only broadband available in our area. We also cannot bring IPSEC out from our homes through Comcast. Therefore we are stuck with PPTP. I need to configure PPTP to come from the Internet through the Cisco router to my Microsoft server (192.168.1.3). I was wondering if someone can take a look at my sanitized config below to see where I am goofing where I can make it work! I will post the solution once it works to help humanity! Current configuration : 2984 bytes ! version 12.1 service single-slot-reload-enable service tcp-keepalives-in service timestamps debug uptime no service timestamps log uptime service password-encryption ! hostname XXXXX ! no logging rate-limit enable secret ! username XXX privilege 15 password clock summer-time EDT recurring no ip subnet-zero no ip source-route ! no ip finger ip ftp source-interface Ethernet0/1 ip ftp username ip ftp password ip name-server 2XX.XXX.X.XX ! no ip bootp server call rsvp-sync cns event-service server ! interface L...

Re: WINDOWS98&#31995;&#32479;&#21551;&#21160;&#25925;&#38556;
Maybe it is your hardware such as hard disk and memory (RAM)problem. Joseph -----Original Message----- From: freeunix [mailto:cced236@elong.com] Posted At: Wednesday, November 19, 2003 6:17 PM Posted To: misc Conversation: WINDOWS98&#31995;&#32479;&#21551;&#21160;&#25925;&#38556; Subject: WINDOWS98&#31995;&#32479;&#21551;&#21160;&#25925;&#38556; hi,all i use the windows 98se ,when i boot the system ,occour blue screen. I use the esc key to quit blue screen,the system can normaly boot to gui interface. i don't know the reasons. And i use the search tool www.google.com to serach how to solution ,but i don't get:( please tlle me to solution the reason,thx! thx all! ...

Softmotion &amp; Labview RT &amp; System Identification
Hi there &nbsp; I would like to start a motion control project (AC servo conveyor system) using &nbsp; LV RT with Fieldpoint NI Softmotion LV System Identification &nbsp; Can someone tell me what is the correct procedure to get the project stared ? &nbsp; I'm familiar with LV but not the LV RT &amp; Softmotion &nbsp; There&nbsp;are not many softmotion examples around except the one that comes with the softmotion software&nbsp;itself. And I tried the example from the softmotion ( with modification ), it was not working properly. &nbsp; Can anyone&nbsp;who is&nbsp;experience in softmotion give a proper steps on how to go about using Softmotion with LV RT &amp; FP or many other RT hardware ? &nbsp; Than you in advance. &nbsp; RF328 &nbsp; &nbsp; RF328, &nbsp; Here is a document that may be helpful in getting started with SoftMotion.&nbsp; It explains the architecture of the FieldPoint examples in the Example Finder: <a href="http://www.ni.com/pdf/manuals/371331b.pdf" target="_blank"> http://www.ni.com/pdf/manuals/371331b.pdf</a> &nbsp; Which FieldPoint modules are you using?&nbsp; One possibilitiy is that the channels specified in the examples don't match up with the hardware that you are using.&nbsp; When you ran the examples, did you receive any errors or did it run without moving your motor? &nbsp; Chris M. Applications Engineer Nationa...

&#25551;&#30011;&#12398;&#38918;&#30058; /&#12288;A handy tip about drawing order of objects
MATLAB&#12391;&#12503;&#12525;&#12483;&#12488;&#12375;&#12383;&#32218;&#12399;&#12289;UISTACK&#12392;&#12356;&#12358;&#12467;&#12510;&#12531;&#12489;&#12434;&#20351;&#12387;&#12383;&#12425;&#12289;&#25551;&#30011;&#12373;&#12428;&#12427;&#38918;&#30058;&#12364;&#22793;&#12360;&#12425;&#12428;&#12427;&#12398;&#12289;&#30693;&#12387;&#12390;&#12356;&#12414;&#12377;&#12363;&#65311;&#12288;&#20415;&#22120;&#12391;&#12377;&#12424;&#65281;&#65306; plot(bsxfun(@(x,y)sin(2*pi*(y+x)/50),1:5:50,(1:50)'),'linew',10) set(gcf,'windowbuttonm','uistack(hittest,''top'')') title('&#12510;&#12454;&#12473;&#12398;&#19979;&#12398;&#32218;&#12364;&#21069;&#38754;&#12395;&#20986;&#12414;&#12377;') &#12371;&#12371;&#12391;&#12289;uistack&#12434;figure&#12398;&#12510;&#12454;&#12473;&#12514;&#12540;&#12471;&#12519;&#12531;&#12467;&#12540;&#12523;&#12496;&#12483;&#12463;&#12392;&#32068;&#12415;&#21512;&#12431;&#12379;&#12390;&#12356;&#12414;&#12377;&#12290; --------------------- Did you know that you can change the order in which objects are drawn using the...

&quot;re-entrant&quot; &quot;file I/O&quot; &quot;QSM_State Machines&quot;
&nbsp; &nbsp; I have trouble with writing (appending) to text file in a QSM that is in an "occurence mode" of operation whereby the queue waits for outside engueue to go ahead and do a task. The task is simply to write to a file a line of text. &nbsp; Outside producers give the queue its go ahead and data is sent along etc... &nbsp; WHat I am seeing in the logging functions are multiple errors (Error 1) Somehow Labview&nbsp;is not noticing that the reference is valid or it is invalidating the reference. &nbsp; Q is Should I just let the QSM loop to keep it alive and would that work? &nbsp; What is the rule concerning queue waiting for an event? Does the VI get flagged as idle and is that why the ref appears to be dropped?&nbsp; THere is no reason I can think of for the ref to be dropped. It is opened in the init frame then kept in a shift register. and available at each iteration in the QSM. &nbsp; The example works in a simple loop but not a loop that is waiting on an occurence.&nbsp; Why? &nbsp; The only work around I can manage is to use the path and open the reference when it is not valid which feels kind of&nbsp; silly if you get my drift &nbsp; Anyone seen this before? &nbsp; Thank You &nbsp; &nbsp; &nbsp; ...

Re: triple ampersands &&&
Hi Nathan, ---YOUR SAMPLE--- %let var1=adm_date; %let var2=netpay; * code for var1 ; do i=&&min_&var1.. to &&max_&var1.. by &&bin_size_&var1..; if i<= &var1. < i+&&bin_size_&var1.. then do; bin_&var1.=i; continue; end; end; * repeat code for var2 ; do i=&&min_&var2.. to &&max_&var2.. by &&bin_size_&var2..; if i<= &var2. < i+&&bin_size_&var2.. then do; bin_&var2.=i; continue; end; end; ---CAN BE--- %let var1=adm_date; %let var2=netpay; %let theVar=&var1; do i=&&min_&theVar.. to &&max_&theVar.. by &&bin_size_&theVar..; if i<= &theVar. < i+&&bin_size_&theVar.. then do; bin_&theVar.=i; continue; end; end; %let theVar=&var2; do i=&&min_&theVar.. to &&max_&theVar.. by &&bin_size_&theVar..; if i<= &theVar. < i+&&bin_size_&theVar.. then do; bin_&theVar.=i; continue; end; end; ---OR--- %macro do_it(theVar); do i=&&min_&theVar.. to &&max_&theVar.. by &&bin_size_&theVar..; if i<= &theVar. < i+&&bin_size_&theVar.. then do; bin_&theVar.=i; continue; end; end; %mend; %do_it(adm_date); %do_it(netpay); This paper may be of interest: http://www.pnwsug.org/Conference_2006/Procedings/PNWSUGotherfiles/PN21Ma rkT...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C #5
Hi, &nbsp;&nbsp;&nbsp; I am trying out an exercise on receiving the data from the 54600B oscilloscope into LabVIEW Analog and Digital Modulations VIs. Currently, i am trying out on ASK modulation and i want to grab the signal/waveform from the scope and display in the ASK modulation exactly the same as ASK modulation graph. And this ASK modulation will be used as SubVIs,which can be seen from the attachment to have a clearer image on the work.Can anyone please help me??This is very important because it is my project work..Thanks Alot!:smileyhappy: ASK modulation_modify2.zip: http://forums.ni.com/attachments/ni/170/315508/1/ASK modulation_modify2.zip Hi Serina, Are you able to communicate with and obtain data from the Oscilloscope?&nbsp; Are you specifically looking for information on how to manipulate the data once it is received?&nbsp; Your post is fairly general, so if you can elaborate on what you have accomplished so far, and what specific areas you have questions on, then I may be better able to assist you. Regards, Lauren Hi, &nbsp;&nbsp;&nbsp; I think i can understand what you are trying to say. Anyway thanks for replying i have been waiting for reply, i just manage to succeed in communicating the generator with the scope and get the square wave i want.. something like that '&nbsp;|||---|||---||| '. but i need to set the ranges for the signal generator information graph, which is the graph displaying data from the RF inst...

Macro iterative Step Exececution &&Vari_state or State_&&Vari
Why does State_&&Var&I resolve but not &&Var&i_State ?=20 Thanks in advance. =20 =20 =20 %macro mymac; data =20 %do i=3D1 %to &TotalStates; State_&&Var&i=20 %end;; set &libnX..AllStates; %do i=3D1 %to 10; %if &i =3D1 %then if state=3D"&&Var&i"=20 then output State_&&Var&i; %*this works; =20 %else=20 else if state=3D"&&Var&i"=20 then output &&Var&i_State; %*this does not; ; %end; run; %mend; %mymac; =20 /*This is how the macro Var was created:*/ data _null_; set &libnS..StateNames end=3Deof; by state; if first.state then do; flag+1; call symput('var'||put(flag,8. -L),state);=20 %put &var2; end; if eof then call symput('TotalStates',put(flag,8. -L)); run; Hi Shelly, Ed was a bit terse. Your need a period after the &i to separate it from the _State text so SAS thinks your macro variable is &i instead of &i_State. I would use &&Var.&i._State even if the first period is not necessary since it makes it easier to read the macro variable names. Paul OldenKamp On Oct 13, 12:45=A0pm, Shelly.Bax...@ECHOSTAR.COM ("Baxter, Shelly") wrote: > Why does State_&&Var&I =A0resolve but not &&Var&i_State ?=3D20 > Thanks in advance. > =3D20 > =3D20 > =3D20 > %macro mymac; > =A0data =3D20 ...

&quot;VI was stopped at node &quot; &quot; at a call to &quot;In Port Old 6.x.vi&quot;&quot;
Hi. I am having problems with&nbsp;a VI&nbsp;that was initially developed for LABView 6i. I have upgraded to LABView 8.2 but whenever I run the program in LABView 8.2 I get the error message that my VI was stopped at node&nbsp; " " at a call to "In Port Old 6.x.vi". The VI generally aquires data from a measurement instrument via an RS232 COM port. I have searched the forum and the only reference to this problem mentioned that it can be solved by making "minor modifications" to the polymorphic In Port VI in LABView 8.2 but I have no idea how to do this. &nbsp; I would be most grateful if anyone can help me to do this. I am a newbie to LABView programming so I would require as much detail as possible. Thanks. &nbsp; tronix Hello, &nbsp; Have you followed the guidelines found on this document? &nbsp; <a href="http://digital.ni.com/public.nsf/allkb/39129B46944215B686257069006CEC4E?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/allkb/39129B46944215B686257069006CEC4E?OpenDocument</a> &nbsp; Contains information on how to proceed and how you can change the VI's needed to new ones. &nbsp; Hopes this helps! Hello. Thanks for your response. I did see the link. Part of the document says: tronix wrote: Hi. I am having problems with&nbsp;a VI&nbsp;that was initially developed for LABView 6i. I have upgraded to LABView 8.2 but whenever I run the program in L...

how to connect &quot;IMAQ Get Buffer.vi&quot; output terminal of &quot;Image Out&quot; to the input terminal of &quot;Image&quot; of &quot;IMAQ ColorImageToArray.vi&quot;
Hi, Thanks a lot for helping me till this stage.I am again stuck up with some problem.Please help me this time also. Actually i am making changes in already existingblock diagram and also i am new to this labview programming.And also time is very crucial. So i want to know if there is any way to connect the output of Image out terminal of IMAQ Get Buffer.vi to the input terminal of Image of IMAQ ColorImageToArray.vi. In the actual block diagram the output of Image out terminal of IMAQ GetBuffer.vi is connected to the input terminal of Image of IMAQ ImageToArray.vi. I want to change this becos i want to take RGB image as input and seperate R, G, B components. Please explain in terms of bloack diagram. ...

Re: VisualBasic &quot;Show &amp; Hide&quot; equivalents in LabView
Hi, I want to show/hide the Labview Help programatically. (Just on the click on single button) How it can be done? Do i have to use event structure on Ctrl + H buttons???:smileyindifferent: Please suggest some solution. Thanks There's a help palette with a primitive called Control Help Window, which should do what you want (assuming you want the context help). <img src="http://forums.ni.com/attachments/ni/170/336539/1/untitled5.PNG"> Message Edited by mathan on 07-01-2008 07:07 AM untitled5.PNG: http://forums.ni.com/attachments/ni/170/336539/1/untitled5.PNG Hi Tst, Thanks. i know that there is a Context Help Window where you can see the help for all the functions or Labview help. i want to show/hide this window programatically. Is it possible? Thanks. Thanks Mathan, This is what i wanted. Thanks. Hi Dev, the first of those functions ("context help window") is what you need - as you can read in the context help window for that function!!!:smileyvery-happy: Yes, i got it. thanks . ...

Re: Macro iterative Step Exececution &&Vari_state or State_&&Vari #2
Shelly; Let's create a StateNames dataset. %let libNs = work ; Data &libNs..StateNames ; Length FIP 8 state \$2 ; Do FIP=1 to 56 ; state = fipState(FIP) ; If ( ( state ne "--" ) & ( ranUni(2) lt 0.4 ) ) then output ; End ; Run ; Now, we have 12 state abbreviations. Let's create the macro variables. I moified your code a little - especially with the substitution of the SYMPUTX() call routine. I also added NOTSORTED to the BY statement so that I wouldn't have to sort the data. Data _null_ ; Set &libNs..StateNames end=eof ; By state notSorted ; If first.state then do ; flag + 1 ; Call symPutX( catS( 'var', flag ) , state ) ; End ; If eof then call symPutX( 'TotalStates' , flag ) ; Run ; Let's see what we have for macro variables. %put _user_ ; GLOBAL TOTALSTATES 12 GLOBAL LIBNS work GLOBAL VAR12 UT GLOBAL VAR1 CO GLOBAL VAR2 CT GLOBAL VAR10 SD GLOBAL VAR3 DE GLOBAL VAR11 TN GLOBAL VAR4 FL GLOBAL VAR5 ME GLOBAL VAR6 MS GLOBAL VAR7 MO GLOBAL VAR8 NV GLOBAL VAR9 NM Here's the DATA step created by your macro. Data State_CO State_CT State_DE State_FL State_ME State_MS State_MO State_NV State_NM State_SD State_TN State_UT ; Set work.AllStates ; if state="CO" then output State_CO ; else if st...

The .NET assembly expected to be at &quot;&quot; was loaded from &quot;NULL&quot;
Hello, &nbsp; I use NET Components in a LabVIEW 8.2.1. VI and all work very fine. Now I convert it to LabVIEW 8.5 and I always get a warning, when open it. The Warning is : &nbsp;The .NET assembly expected to be at "" was loaded from "NULL". As example I add my CallbackVI in the Attachment. If somebody has an idea to remove this warning I would be thankful. &nbsp; Thanks in advance TE_NET_ToolStrip.ClickCallback.vi: http://forums.ni.com/attachments/ni/170/304243/1/TE_NET_ToolStrip.ClickCallback.vi Oh I was glad to early. The problem was only solved one time. When I changed something and saved again, I had again the troubles. &nbsp; I will recreate the VIs now. I already done, but it didn't helped. Now I read, that old one should be closed. ...

Trouble using Real Time &quot;Wait&quot; and &quot;Wait until&quot;
Hi,My problem is:When I use Labview Realtime with a while loop in CompactRIO, if I use a "Wait" or "Wait Until" function with unit "us" ot "ns" the loop will stop there forever. However, if I set the unit to ms, the loop can normally run.Besides, if I run the same vi under the host computer (not under CompactRIO), the loop can run correctly with whatever units "ms", "us", or "ns".Can anyone help me to solve this problem or tell me why?Thanks! ...