03-24-2010 12:44 PM
Solved! Go to Solution.
03-24-2010 01:03 PM
Hi Princejack,
I don't know what you're after. Your VI sets the channel names to "Channel 1" to "Channel 4" as wired in the BD...
Show a picture of your "wrong" result.
Hints:
- For all those comparisions in your subVIs you will find special functions in the comparison palette (IsEmptyString?, IsNaN?, IsEqualToZero?).
- You also have a RubeGoldberg (IMHO) in your code with comparing a boolean to FALSE...
- You can resize the IndexArray function to have more outputs and you don't need to wire an index if you want elements 0 to 3...Then you wouldn't need 2 different subVIs to spit out some array elements...
03-24-2010 01:57 PM
Thank you very much for your reply.
I sending you 2 pictures. You can see in example1.jpg that I've choosen 2 channels (1 and 4). I was waiting that the legend shows me the plot name "Channel 1" and "Channel 4" like the output indicators do it. But on the legend man has to read another Strings "Channel 4" and "Channel 2". I don't understand why.
On a second example (example2.jpg) you can see that I've choosen the Channel 1, Channel 2 and Channel 4. The Ouptput indicators give me here also these values again but the legend show me another Strings "Channel 4", "Channel 2" and "Channel 3".
With the choice of 2 or 3 channels I don't get always on the legend of the chart the correct Strings but I can control and see that the strings Iwaiting to read are sently correctly in theoutput indicators.
I searching the error since last Monday and try a lot of possibilities witout success.
I hope you understand now my preoccupation and could help me.
Thank in advance
Sincerly,
PrinceJack
03-24-2010 02:14 PM
Take a look at the output of Channel_Selection.vi. Array2 is always of 4 elements, while the others are of size of buttons pressed.
Now check this expression:
NaN=NaN is false
This isn't obvious but logically correct.
BTW: Get rid of the local variables for 'initialization', they will give you problems. Also get used to the auto-indexing of for-loops, this will reduce code size by 50%
Felix
03-24-2010 02:36 PM
A picture is worth a thousand words:
Felix
03-24-2010 06:06 PM
I thank you for your assistance but you don't answer my question. I correct like you told me to do but I always have differents "OUTPUT STRINGS ON THE LEGEND OF THE CHART GRAPH".
My question is:
Why are the input strings into the "plot.name" of the property node of the chart graph different from the Strings of the Strings of the output indicators (element 1, element 2 element 3 and element 4) on the front panel.
I send you a picture again of the front panel and block diagramm.
Could you may be do the correction of my labview code? I send you a modified copy of the code.
Thank again,
Sincerly,
PrinceJack
03-24-2010 09:16 PM
have a look at this code
and the false case:
03-25-2010 05:50 AM
Thank you very much Jeffneuer,
Your picture help me very much and resolve my problem. But I would ask you just to know, if possible, could you explain me why the case structure, like I did, were false. The output indicators gave the desired strings but these don t appear on the legend. Could you explain me what was wrong? Just if you have some idea. Thank you again for your big help.
Have a nice day,
Sincerly
PrinceJack
03-25-2010 08:02 AM
03-25-2010 08:11 AM
Thank a lot for your reply. I understand it now better.
Thank again and have a nice day again.
Sincerly,
PrinceJack